diff options
Diffstat (limited to 'test')
804 files changed, 10126 insertions, 75760 deletions
diff --git a/test/benchmarking/AVL-insert-random.scala b/test/benchmarking/AVL-insert-random.scala deleted file mode 100644 index 7299e330f5..0000000000 --- a/test/benchmarking/AVL-insert-random.scala +++ /dev/null @@ -1,67 +0,0 @@ -package scala.collection - - - - - -class Dummy(val a: Int) extends math.Ordered[Dummy] { - def compare(other: Dummy) = this.a - other.a - override def toString = a.toString -} - - -object RandomGlobal { - val sz = 500000 - val data = util.Random.shuffle((0 until sz) map { new Dummy(_) }) toArray; -} - - -import RandomGlobal._ - - -object RandomAVL extends testing.Benchmark { - - def run() { - val avl = new collection.mutable.TreeSet[Dummy] - - var i = 0 - while (i < sz) { - val elem = data(i) - avl += elem - i += 1 - } - } - -} - - -object RandomImmutableTreeSet extends testing.Benchmark { - - def run() { - var tree = new collection.immutable.TreeSet[Dummy] - - var i = 0 - while (i < sz) { - val elem = data(i) - tree += elem - i += 1 - } - } - -} - - -object RandomJavaTreeSet extends testing.Benchmark { - - def run() { - val tree = new java.util.TreeSet[Dummy] - - var i = 0 - while (i < sz) { - val elem = data(i) - tree add elem - i += 1 - } - } - -} diff --git a/test/benchmarking/AVL-insert.scala b/test/benchmarking/AVL-insert.scala deleted file mode 100644 index 4f3ab390c9..0000000000 --- a/test/benchmarking/AVL-insert.scala +++ /dev/null @@ -1,67 +0,0 @@ -package scala.collection - - - - - -class Dummy(val a: Int) extends math.Ordered[Dummy] { - def compare(other: Dummy) = this.a - other.a - override def toString = a.toString -} - - -object Global { - val sz = 500000 - val data = (0 until sz) map { new Dummy(_) } toArray -} - - -import Global._ - - -object AVL extends testing.Benchmark { - - def run() { - val avl = new collection.mutable.TreeSet[Dummy] - - var i = 0 - while (i < sz) { - val elem = data(i) - avl += elem - i += 1 - } - } - -} - - -object ImmutableTreeSet extends testing.Benchmark { - - def run() { - var tree = new collection.immutable.TreeSet[Dummy] - - var i = 0 - while (i < sz) { - val elem = data(i) - tree += elem - i += 1 - } - } - -} - - -object JavaTreeSet extends testing.Benchmark { - - def run() { - val tree = new java.util.TreeSet[Dummy] - - var i = 0 - while (i < sz) { - val elem = data(i) - tree add elem - i += 1 - } - } - -} diff --git a/test/benchmarking/ParCtrie-bfs.scala b/test/benchmarking/ParCtrie-bfs.scala deleted file mode 100644 index 59149fff8c..0000000000 --- a/test/benchmarking/ParCtrie-bfs.scala +++ /dev/null @@ -1,73 +0,0 @@ - - - - - -import collection.parallel.mutable.ParCtrie - - -object Bfs extends testing.Benchmark { - val length = sys.props("length").toInt - val par = sys.props("par").toInt - - type Node = (Int, Int); - type Parent = (Int, Int); - - def up(n: Node) = (n._1, n._2 - 1); - def down(n: Node) = (n._1, n._2 + 1); - def left(n: Node) = (n._1 - 1, n._2); - def right(n: Node) = (n._1 + 1, n._2); - - // create a map and a target - val target = (length / 2, length / 2); - val map = Array.tabulate(length, length)((x, y) => (x % 3) != 0 || (y % 3) != 0 || (x, y) == target) - def onMap(n: Node) = n._1 >= 0 && n._1 < length && n._2 >= 0 && n._2 < length - - // open and closed lists - val open = ParCtrie[Node, Parent]() - val closed = ParCtrie[Node, Parent]() - - collection.parallel.ForkJoinTasks.defaultForkJoinPool.setParallelism(par) - - override def setUp() { - open.clear() - closed.clear() - - // a couple of starting positions - open((0, 0)) = null - open((length - 1, length - 1)) = null - open((0, length - 1)) = null - open((length - 1, 0)) = null - } - - def run() = { - // greedy bfs path search - while (open.nonEmpty && !open.contains(target)) { - for ((node, parent) <- open) { - def expand(next: Node) { - if (onMap(next) && map(next._1)(next._2) && !closed.contains(next) && !open.contains(next)) { - open(next) = node - } - } - expand(up(node)) - expand(down(node)) - expand(left(node)) - expand(right(node)) - closed(node) = parent - open.remove(node) - } - } - } - - override def tearDown() { - // print path - var pathnode = open(target) - while (closed.contains(pathnode)) { - print(pathnode + "->") - pathnode = closed(pathnode) - } - println() - } - -} - diff --git a/test/benchmarking/ParCtrie-map.scala b/test/benchmarking/ParCtrie-map.scala deleted file mode 100644 index f1d2f560b7..0000000000 --- a/test/benchmarking/ParCtrie-map.scala +++ /dev/null @@ -1,21 +0,0 @@ - - - -import collection.parallel.mutable.ParCtrie - - - -object Map extends testing.Benchmark { - val length = sys.props("length").toInt - val par = sys.props("par").toInt - val parctrie = ParCtrie((0 until length) zip (0 until length): _*) - - parctrie.tasksupport = new collection.parallel.ForkJoinTaskSupport(new scala.concurrent.forkjoin.ForkJoinPool(par)) - - def run = { - parctrie map { - kv => kv - } - } -} - diff --git a/test/benchmarking/ParCtrie-nums.scala b/test/benchmarking/ParCtrie-nums.scala deleted file mode 100644 index 76d1966d1f..0000000000 --- a/test/benchmarking/ParCtrie-nums.scala +++ /dev/null @@ -1,39 +0,0 @@ - - - - - -import collection.parallel.mutable.ParCtrie - - -case class Entry(num: Double) { - var sqrt = num -} - - -object Nums extends testing.Benchmark { - val length = sys.props("length").toInt - val par = sys.props("par").toInt - var entries: Seq[Entry] = null - var results: ParCtrie[Double, Entry] = null - - collection.parallel.ForkJoinTasks.defaultForkJoinPool.setParallelism(par) - - override def setUp() { - entries = (1 until length) map { num => Entry(num.toDouble) } - results = ParCtrie() - for (e <- entries) results += ((e.num, e)) - } - - def run() = { - while (results.nonEmpty) { - for ((num, e) <- results) { - val nsqrt = 0.5 * (e.sqrt + e.num / e.sqrt) - if (math.abs(nsqrt - e.sqrt) < 0.01) { - results.remove(num) - } else e.sqrt = nsqrt - } - } - } -} - diff --git a/test/benchmarking/ParCtrie-size.scala b/test/benchmarking/ParCtrie-size.scala deleted file mode 100644 index 3f47dc23fd..0000000000 --- a/test/benchmarking/ParCtrie-size.scala +++ /dev/null @@ -1,37 +0,0 @@ - - - - -import collection.parallel.mutable.ParTrieMap - - - -object Size extends testing.Benchmark { - val length = sys.props("length").toInt - val par = sys.props("par").toInt - var parctrie = ParTrieMap((0 until length) zip (0 until length): _*) - - //collection.parallel.ForkJoinTasks.defaultForkJoinPool.setParallelism(par) - val ts = new collection.parallel.ForkJoinTaskSupport(new concurrent.forkjoin.ForkJoinPool(par)) - parctrie.tasksupport = ts - - def run = { - parctrie.size - } - - var iteration = 0 - - override def tearDown() { - iteration += 1 - if (iteration % 4 == 0) parctrie = ParTrieMap((0 until length) zip (0 until length): _*) - parctrie.tasksupport = ts - } - -} - - - - - - - diff --git a/test/benchmarking/ParHashMap.scala b/test/benchmarking/ParHashMap.scala deleted file mode 100644 index 33a378fb04..0000000000 --- a/test/benchmarking/ParHashMap.scala +++ /dev/null @@ -1,33 +0,0 @@ - - - -import collection.parallel.mutable.ParHashMap - - - -object Map extends testing.Benchmark { - val length = sys.props("length").toInt - val par = sys.props("par").toInt - val phm = ParHashMap((0 until length) zip (0 until length): _*) - - phm.tasksupport = new collection.parallel.ForkJoinTaskSupport(new scala.concurrent.forkjoin.ForkJoinPool(par)) - - def run = { - phm map { - kv => kv - } - } -} - - -object MapSeq extends testing.Benchmark { - val length = sys.props("length").toInt - val hm = collection.mutable.HashMap((0 until length) zip (0 until length): _*) - - def run = { - hm map { - kv => kv - } - } -} - diff --git a/test/benchmarking/ParVector-reduce.scala b/test/benchmarking/ParVector-reduce.scala deleted file mode 100644 index 2b4594e997..0000000000 --- a/test/benchmarking/ParVector-reduce.scala +++ /dev/null @@ -1,33 +0,0 @@ - - - -import collection.parallel.immutable.ParVector - - - -object Reduce extends testing.Benchmark { - val length = sys.props("length").toInt - val par = sys.props("par").toInt - val parvector = ParVector((0 until length): _*) - - parvector.tasksupport = new collection.parallel.ForkJoinTaskSupport(new scala.concurrent.forkjoin.ForkJoinPool(par)) - - def run = { - parvector reduce { - (a, b) => a + b - } - } -} - - -object ReduceSeq extends testing.Benchmark { - val length = sys.props("length").toInt - val vector = collection.immutable.Vector((0 until length): _*) - - def run = { - vector reduce { - (a, b) => a + b - } - } -} - diff --git a/test/benchmarking/TreeSetInsert.scala b/test/benchmarking/TreeSetInsert.scala deleted file mode 100644 index 23444aa305..0000000000 --- a/test/benchmarking/TreeSetInsert.scala +++ /dev/null @@ -1,70 +0,0 @@ - -object TreeSetInsert { - - def main(args: Array[String]): Unit = { - val n = 500000 - JavaUtilTS.main(args) - MutableTS.main(args) - ImmutableTS.main(args) - } -} - -class Dummy(val a: Int) extends math.Ordered[Dummy] { - def compare(other: Dummy) = this.a - other.a - - override def toString = a.toString - } - - -object JavaUtilTS extends testing.Benchmark { - val length = sys.props("length").toInt - var data: Array[Dummy] = (0 until length) map { a => new Dummy(a) } toArray - var t: java.util.TreeSet[Dummy] = null - - def run = { - t = new java.util.TreeSet[Dummy]() - - var i = 0 - while (i < length) { - val elem = data(i) - t add elem - i += 1 - } - } -} - - -object MutableTS extends testing.Benchmark { - val length = sys.props("length").toInt - var data: Array[Dummy] = (0 until length) map { a => new Dummy(a) } toArray - var t: collection.mutable.TreeSet[Dummy] = null - - def run = { - t = collection.mutable.TreeSet[Dummy]() - - var i = 0 - while (i < length) { - val elem = data(i) - t += elem - i += 1 - } - } -} - - -object ImmutableTS extends testing.Benchmark { - val length = sys.props("length").toInt - var data: Array[Dummy] = (0 until length) map { a => new Dummy(a) } toArray - var t: collection.immutable.TreeSet[Dummy] = null - - def run = { - t = collection.immutable.TreeSet[Dummy]() - - var i = 0 - while (i < length) { - val elem = data(i) - t += elem - i += 1 - } - } -} diff --git a/test/benchmarking/TreeSetInsertRandom.scala b/test/benchmarking/TreeSetInsertRandom.scala deleted file mode 100644 index 7f182548b7..0000000000 --- a/test/benchmarking/TreeSetInsertRandom.scala +++ /dev/null @@ -1,65 +0,0 @@ - -object TreeSetInsertRandom { - - def main(args: Array[String]): Unit = { - val n = 500000 - new JavaUtilTS(n).main(args) - new MutableTS(n).main(args) - new ImmutableTS(n).main(args) - } -} - -class Dummy(val a: Int) extends math.Ordered[Dummy] { - def compare(other: Dummy) = this.a - other.a - - override def toString = a.toString - } - - -class JavaUtilTS(val length: Int) extends testing.Benchmark { - var data: Array[Dummy] = util.Random.shuffle((0 until length) map { a => new Dummy(a) }) toArray - var t: java.util.TreeSet[Dummy] = null - - def run = { - t = new java.util.TreeSet[Dummy]() - - var i = 0 - while (i < length) { - val elem = data(i) - t add elem - i += 1 - } - } -} - -class MutableTS(val length: Int) extends testing.Benchmark { - var data: Array[Dummy] = util.Random.shuffle((0 until length) map { a => new Dummy(a) }) toArray - var t: collection.mutable.TreeSet[Dummy] = null - - def run = { - t = collection.mutable.TreeSet[Dummy]() - - var i = 0 - while (i < length) { - val elem = data(i) - t += elem - i += 1 - } - } -} - -class ImmutableTS(val length: Int) extends testing.Benchmark { - var data: Array[Dummy] = util.Random.shuffle((0 until length) map { a => new Dummy(a) }) toArray - var t: collection.immutable.TreeSet[Dummy] = null - - def run = { - t = collection.immutable.TreeSet[Dummy]() - - var i = 0 - while (i < length) { - val elem = data(i) - t += elem - i += 1 - } - } -} diff --git a/test/benchmarking/TreeSetIterator.scala b/test/benchmarking/TreeSetIterator.scala deleted file mode 100644 index 08c20e8b0c..0000000000 --- a/test/benchmarking/TreeSetIterator.scala +++ /dev/null @@ -1,69 +0,0 @@ - -object TreeSetIterator { - - def main(args: Array[String]): Unit = { - val n = 500000 - JavaUtilTS.main(args) - MutableTS.main(args) - ImmutableTS.main(args) - } -} - -class Dummy(val a: Int) extends math.Ordered[Dummy] { - def compare(other: Dummy) = this.a - other.a - - override def toString = a.toString - } - - -object JavaUtilTS extends testing.Benchmark { - val length = sys.props("length").toInt - var data: Array[Dummy] = (0 until length) map { a => new Dummy(a) } toArray - var t: java.util.TreeSet[Dummy] = null - - def run = { - t = new java.util.TreeSet[Dummy]() - data foreach { a => t add a } - - var i: Dummy = null - var it = t.iterator - while (it.hasNext) { - i = it.next - } - i - } -} - -object MutableTS extends testing.Benchmark { - val length = sys.props("length").toInt - var data: Array[Dummy] = (0 until length) map { a => new Dummy(a) } toArray - var t: collection.mutable.TreeSet[Dummy] = null - - def run = { - t = collection.mutable.TreeSet[Dummy](data: _*) - - var i: Dummy = null - var it = t.iterator - while (it.hasNext) { - i = it.next - } - i - } -} - -object ImmutableTS extends testing.Benchmark { - val length = sys.props("length").toInt - var data: Array[Dummy] = (0 until length) map { a => new Dummy(a) } toArray - var t: collection.immutable.TreeSet[Dummy] = null - - def run = { - t = collection.immutable.TreeSet[Dummy](data: _*) - - var i: Dummy = null - var it = t.iterator - while (it.hasNext) { - i = it.next - } - i - } -} diff --git a/test/benchmarking/TreeSetRemove.scala b/test/benchmarking/TreeSetRemove.scala deleted file mode 100644 index f84066f336..0000000000 --- a/test/benchmarking/TreeSetRemove.scala +++ /dev/null @@ -1,69 +0,0 @@ - -object TreeSetRemove { - - def main(args: Array[String]): Unit = { - val n = 500000 - JavaUtilTS.main(args) - MutableTS.main(args) - ImmutableTS.main(args) - } -} - -class Dummy(val a: Int) extends math.Ordered[Dummy] { - def compare(other: Dummy) = this.a - other.a - - override def toString = a.toString - } - - -object JavaUtilTS extends testing.Benchmark { - val length = sys.props("length").toInt - var data: Array[Dummy] = (0 until length) map { a => new Dummy(a) } toArray - var t: java.util.TreeSet[Dummy] = null - - def run = { - t = new java.util.TreeSet[Dummy]() - data foreach { a => t add a } - - var i = 0 - while (i < length) { - val elem = data(i) - t remove elem - i += 1 - } - } -} - -object MutableTS extends testing.Benchmark { - val length = sys.props("length").toInt - var data: Array[Dummy] = (0 until length) map { a => new Dummy(a) } toArray - var t: collection.mutable.TreeSet[Dummy] = null - - def run = { - t = collection.mutable.TreeSet[Dummy](data: _*) - - var i = 0 - while (i < length) { - val elem = data(i) - t -= elem - i += 1 - } - } -} - -object ImmutableTS extends testing.Benchmark { - val length = sys.props("length").toInt - var data: Array[Dummy] = (0 until length) map { a => new Dummy(a) } toArray - var t: collection.immutable.TreeSet[Dummy] = null - - def run = { - t = collection.immutable.TreeSet[Dummy](data: _*) - - var i = 0 - while (i < length) { - val elem = data(i) - t -= elem - i += 1 - } - } -} diff --git a/test/benchmarking/TreeSetRemoveRandom.scala b/test/benchmarking/TreeSetRemoveRandom.scala deleted file mode 100644 index 4d311679e3..0000000000 --- a/test/benchmarking/TreeSetRemoveRandom.scala +++ /dev/null @@ -1,66 +0,0 @@ - -object TreeSetRemoveRandom { - - def main(args: Array[String]): Unit = { - val n = 500000 - new JavaUtilTS(n).main(args) - new MutableTS(n).main(args) - new ImmutableTS(n).main(args) - } -} - -class Dummy(val a: Int) extends math.Ordered[Dummy] { - def compare(other: Dummy) = this.a - other.a - - override def toString = a.toString - } - - -class JavaUtilTS(val length: Int) extends testing.Benchmark { - var data: Array[Dummy] = util.Random.shuffle((0 until length) map { a => new Dummy(a) }) toArray - var t: java.util.TreeSet[Dummy] = null - - def run = { - t = new java.util.TreeSet[Dummy]() - data foreach { a => t add a } - - var i = 0 - while (i < length) { - val elem = data(i) - t remove elem - i += 1 - } - } -} - -class MutableTS(val length: Int) extends testing.Benchmark { - var data: Array[Dummy] = util.Random.shuffle((0 until length) map { a => new Dummy(a) }) toArray - var t: collection.mutable.TreeSet[Dummy] = null - - def run = { - t = collection.mutable.TreeSet[Dummy](data: _*) - - var i = 0 - while (i < length) { - val elem = data(i) - t -= elem - i += 1 - } - } -} - -class ImmutableTS(val length: Int) extends testing.Benchmark { - var data: Array[Dummy] = util.Random.shuffle((0 until length) map { a => new Dummy(a) }) toArray - var t: collection.immutable.TreeSet[Dummy] = null - - def run = { - t = collection.immutable.TreeSet[Dummy](data: _*) - - var i = 0 - while (i < length) { - val elem = data(i) - t -= elem - i += 1 - } - } -} diff --git a/test/benchmarking/t6726-patmat-analysis.scala b/test/benchmarking/t6726-patmat-analysis.scala deleted file mode 100644 index bcb7f6c6b2..0000000000 --- a/test/benchmarking/t6726-patmat-analysis.scala +++ /dev/null @@ -1,4005 +0,0 @@ -trait Foo{ -abstract class Base -case class Dummy0(x: Int) extends Base -case class Dummy1(x: Int) extends Base -case class Dummy2(x: Int) extends Base -case class Dummy3(x: Int) extends Base -case class Dummy4(x: Int) extends Base -case class Dummy5(x: Int) extends Base -case class Dummy6(x: Int) extends Base -case class Dummy7(x: Int) extends Base -case class Dummy8(x: Int) extends Base -case class Dummy9(x: Int) extends Base -case class Dummy10(x: Int) extends Base -case class Dummy11(x: Int) extends Base -case class Dummy12(x: Int) extends Base -case class Dummy13(x: Int) extends Base -case class Dummy14(x: Int) extends Base -case class Dummy15(x: Int) extends Base -case class Dummy16(x: Int) extends Base -case class Dummy17(x: Int) extends Base -case class Dummy18(x: Int) extends Base -case class Dummy19(x: Int) extends Base -case class Dummy20(x: Int) extends Base -case class Dummy21(x: Int) extends Base -case class Dummy22(x: Int) extends Base -case class Dummy23(x: Int) extends Base -case class Dummy24(x: Int) extends Base -case class Dummy25(x: Int) extends Base -case class Dummy26(x: Int) extends Base -case class Dummy27(x: Int) extends Base -case class Dummy28(x: Int) extends Base -case class Dummy29(x: Int) extends Base -case class Dummy30(x: Int) extends Base -case class Dummy31(x: Int) extends Base -case class Dummy32(x: Int) extends Base -case class Dummy33(x: Int) extends Base -case class Dummy34(x: Int) extends Base -case class Dummy35(x: Int) extends Base -case class Dummy36(x: Int) extends Base -case class Dummy37(x: Int) extends Base -case class Dummy38(x: Int) extends Base -case class Dummy39(x: Int) extends Base -case class Dummy40(x: Int) extends Base -case class Dummy41(x: Int) extends Base -case class Dummy42(x: Int) extends Base -case class Dummy43(x: Int) extends Base -case class Dummy44(x: Int) extends Base -case class Dummy45(x: Int) extends Base -case class Dummy46(x: Int) extends Base -case class Dummy47(x: Int) extends Base -case class Dummy48(x: Int) extends Base -case class Dummy49(x: Int) extends Base -case class Dummy50(x: Int) extends Base -case class Dummy51(x: Int) extends Base -case class Dummy52(x: Int) extends Base -case class Dummy53(x: Int) extends Base -case class Dummy54(x: Int) extends Base -case class Dummy55(x: Int) extends Base -case class Dummy56(x: Int) extends Base -case class Dummy57(x: Int) extends Base -case class Dummy58(x: Int) extends Base -case class Dummy59(x: Int) extends Base -case class Dummy60(x: Int) extends Base -case class Dummy61(x: Int) extends Base -case class Dummy62(x: Int) extends Base -case class Dummy63(x: Int) extends Base -case class Dummy64(x: Int) extends Base -case class Dummy65(x: Int) extends Base -case class Dummy66(x: Int) extends Base -case class Dummy67(x: Int) extends Base -case class Dummy68(x: Int) extends Base -case class Dummy69(x: Int) extends Base -case class Dummy70(x: Int) extends Base -case class Dummy71(x: Int) extends Base -case class Dummy72(x: Int) extends Base -case class Dummy73(x: Int) extends Base -case class Dummy74(x: Int) extends Base -case class Dummy75(x: Int) extends Base -case class Dummy76(x: Int) extends Base -case class Dummy77(x: Int) extends Base -case class Dummy78(x: Int) extends Base -case class Dummy79(x: Int) extends Base -case class Dummy80(x: Int) extends Base -case class Dummy81(x: Int) extends Base -case class Dummy82(x: Int) extends Base -case class Dummy83(x: Int) extends Base -case class Dummy84(x: Int) extends Base -case class Dummy85(x: Int) extends Base -case class Dummy86(x: Int) extends Base -case class Dummy87(x: Int) extends Base -case class Dummy88(x: Int) extends Base -case class Dummy89(x: Int) extends Base -case class Dummy90(x: Int) extends Base -case class Dummy91(x: Int) extends Base -case class Dummy92(x: Int) extends Base -case class Dummy93(x: Int) extends Base -case class Dummy94(x: Int) extends Base -case class Dummy95(x: Int) extends Base -case class Dummy96(x: Int) extends Base -case class Dummy97(x: Int) extends Base -case class Dummy98(x: Int) extends Base -case class Dummy99(x: Int) extends Base -case class Dummy100(x: Int) extends Base -case class Dummy101(x: Int) extends Base -case class Dummy102(x: Int) extends Base -case class Dummy103(x: Int) extends Base -case class Dummy104(x: Int) extends Base -case class Dummy105(x: Int) extends Base -case class Dummy106(x: Int) extends Base -case class Dummy107(x: Int) extends Base -case class Dummy108(x: Int) extends Base -case class Dummy109(x: Int) extends Base -case class Dummy110(x: Int) extends Base -case class Dummy111(x: Int) extends Base -case class Dummy112(x: Int) extends Base -case class Dummy113(x: Int) extends Base -case class Dummy114(x: Int) extends Base -case class Dummy115(x: Int) extends Base -case class Dummy116(x: Int) extends Base -case class Dummy117(x: Int) extends Base -case class Dummy118(x: Int) extends Base -case class Dummy119(x: Int) extends Base -case class Dummy120(x: Int) extends Base -case class Dummy121(x: Int) extends Base -case class Dummy122(x: Int) extends Base -case class Dummy123(x: Int) extends Base -case class Dummy124(x: Int) extends Base -case class Dummy125(x: Int) extends Base -case class Dummy126(x: Int) extends Base -case class Dummy127(x: Int) extends Base -case class Dummy128(x: Int) extends Base -case class Dummy129(x: Int) extends Base -case class Dummy130(x: Int) extends Base -case class Dummy131(x: Int) extends Base -case class Dummy132(x: Int) extends Base -case class Dummy133(x: Int) extends Base -case class Dummy134(x: Int) extends Base -case class Dummy135(x: Int) extends Base -case class Dummy136(x: Int) extends Base -case class Dummy137(x: Int) extends Base -case class Dummy138(x: Int) extends Base -case class Dummy139(x: Int) extends Base -case class Dummy140(x: Int) extends Base -case class Dummy141(x: Int) extends Base -case class Dummy142(x: Int) extends Base -case class Dummy143(x: Int) extends Base -case class Dummy144(x: Int) extends Base -case class Dummy145(x: Int) extends Base -case class Dummy146(x: Int) extends Base -case class Dummy147(x: Int) extends Base -case class Dummy148(x: Int) extends Base -case class Dummy149(x: Int) extends Base -case class Dummy150(x: Int) extends Base -case class Dummy151(x: Int) extends Base -case class Dummy152(x: Int) extends Base -case class Dummy153(x: Int) extends Base -case class Dummy154(x: Int) extends Base -case class Dummy155(x: Int) extends Base -case class Dummy156(x: Int) extends Base -case class Dummy157(x: Int) extends Base -case class Dummy158(x: Int) extends Base -case class Dummy159(x: Int) extends Base -case class Dummy160(x: Int) extends Base -case class Dummy161(x: Int) extends Base -case class Dummy162(x: Int) extends Base -case class Dummy163(x: Int) extends Base -case class Dummy164(x: Int) extends Base -case class Dummy165(x: Int) extends Base -case class Dummy166(x: Int) extends Base -case class Dummy167(x: Int) extends Base -case class Dummy168(x: Int) extends Base -case class Dummy169(x: Int) extends Base -case class Dummy170(x: Int) extends Base -case class Dummy171(x: Int) extends Base -case class Dummy172(x: Int) extends Base -case class Dummy173(x: Int) extends Base -case class Dummy174(x: Int) extends Base -case class Dummy175(x: Int) extends Base -case class Dummy176(x: Int) extends Base -case class Dummy177(x: Int) extends Base -case class Dummy178(x: Int) extends Base -case class Dummy179(x: Int) extends Base -case class Dummy180(x: Int) extends Base -case class Dummy181(x: Int) extends Base -case class Dummy182(x: Int) extends Base -case class Dummy183(x: Int) extends Base -case class Dummy184(x: Int) extends Base -case class Dummy185(x: Int) extends Base -case class Dummy186(x: Int) extends Base -case class Dummy187(x: Int) extends Base -case class Dummy188(x: Int) extends Base -case class Dummy189(x: Int) extends Base -case class Dummy190(x: Int) extends Base -case class Dummy191(x: Int) extends Base -case class Dummy192(x: Int) extends Base -case class Dummy193(x: Int) extends Base -case class Dummy194(x: Int) extends Base -case class Dummy195(x: Int) extends Base -case class Dummy196(x: Int) extends Base -case class Dummy197(x: Int) extends Base -case class Dummy198(x: Int) extends Base -case class Dummy199(x: Int) extends Base -case class Dummy200(x: Int) extends Base -case class Dummy201(x: Int) extends Base -case class Dummy202(x: Int) extends Base -case class Dummy203(x: Int) extends Base -case class Dummy204(x: Int) extends Base -case class Dummy205(x: Int) extends Base -case class Dummy206(x: Int) extends Base -case class Dummy207(x: Int) extends Base -case class Dummy208(x: Int) extends Base -case class Dummy209(x: Int) extends Base -case class Dummy210(x: Int) extends Base -case class Dummy211(x: Int) extends Base -case class Dummy212(x: Int) extends Base -case class Dummy213(x: Int) extends Base -case class Dummy214(x: Int) extends Base -case class Dummy215(x: Int) extends Base -case class Dummy216(x: Int) extends Base -case class Dummy217(x: Int) extends Base -case class Dummy218(x: Int) extends Base -case class Dummy219(x: Int) extends Base -case class Dummy220(x: Int) extends Base -case class Dummy221(x: Int) extends Base -case class Dummy222(x: Int) extends Base -case class Dummy223(x: Int) extends Base -case class Dummy224(x: Int) extends Base -case class Dummy225(x: Int) extends Base -case class Dummy226(x: Int) extends Base -case class Dummy227(x: Int) extends Base -case class Dummy228(x: Int) extends Base -case class Dummy229(x: Int) extends Base -case class Dummy230(x: Int) extends Base -case class Dummy231(x: Int) extends Base -case class Dummy232(x: Int) extends Base -case class Dummy233(x: Int) extends Base -case class Dummy234(x: Int) extends Base -case class Dummy235(x: Int) extends Base -case class Dummy236(x: Int) extends Base -case class Dummy237(x: Int) extends Base -case class Dummy238(x: Int) extends Base -case class Dummy239(x: Int) extends Base -case class Dummy240(x: Int) extends Base -case class Dummy241(x: Int) extends Base -case class Dummy242(x: Int) extends Base -case class Dummy243(x: Int) extends Base -case class Dummy244(x: Int) extends Base -case class Dummy245(x: Int) extends Base -case class Dummy246(x: Int) extends Base -case class Dummy247(x: Int) extends Base -case class Dummy248(x: Int) extends Base -case class Dummy249(x: Int) extends Base -case class Dummy250(x: Int) extends Base -case class Dummy251(x: Int) extends Base -case class Dummy252(x: Int) extends Base -case class Dummy253(x: Int) extends Base -case class Dummy254(x: Int) extends Base -case class Dummy255(x: Int) extends Base -case class Dummy256(x: Int) extends Base -case class Dummy257(x: Int) extends Base -case class Dummy258(x: Int) extends Base -case class Dummy259(x: Int) extends Base -case class Dummy260(x: Int) extends Base -case class Dummy261(x: Int) extends Base -case class Dummy262(x: Int) extends Base -case class Dummy263(x: Int) extends Base -case class Dummy264(x: Int) extends Base -case class Dummy265(x: Int) extends Base -case class Dummy266(x: Int) extends Base -case class Dummy267(x: Int) extends Base -case class Dummy268(x: Int) extends Base -case class Dummy269(x: Int) extends Base -case class Dummy270(x: Int) extends Base -case class Dummy271(x: Int) extends Base -case class Dummy272(x: Int) extends Base -case class Dummy273(x: Int) extends Base -case class Dummy274(x: Int) extends Base -case class Dummy275(x: Int) extends Base -case class Dummy276(x: Int) extends Base -case class Dummy277(x: Int) extends Base -case class Dummy278(x: Int) extends Base -case class Dummy279(x: Int) extends Base -case class Dummy280(x: Int) extends Base -case class Dummy281(x: Int) extends Base -case class Dummy282(x: Int) extends Base -case class Dummy283(x: Int) extends Base -case class Dummy284(x: Int) extends Base -case class Dummy285(x: Int) extends Base -case class Dummy286(x: Int) extends Base -case class Dummy287(x: Int) extends Base -case class Dummy288(x: Int) extends Base -case class Dummy289(x: Int) extends Base -case class Dummy290(x: Int) extends Base -case class Dummy291(x: Int) extends Base -case class Dummy292(x: Int) extends Base -case class Dummy293(x: Int) extends Base -case class Dummy294(x: Int) extends Base -case class Dummy295(x: Int) extends Base -case class Dummy296(x: Int) extends Base -case class Dummy297(x: Int) extends Base -case class Dummy298(x: Int) extends Base -case class Dummy299(x: Int) extends Base -case class Dummy300(x: Int) extends Base -case class Dummy301(x: Int) extends Base -case class Dummy302(x: Int) extends Base -case class Dummy303(x: Int) extends Base -case class Dummy304(x: Int) extends Base -case class Dummy305(x: Int) extends Base -case class Dummy306(x: Int) extends Base -case class Dummy307(x: Int) extends Base -case class Dummy308(x: Int) extends Base -case class Dummy309(x: Int) extends Base -case class Dummy310(x: Int) extends Base -case class Dummy311(x: Int) extends Base -case class Dummy312(x: Int) extends Base -case class Dummy313(x: Int) extends Base -case class Dummy314(x: Int) extends Base -case class Dummy315(x: Int) extends Base -case class Dummy316(x: Int) extends Base -case class Dummy317(x: Int) extends Base -case class Dummy318(x: Int) extends Base -case class Dummy319(x: Int) extends Base -case class Dummy320(x: Int) extends Base -case class Dummy321(x: Int) extends Base -case class Dummy322(x: Int) extends Base -case class Dummy323(x: Int) extends Base -case class Dummy324(x: Int) extends Base -case class Dummy325(x: Int) extends Base -case class Dummy326(x: Int) extends Base -case class Dummy327(x: Int) extends Base -case class Dummy328(x: Int) extends Base -case class Dummy329(x: Int) extends Base -case class Dummy330(x: Int) extends Base -case class Dummy331(x: Int) extends Base -case class Dummy332(x: Int) extends Base -case class Dummy333(x: Int) extends Base -case class Dummy334(x: Int) extends Base -case class Dummy335(x: Int) extends Base -case class Dummy336(x: Int) extends Base -case class Dummy337(x: Int) extends Base -case class Dummy338(x: Int) extends Base -case class Dummy339(x: Int) extends Base -case class Dummy340(x: Int) extends Base -case class Dummy341(x: Int) extends Base -case class Dummy342(x: Int) extends Base -case class Dummy343(x: Int) extends Base -case class Dummy344(x: Int) extends Base -case class Dummy345(x: Int) extends Base -case class Dummy346(x: Int) extends Base -case class Dummy347(x: Int) extends Base -case class Dummy348(x: Int) extends Base -case class Dummy349(x: Int) extends Base -case class Dummy350(x: Int) extends Base -case class Dummy351(x: Int) extends Base -case class Dummy352(x: Int) extends Base -case class Dummy353(x: Int) extends Base -case class Dummy354(x: Int) extends Base -case class Dummy355(x: Int) extends Base -case class Dummy356(x: Int) extends Base -case class Dummy357(x: Int) extends Base -case class Dummy358(x: Int) extends Base -case class Dummy359(x: Int) extends Base -case class Dummy360(x: Int) extends Base -case class Dummy361(x: Int) extends Base -case class Dummy362(x: Int) extends Base -case class Dummy363(x: Int) extends Base -case class Dummy364(x: Int) extends Base -case class Dummy365(x: Int) extends Base -case class Dummy366(x: Int) extends Base -case class Dummy367(x: Int) extends Base -case class Dummy368(x: Int) extends Base -case class Dummy369(x: Int) extends Base -case class Dummy370(x: Int) extends Base -case class Dummy371(x: Int) extends Base -case class Dummy372(x: Int) extends Base -case class Dummy373(x: Int) extends Base -case class Dummy374(x: Int) extends Base -case class Dummy375(x: Int) extends Base -case class Dummy376(x: Int) extends Base -case class Dummy377(x: Int) extends Base -case class Dummy378(x: Int) extends Base -case class Dummy379(x: Int) extends Base -case class Dummy380(x: Int) extends Base -case class Dummy381(x: Int) extends Base -case class Dummy382(x: Int) extends Base -case class Dummy383(x: Int) extends Base -case class Dummy384(x: Int) extends Base -case class Dummy385(x: Int) extends Base -case class Dummy386(x: Int) extends Base -case class Dummy387(x: Int) extends Base -case class Dummy388(x: Int) extends Base -case class Dummy389(x: Int) extends Base -case class Dummy390(x: Int) extends Base -case class Dummy391(x: Int) extends Base -case class Dummy392(x: Int) extends Base -case class Dummy393(x: Int) extends Base -case class Dummy394(x: Int) extends Base -case class Dummy395(x: Int) extends Base -case class Dummy396(x: Int) extends Base -case class Dummy397(x: Int) extends Base -case class Dummy398(x: Int) extends Base -case class Dummy399(x: Int) extends Base -case class Dummy400(x: Int) extends Base -case class Dummy401(x: Int) extends Base -case class Dummy402(x: Int) extends Base -case class Dummy403(x: Int) extends Base -case class Dummy404(x: Int) extends Base -case class Dummy405(x: Int) extends Base -case class Dummy406(x: Int) extends Base -case class Dummy407(x: Int) extends Base -case class Dummy408(x: Int) extends Base -case class Dummy409(x: Int) extends Base -case class Dummy410(x: Int) extends Base -case class Dummy411(x: Int) extends Base -case class Dummy412(x: Int) extends Base -case class Dummy413(x: Int) extends Base -case class Dummy414(x: Int) extends Base -case class Dummy415(x: Int) extends Base -case class Dummy416(x: Int) extends Base -case class Dummy417(x: Int) extends Base -case class Dummy418(x: Int) extends Base -case class Dummy419(x: Int) extends Base -case class Dummy420(x: Int) extends Base -case class Dummy421(x: Int) extends Base -case class Dummy422(x: Int) extends Base -case class Dummy423(x: Int) extends Base -case class Dummy424(x: Int) extends Base -case class Dummy425(x: Int) extends Base -case class Dummy426(x: Int) extends Base -case class Dummy427(x: Int) extends Base -case class Dummy428(x: Int) extends Base -case class Dummy429(x: Int) extends Base -case class Dummy430(x: Int) extends Base -case class Dummy431(x: Int) extends Base -case class Dummy432(x: Int) extends Base -case class Dummy433(x: Int) extends Base -case class Dummy434(x: Int) extends Base -case class Dummy435(x: Int) extends Base -case class Dummy436(x: Int) extends Base -case class Dummy437(x: Int) extends Base -case class Dummy438(x: Int) extends Base -case class Dummy439(x: Int) extends Base -case class Dummy440(x: Int) extends Base -case class Dummy441(x: Int) extends Base -case class Dummy442(x: Int) extends Base -case class Dummy443(x: Int) extends Base -case class Dummy444(x: Int) extends Base -case class Dummy445(x: Int) extends Base -case class Dummy446(x: Int) extends Base -case class Dummy447(x: Int) extends Base -case class Dummy448(x: Int) extends Base -case class Dummy449(x: Int) extends Base -case class Dummy450(x: Int) extends Base -case class Dummy451(x: Int) extends Base -case class Dummy452(x: Int) extends Base -case class Dummy453(x: Int) extends Base -case class Dummy454(x: Int) extends Base -case class Dummy455(x: Int) extends Base -case class Dummy456(x: Int) extends Base -case class Dummy457(x: Int) extends Base -case class Dummy458(x: Int) extends Base -case class Dummy459(x: Int) extends Base -case class Dummy460(x: Int) extends Base -case class Dummy461(x: Int) extends Base -case class Dummy462(x: Int) extends Base -case class Dummy463(x: Int) extends Base -case class Dummy464(x: Int) extends Base -case class Dummy465(x: Int) extends Base -case class Dummy466(x: Int) extends Base -case class Dummy467(x: Int) extends Base -case class Dummy468(x: Int) extends Base -case class Dummy469(x: Int) extends Base -case class Dummy470(x: Int) extends Base -case class Dummy471(x: Int) extends Base -case class Dummy472(x: Int) extends Base -case class Dummy473(x: Int) extends Base -case class Dummy474(x: Int) extends Base -case class Dummy475(x: Int) extends Base -case class Dummy476(x: Int) extends Base -case class Dummy477(x: Int) extends Base -case class Dummy478(x: Int) extends Base -case class Dummy479(x: Int) extends Base -case class Dummy480(x: Int) extends Base -case class Dummy481(x: Int) extends Base -case class Dummy482(x: Int) extends Base -case class Dummy483(x: Int) extends Base -case class Dummy484(x: Int) extends Base -case class Dummy485(x: Int) extends Base -case class Dummy486(x: Int) extends Base -case class Dummy487(x: Int) extends Base -case class Dummy488(x: Int) extends Base -case class Dummy489(x: Int) extends Base -case class Dummy490(x: Int) extends Base -case class Dummy491(x: Int) extends Base -case class Dummy492(x: Int) extends Base -case class Dummy493(x: Int) extends Base -case class Dummy494(x: Int) extends Base -case class Dummy495(x: Int) extends Base -case class Dummy496(x: Int) extends Base -case class Dummy497(x: Int) extends Base -case class Dummy498(x: Int) extends Base -case class Dummy499(x: Int) extends Base -case class Dummy500(x: Int) extends Base -case class Dummy501(x: Int) extends Base -case class Dummy502(x: Int) extends Base -case class Dummy503(x: Int) extends Base -case class Dummy504(x: Int) extends Base -case class Dummy505(x: Int) extends Base -case class Dummy506(x: Int) extends Base -case class Dummy507(x: Int) extends Base -case class Dummy508(x: Int) extends Base -case class Dummy509(x: Int) extends Base -case class Dummy510(x: Int) extends Base -case class Dummy511(x: Int) extends Base -case class Dummy512(x: Int) extends Base -case class Dummy513(x: Int) extends Base -case class Dummy514(x: Int) extends Base -case class Dummy515(x: Int) extends Base -case class Dummy516(x: Int) extends Base -case class Dummy517(x: Int) extends Base -case class Dummy518(x: Int) extends Base -case class Dummy519(x: Int) extends Base -case class Dummy520(x: Int) extends Base -case class Dummy521(x: Int) extends Base -case class Dummy522(x: Int) extends Base -case class Dummy523(x: Int) extends Base -case class Dummy524(x: Int) extends Base -case class Dummy525(x: Int) extends Base -case class Dummy526(x: Int) extends Base -case class Dummy527(x: Int) extends Base -case class Dummy528(x: Int) extends Base -case class Dummy529(x: Int) extends Base -case class Dummy530(x: Int) extends Base -case class Dummy531(x: Int) extends Base -case class Dummy532(x: Int) extends Base -case class Dummy533(x: Int) extends Base -case class Dummy534(x: Int) extends Base -case class Dummy535(x: Int) extends Base -case class Dummy536(x: Int) extends Base -case class Dummy537(x: Int) extends Base -case class Dummy538(x: Int) extends Base -case class Dummy539(x: Int) extends Base -case class Dummy540(x: Int) extends Base -case class Dummy541(x: Int) extends Base -case class Dummy542(x: Int) extends Base -case class Dummy543(x: Int) extends Base -case class Dummy544(x: Int) extends Base -case class Dummy545(x: Int) extends Base -case class Dummy546(x: Int) extends Base -case class Dummy547(x: Int) extends Base -case class Dummy548(x: Int) extends Base -case class Dummy549(x: Int) extends Base -case class Dummy550(x: Int) extends Base -case class Dummy551(x: Int) extends Base -case class Dummy552(x: Int) extends Base -case class Dummy553(x: Int) extends Base -case class Dummy554(x: Int) extends Base -case class Dummy555(x: Int) extends Base -case class Dummy556(x: Int) extends Base -case class Dummy557(x: Int) extends Base -case class Dummy558(x: Int) extends Base -case class Dummy559(x: Int) extends Base -case class Dummy560(x: Int) extends Base -case class Dummy561(x: Int) extends Base -case class Dummy562(x: Int) extends Base -case class Dummy563(x: Int) extends Base -case class Dummy564(x: Int) extends Base -case class Dummy565(x: Int) extends Base -case class Dummy566(x: Int) extends Base -case class Dummy567(x: Int) extends Base -case class Dummy568(x: Int) extends Base -case class Dummy569(x: Int) extends Base -case class Dummy570(x: Int) extends Base -case class Dummy571(x: Int) extends Base -case class Dummy572(x: Int) extends Base -case class Dummy573(x: Int) extends Base -case class Dummy574(x: Int) extends Base -case class Dummy575(x: Int) extends Base -case class Dummy576(x: Int) extends Base -case class Dummy577(x: Int) extends Base -case class Dummy578(x: Int) extends Base -case class Dummy579(x: Int) extends Base -case class Dummy580(x: Int) extends Base -case class Dummy581(x: Int) extends Base -case class Dummy582(x: Int) extends Base -case class Dummy583(x: Int) extends Base -case class Dummy584(x: Int) extends Base -case class Dummy585(x: Int) extends Base -case class Dummy586(x: Int) extends Base -case class Dummy587(x: Int) extends Base -case class Dummy588(x: Int) extends Base -case class Dummy589(x: Int) extends Base -case class Dummy590(x: Int) extends Base -case class Dummy591(x: Int) extends Base -case class Dummy592(x: Int) extends Base -case class Dummy593(x: Int) extends Base -case class Dummy594(x: Int) extends Base -case class Dummy595(x: Int) extends Base -case class Dummy596(x: Int) extends Base -case class Dummy597(x: Int) extends Base -case class Dummy598(x: Int) extends Base -case class Dummy599(x: Int) extends Base -case class Dummy600(x: Int) extends Base -case class Dummy601(x: Int) extends Base -case class Dummy602(x: Int) extends Base -case class Dummy603(x: Int) extends Base -case class Dummy604(x: Int) extends Base -case class Dummy605(x: Int) extends Base -case class Dummy606(x: Int) extends Base -case class Dummy607(x: Int) extends Base -case class Dummy608(x: Int) extends Base -case class Dummy609(x: Int) extends Base -case class Dummy610(x: Int) extends Base -case class Dummy611(x: Int) extends Base -case class Dummy612(x: Int) extends Base -case class Dummy613(x: Int) extends Base -case class Dummy614(x: Int) extends Base -case class Dummy615(x: Int) extends Base -case class Dummy616(x: Int) extends Base -case class Dummy617(x: Int) extends Base -case class Dummy618(x: Int) extends Base -case class Dummy619(x: Int) extends Base -case class Dummy620(x: Int) extends Base -case class Dummy621(x: Int) extends Base -case class Dummy622(x: Int) extends Base -case class Dummy623(x: Int) extends Base -case class Dummy624(x: Int) extends Base -case class Dummy625(x: Int) extends Base -case class Dummy626(x: Int) extends Base -case class Dummy627(x: Int) extends Base -case class Dummy628(x: Int) extends Base -case class Dummy629(x: Int) extends Base -case class Dummy630(x: Int) extends Base -case class Dummy631(x: Int) extends Base -case class Dummy632(x: Int) extends Base -case class Dummy633(x: Int) extends Base -case class Dummy634(x: Int) extends Base -case class Dummy635(x: Int) extends Base -case class Dummy636(x: Int) extends Base -case class Dummy637(x: Int) extends Base -case class Dummy638(x: Int) extends Base -case class Dummy639(x: Int) extends Base -case class Dummy640(x: Int) extends Base -case class Dummy641(x: Int) extends Base -case class Dummy642(x: Int) extends Base -case class Dummy643(x: Int) extends Base -case class Dummy644(x: Int) extends Base -case class Dummy645(x: Int) extends Base -case class Dummy646(x: Int) extends Base -case class Dummy647(x: Int) extends Base -case class Dummy648(x: Int) extends Base -case class Dummy649(x: Int) extends Base -case class Dummy650(x: Int) extends Base -case class Dummy651(x: Int) extends Base -case class Dummy652(x: Int) extends Base -case class Dummy653(x: Int) extends Base -case class Dummy654(x: Int) extends Base -case class Dummy655(x: Int) extends Base -case class Dummy656(x: Int) extends Base -case class Dummy657(x: Int) extends Base -case class Dummy658(x: Int) extends Base -case class Dummy659(x: Int) extends Base -case class Dummy660(x: Int) extends Base -case class Dummy661(x: Int) extends Base -case class Dummy662(x: Int) extends Base -case class Dummy663(x: Int) extends Base -case class Dummy664(x: Int) extends Base -case class Dummy665(x: Int) extends Base -case class Dummy666(x: Int) extends Base -case class Dummy667(x: Int) extends Base -case class Dummy668(x: Int) extends Base -case class Dummy669(x: Int) extends Base -case class Dummy670(x: Int) extends Base -case class Dummy671(x: Int) extends Base -case class Dummy672(x: Int) extends Base -case class Dummy673(x: Int) extends Base -case class Dummy674(x: Int) extends Base -case class Dummy675(x: Int) extends Base -case class Dummy676(x: Int) extends Base -case class Dummy677(x: Int) extends Base -case class Dummy678(x: Int) extends Base -case class Dummy679(x: Int) extends Base -case class Dummy680(x: Int) extends Base -case class Dummy681(x: Int) extends Base -case class Dummy682(x: Int) extends Base -case class Dummy683(x: Int) extends Base -case class Dummy684(x: Int) extends Base -case class Dummy685(x: Int) extends Base -case class Dummy686(x: Int) extends Base -case class Dummy687(x: Int) extends Base -case class Dummy688(x: Int) extends Base -case class Dummy689(x: Int) extends Base -case class Dummy690(x: Int) extends Base -case class Dummy691(x: Int) extends Base -case class Dummy692(x: Int) extends Base -case class Dummy693(x: Int) extends Base -case class Dummy694(x: Int) extends Base -case class Dummy695(x: Int) extends Base -case class Dummy696(x: Int) extends Base -case class Dummy697(x: Int) extends Base -case class Dummy698(x: Int) extends Base -case class Dummy699(x: Int) extends Base -case class Dummy700(x: Int) extends Base -case class Dummy701(x: Int) extends Base -case class Dummy702(x: Int) extends Base -case class Dummy703(x: Int) extends Base -case class Dummy704(x: Int) extends Base -case class Dummy705(x: Int) extends Base -case class Dummy706(x: Int) extends Base -case class Dummy707(x: Int) extends Base -case class Dummy708(x: Int) extends Base -case class Dummy709(x: Int) extends Base -case class Dummy710(x: Int) extends Base -case class Dummy711(x: Int) extends Base -case class Dummy712(x: Int) extends Base -case class Dummy713(x: Int) extends Base -case class Dummy714(x: Int) extends Base -case class Dummy715(x: Int) extends Base -case class Dummy716(x: Int) extends Base -case class Dummy717(x: Int) extends Base -case class Dummy718(x: Int) extends Base -case class Dummy719(x: Int) extends Base -case class Dummy720(x: Int) extends Base -case class Dummy721(x: Int) extends Base -case class Dummy722(x: Int) extends Base -case class Dummy723(x: Int) extends Base -case class Dummy724(x: Int) extends Base -case class Dummy725(x: Int) extends Base -case class Dummy726(x: Int) extends Base -case class Dummy727(x: Int) extends Base -case class Dummy728(x: Int) extends Base -case class Dummy729(x: Int) extends Base -case class Dummy730(x: Int) extends Base -case class Dummy731(x: Int) extends Base -case class Dummy732(x: Int) extends Base -case class Dummy733(x: Int) extends Base -case class Dummy734(x: Int) extends Base -case class Dummy735(x: Int) extends Base -case class Dummy736(x: Int) extends Base -case class Dummy737(x: Int) extends Base -case class Dummy738(x: Int) extends Base -case class Dummy739(x: Int) extends Base -case class Dummy740(x: Int) extends Base -case class Dummy741(x: Int) extends Base -case class Dummy742(x: Int) extends Base -case class Dummy743(x: Int) extends Base -case class Dummy744(x: Int) extends Base -case class Dummy745(x: Int) extends Base -case class Dummy746(x: Int) extends Base -case class Dummy747(x: Int) extends Base -case class Dummy748(x: Int) extends Base -case class Dummy749(x: Int) extends Base -case class Dummy750(x: Int) extends Base -case class Dummy751(x: Int) extends Base -case class Dummy752(x: Int) extends Base -case class Dummy753(x: Int) extends Base -case class Dummy754(x: Int) extends Base -case class Dummy755(x: Int) extends Base -case class Dummy756(x: Int) extends Base -case class Dummy757(x: Int) extends Base -case class Dummy758(x: Int) extends Base -case class Dummy759(x: Int) extends Base -case class Dummy760(x: Int) extends Base -case class Dummy761(x: Int) extends Base -case class Dummy762(x: Int) extends Base -case class Dummy763(x: Int) extends Base -case class Dummy764(x: Int) extends Base -case class Dummy765(x: Int) extends Base -case class Dummy766(x: Int) extends Base -case class Dummy767(x: Int) extends Base -case class Dummy768(x: Int) extends Base -case class Dummy769(x: Int) extends Base -case class Dummy770(x: Int) extends Base -case class Dummy771(x: Int) extends Base -case class Dummy772(x: Int) extends Base -case class Dummy773(x: Int) extends Base -case class Dummy774(x: Int) extends Base -case class Dummy775(x: Int) extends Base -case class Dummy776(x: Int) extends Base -case class Dummy777(x: Int) extends Base -case class Dummy778(x: Int) extends Base -case class Dummy779(x: Int) extends Base -case class Dummy780(x: Int) extends Base -case class Dummy781(x: Int) extends Base -case class Dummy782(x: Int) extends Base -case class Dummy783(x: Int) extends Base -case class Dummy784(x: Int) extends Base -case class Dummy785(x: Int) extends Base -case class Dummy786(x: Int) extends Base -case class Dummy787(x: Int) extends Base -case class Dummy788(x: Int) extends Base -case class Dummy789(x: Int) extends Base -case class Dummy790(x: Int) extends Base -case class Dummy791(x: Int) extends Base -case class Dummy792(x: Int) extends Base -case class Dummy793(x: Int) extends Base -case class Dummy794(x: Int) extends Base -case class Dummy795(x: Int) extends Base -case class Dummy796(x: Int) extends Base -case class Dummy797(x: Int) extends Base -case class Dummy798(x: Int) extends Base -case class Dummy799(x: Int) extends Base -case class Dummy800(x: Int) extends Base -case class Dummy801(x: Int) extends Base -case class Dummy802(x: Int) extends Base -case class Dummy803(x: Int) extends Base -case class Dummy804(x: Int) extends Base -case class Dummy805(x: Int) extends Base -case class Dummy806(x: Int) extends Base -case class Dummy807(x: Int) extends Base -case class Dummy808(x: Int) extends Base -case class Dummy809(x: Int) extends Base -case class Dummy810(x: Int) extends Base -case class Dummy811(x: Int) extends Base -case class Dummy812(x: Int) extends Base -case class Dummy813(x: Int) extends Base -case class Dummy814(x: Int) extends Base -case class Dummy815(x: Int) extends Base -case class Dummy816(x: Int) extends Base -case class Dummy817(x: Int) extends Base -case class Dummy818(x: Int) extends Base -case class Dummy819(x: Int) extends Base -case class Dummy820(x: Int) extends Base -case class Dummy821(x: Int) extends Base -case class Dummy822(x: Int) extends Base -case class Dummy823(x: Int) extends Base -case class Dummy824(x: Int) extends Base -case class Dummy825(x: Int) extends Base -case class Dummy826(x: Int) extends Base -case class Dummy827(x: Int) extends Base -case class Dummy828(x: Int) extends Base -case class Dummy829(x: Int) extends Base -case class Dummy830(x: Int) extends Base -case class Dummy831(x: Int) extends Base -case class Dummy832(x: Int) extends Base -case class Dummy833(x: Int) extends Base -case class Dummy834(x: Int) extends Base -case class Dummy835(x: Int) extends Base -case class Dummy836(x: Int) extends Base -case class Dummy837(x: Int) extends Base -case class Dummy838(x: Int) extends Base -case class Dummy839(x: Int) extends Base -case class Dummy840(x: Int) extends Base -case class Dummy841(x: Int) extends Base -case class Dummy842(x: Int) extends Base -case class Dummy843(x: Int) extends Base -case class Dummy844(x: Int) extends Base -case class Dummy845(x: Int) extends Base -case class Dummy846(x: Int) extends Base -case class Dummy847(x: Int) extends Base -case class Dummy848(x: Int) extends Base -case class Dummy849(x: Int) extends Base -case class Dummy850(x: Int) extends Base -case class Dummy851(x: Int) extends Base -case class Dummy852(x: Int) extends Base -case class Dummy853(x: Int) extends Base -case class Dummy854(x: Int) extends Base -case class Dummy855(x: Int) extends Base -case class Dummy856(x: Int) extends Base -case class Dummy857(x: Int) extends Base -case class Dummy858(x: Int) extends Base -case class Dummy859(x: Int) extends Base -case class Dummy860(x: Int) extends Base -case class Dummy861(x: Int) extends Base -case class Dummy862(x: Int) extends Base -case class Dummy863(x: Int) extends Base -case class Dummy864(x: Int) extends Base -case class Dummy865(x: Int) extends Base -case class Dummy866(x: Int) extends Base -case class Dummy867(x: Int) extends Base -case class Dummy868(x: Int) extends Base -case class Dummy869(x: Int) extends Base -case class Dummy870(x: Int) extends Base -case class Dummy871(x: Int) extends Base -case class Dummy872(x: Int) extends Base -case class Dummy873(x: Int) extends Base -case class Dummy874(x: Int) extends Base -case class Dummy875(x: Int) extends Base -case class Dummy876(x: Int) extends Base -case class Dummy877(x: Int) extends Base -case class Dummy878(x: Int) extends Base -case class Dummy879(x: Int) extends Base -case class Dummy880(x: Int) extends Base -case class Dummy881(x: Int) extends Base -case class Dummy882(x: Int) extends Base -case class Dummy883(x: Int) extends Base -case class Dummy884(x: Int) extends Base -case class Dummy885(x: Int) extends Base -case class Dummy886(x: Int) extends Base -case class Dummy887(x: Int) extends Base -case class Dummy888(x: Int) extends Base -case class Dummy889(x: Int) extends Base -case class Dummy890(x: Int) extends Base -case class Dummy891(x: Int) extends Base -case class Dummy892(x: Int) extends Base -case class Dummy893(x: Int) extends Base -case class Dummy894(x: Int) extends Base -case class Dummy895(x: Int) extends Base -case class Dummy896(x: Int) extends Base -case class Dummy897(x: Int) extends Base -case class Dummy898(x: Int) extends Base -case class Dummy899(x: Int) extends Base -case class Dummy900(x: Int) extends Base -case class Dummy901(x: Int) extends Base -case class Dummy902(x: Int) extends Base -case class Dummy903(x: Int) extends Base -case class Dummy904(x: Int) extends Base -case class Dummy905(x: Int) extends Base -case class Dummy906(x: Int) extends Base -case class Dummy907(x: Int) extends Base -case class Dummy908(x: Int) extends Base -case class Dummy909(x: Int) extends Base -case class Dummy910(x: Int) extends Base -case class Dummy911(x: Int) extends Base -case class Dummy912(x: Int) extends Base -case class Dummy913(x: Int) extends Base -case class Dummy914(x: Int) extends Base -case class Dummy915(x: Int) extends Base -case class Dummy916(x: Int) extends Base -case class Dummy917(x: Int) extends Base -case class Dummy918(x: Int) extends Base -case class Dummy919(x: Int) extends Base -case class Dummy920(x: Int) extends Base -case class Dummy921(x: Int) extends Base -case class Dummy922(x: Int) extends Base -case class Dummy923(x: Int) extends Base -case class Dummy924(x: Int) extends Base -case class Dummy925(x: Int) extends Base -case class Dummy926(x: Int) extends Base -case class Dummy927(x: Int) extends Base -case class Dummy928(x: Int) extends Base -case class Dummy929(x: Int) extends Base -case class Dummy930(x: Int) extends Base -case class Dummy931(x: Int) extends Base -case class Dummy932(x: Int) extends Base -case class Dummy933(x: Int) extends Base -case class Dummy934(x: Int) extends Base -case class Dummy935(x: Int) extends Base -case class Dummy936(x: Int) extends Base -case class Dummy937(x: Int) extends Base -case class Dummy938(x: Int) extends Base -case class Dummy939(x: Int) extends Base -case class Dummy940(x: Int) extends Base -case class Dummy941(x: Int) extends Base -case class Dummy942(x: Int) extends Base -case class Dummy943(x: Int) extends Base -case class Dummy944(x: Int) extends Base -case class Dummy945(x: Int) extends Base -case class Dummy946(x: Int) extends Base -case class Dummy947(x: Int) extends Base -case class Dummy948(x: Int) extends Base -case class Dummy949(x: Int) extends Base -case class Dummy950(x: Int) extends Base -case class Dummy951(x: Int) extends Base -case class Dummy952(x: Int) extends Base -case class Dummy953(x: Int) extends Base -case class Dummy954(x: Int) extends Base -case class Dummy955(x: Int) extends Base -case class Dummy956(x: Int) extends Base -case class Dummy957(x: Int) extends Base -case class Dummy958(x: Int) extends Base -case class Dummy959(x: Int) extends Base -case class Dummy960(x: Int) extends Base -case class Dummy961(x: Int) extends Base -case class Dummy962(x: Int) extends Base -case class Dummy963(x: Int) extends Base -case class Dummy964(x: Int) extends Base -case class Dummy965(x: Int) extends Base -case class Dummy966(x: Int) extends Base -case class Dummy967(x: Int) extends Base -case class Dummy968(x: Int) extends Base -case class Dummy969(x: Int) extends Base -case class Dummy970(x: Int) extends Base -case class Dummy971(x: Int) extends Base -case class Dummy972(x: Int) extends Base -case class Dummy973(x: Int) extends Base -case class Dummy974(x: Int) extends Base -case class Dummy975(x: Int) extends Base -case class Dummy976(x: Int) extends Base -case class Dummy977(x: Int) extends Base -case class Dummy978(x: Int) extends Base -case class Dummy979(x: Int) extends Base -case class Dummy980(x: Int) extends Base -case class Dummy981(x: Int) extends Base -case class Dummy982(x: Int) extends Base -case class Dummy983(x: Int) extends Base -case class Dummy984(x: Int) extends Base -case class Dummy985(x: Int) extends Base -case class Dummy986(x: Int) extends Base -case class Dummy987(x: Int) extends Base -case class Dummy988(x: Int) extends Base -case class Dummy989(x: Int) extends Base -case class Dummy990(x: Int) extends Base -case class Dummy991(x: Int) extends Base -case class Dummy992(x: Int) extends Base -case class Dummy993(x: Int) extends Base -case class Dummy994(x: Int) extends Base -case class Dummy995(x: Int) extends Base -case class Dummy996(x: Int) extends Base -case class Dummy997(x: Int) extends Base -case class Dummy998(x: Int) extends Base -case class Dummy999(x: Int) extends Base -case class Dummy1000(x: Int) extends Base -case class Dummy1001(x: Int) extends Base -case class Dummy1002(x: Int) extends Base -case class Dummy1003(x: Int) extends Base -case class Dummy1004(x: Int) extends Base -case class Dummy1005(x: Int) extends Base -case class Dummy1006(x: Int) extends Base -case class Dummy1007(x: Int) extends Base -case class Dummy1008(x: Int) extends Base -case class Dummy1009(x: Int) extends Base -case class Dummy1010(x: Int) extends Base -case class Dummy1011(x: Int) extends Base -case class Dummy1012(x: Int) extends Base -case class Dummy1013(x: Int) extends Base -case class Dummy1014(x: Int) extends Base -case class Dummy1015(x: Int) extends Base -case class Dummy1016(x: Int) extends Base -case class Dummy1017(x: Int) extends Base -case class Dummy1018(x: Int) extends Base -case class Dummy1019(x: Int) extends Base -case class Dummy1020(x: Int) extends Base -case class Dummy1021(x: Int) extends Base -case class Dummy1022(x: Int) extends Base -case class Dummy1023(x: Int) extends Base -case class Dummy1024(x: Int) extends Base -case class Dummy1025(x: Int) extends Base -case class Dummy1026(x: Int) extends Base -case class Dummy1027(x: Int) extends Base -case class Dummy1028(x: Int) extends Base -case class Dummy1029(x: Int) extends Base -case class Dummy1030(x: Int) extends Base -case class Dummy1031(x: Int) extends Base -case class Dummy1032(x: Int) extends Base -case class Dummy1033(x: Int) extends Base -case class Dummy1034(x: Int) extends Base -case class Dummy1035(x: Int) extends Base -case class Dummy1036(x: Int) extends Base -case class Dummy1037(x: Int) extends Base -case class Dummy1038(x: Int) extends Base -case class Dummy1039(x: Int) extends Base -case class Dummy1040(x: Int) extends Base -case class Dummy1041(x: Int) extends Base -case class Dummy1042(x: Int) extends Base -case class Dummy1043(x: Int) extends Base -case class Dummy1044(x: Int) extends Base -case class Dummy1045(x: Int) extends Base -case class Dummy1046(x: Int) extends Base -case class Dummy1047(x: Int) extends Base -case class Dummy1048(x: Int) extends Base -case class Dummy1049(x: Int) extends Base -case class Dummy1050(x: Int) extends Base -case class Dummy1051(x: Int) extends Base -case class Dummy1052(x: Int) extends Base -case class Dummy1053(x: Int) extends Base -case class Dummy1054(x: Int) extends Base -case class Dummy1055(x: Int) extends Base -case class Dummy1056(x: Int) extends Base -case class Dummy1057(x: Int) extends Base -case class Dummy1058(x: Int) extends Base -case class Dummy1059(x: Int) extends Base -case class Dummy1060(x: Int) extends Base -case class Dummy1061(x: Int) extends Base -case class Dummy1062(x: Int) extends Base -case class Dummy1063(x: Int) extends Base -case class Dummy1064(x: Int) extends Base -case class Dummy1065(x: Int) extends Base -case class Dummy1066(x: Int) extends Base -case class Dummy1067(x: Int) extends Base -case class Dummy1068(x: Int) extends Base -case class Dummy1069(x: Int) extends Base -case class Dummy1070(x: Int) extends Base -case class Dummy1071(x: Int) extends Base -case class Dummy1072(x: Int) extends Base -case class Dummy1073(x: Int) extends Base -case class Dummy1074(x: Int) extends Base -case class Dummy1075(x: Int) extends Base -case class Dummy1076(x: Int) extends Base -case class Dummy1077(x: Int) extends Base -case class Dummy1078(x: Int) extends Base -case class Dummy1079(x: Int) extends Base -case class Dummy1080(x: Int) extends Base -case class Dummy1081(x: Int) extends Base -case class Dummy1082(x: Int) extends Base -case class Dummy1083(x: Int) extends Base -case class Dummy1084(x: Int) extends Base -case class Dummy1085(x: Int) extends Base -case class Dummy1086(x: Int) extends Base -case class Dummy1087(x: Int) extends Base -case class Dummy1088(x: Int) extends Base -case class Dummy1089(x: Int) extends Base -case class Dummy1090(x: Int) extends Base -case class Dummy1091(x: Int) extends Base -case class Dummy1092(x: Int) extends Base -case class Dummy1093(x: Int) extends Base -case class Dummy1094(x: Int) extends Base -case class Dummy1095(x: Int) extends Base -case class Dummy1096(x: Int) extends Base -case class Dummy1097(x: Int) extends Base -case class Dummy1098(x: Int) extends Base -case class Dummy1099(x: Int) extends Base -case class Dummy1100(x: Int) extends Base -case class Dummy1101(x: Int) extends Base -case class Dummy1102(x: Int) extends Base -case class Dummy1103(x: Int) extends Base -case class Dummy1104(x: Int) extends Base -case class Dummy1105(x: Int) extends Base -case class Dummy1106(x: Int) extends Base -case class Dummy1107(x: Int) extends Base -case class Dummy1108(x: Int) extends Base -case class Dummy1109(x: Int) extends Base -case class Dummy1110(x: Int) extends Base -case class Dummy1111(x: Int) extends Base -case class Dummy1112(x: Int) extends Base -case class Dummy1113(x: Int) extends Base -case class Dummy1114(x: Int) extends Base -case class Dummy1115(x: Int) extends Base -case class Dummy1116(x: Int) extends Base -case class Dummy1117(x: Int) extends Base -case class Dummy1118(x: Int) extends Base -case class Dummy1119(x: Int) extends Base -case class Dummy1120(x: Int) extends Base -case class Dummy1121(x: Int) extends Base -case class Dummy1122(x: Int) extends Base -case class Dummy1123(x: Int) extends Base -case class Dummy1124(x: Int) extends Base -case class Dummy1125(x: Int) extends Base -case class Dummy1126(x: Int) extends Base -case class Dummy1127(x: Int) extends Base -case class Dummy1128(x: Int) extends Base -case class Dummy1129(x: Int) extends Base -case class Dummy1130(x: Int) extends Base -case class Dummy1131(x: Int) extends Base -case class Dummy1132(x: Int) extends Base -case class Dummy1133(x: Int) extends Base -case class Dummy1134(x: Int) extends Base -case class Dummy1135(x: Int) extends Base -case class Dummy1136(x: Int) extends Base -case class Dummy1137(x: Int) extends Base -case class Dummy1138(x: Int) extends Base -case class Dummy1139(x: Int) extends Base -case class Dummy1140(x: Int) extends Base -case class Dummy1141(x: Int) extends Base -case class Dummy1142(x: Int) extends Base -case class Dummy1143(x: Int) extends Base -case class Dummy1144(x: Int) extends Base -case class Dummy1145(x: Int) extends Base -case class Dummy1146(x: Int) extends Base -case class Dummy1147(x: Int) extends Base -case class Dummy1148(x: Int) extends Base -case class Dummy1149(x: Int) extends Base -case class Dummy1150(x: Int) extends Base -case class Dummy1151(x: Int) extends Base -case class Dummy1152(x: Int) extends Base -case class Dummy1153(x: Int) extends Base -case class Dummy1154(x: Int) extends Base -case class Dummy1155(x: Int) extends Base -case class Dummy1156(x: Int) extends Base -case class Dummy1157(x: Int) extends Base -case class Dummy1158(x: Int) extends Base -case class Dummy1159(x: Int) extends Base -case class Dummy1160(x: Int) extends Base -case class Dummy1161(x: Int) extends Base -case class Dummy1162(x: Int) extends Base -case class Dummy1163(x: Int) extends Base -case class Dummy1164(x: Int) extends Base -case class Dummy1165(x: Int) extends Base -case class Dummy1166(x: Int) extends Base -case class Dummy1167(x: Int) extends Base -case class Dummy1168(x: Int) extends Base -case class Dummy1169(x: Int) extends Base -case class Dummy1170(x: Int) extends Base -case class Dummy1171(x: Int) extends Base -case class Dummy1172(x: Int) extends Base -case class Dummy1173(x: Int) extends Base -case class Dummy1174(x: Int) extends Base -case class Dummy1175(x: Int) extends Base -case class Dummy1176(x: Int) extends Base -case class Dummy1177(x: Int) extends Base -case class Dummy1178(x: Int) extends Base -case class Dummy1179(x: Int) extends Base -case class Dummy1180(x: Int) extends Base -case class Dummy1181(x: Int) extends Base -case class Dummy1182(x: Int) extends Base -case class Dummy1183(x: Int) extends Base -case class Dummy1184(x: Int) extends Base -case class Dummy1185(x: Int) extends Base -case class Dummy1186(x: Int) extends Base -case class Dummy1187(x: Int) extends Base -case class Dummy1188(x: Int) extends Base -case class Dummy1189(x: Int) extends Base -case class Dummy1190(x: Int) extends Base -case class Dummy1191(x: Int) extends Base -case class Dummy1192(x: Int) extends Base -case class Dummy1193(x: Int) extends Base -case class Dummy1194(x: Int) extends Base -case class Dummy1195(x: Int) extends Base -case class Dummy1196(x: Int) extends Base -case class Dummy1197(x: Int) extends Base -case class Dummy1198(x: Int) extends Base -case class Dummy1199(x: Int) extends Base -case class Dummy1200(x: Int) extends Base -case class Dummy1201(x: Int) extends Base -case class Dummy1202(x: Int) extends Base -case class Dummy1203(x: Int) extends Base -case class Dummy1204(x: Int) extends Base -case class Dummy1205(x: Int) extends Base -case class Dummy1206(x: Int) extends Base -case class Dummy1207(x: Int) extends Base -case class Dummy1208(x: Int) extends Base -case class Dummy1209(x: Int) extends Base -case class Dummy1210(x: Int) extends Base -case class Dummy1211(x: Int) extends Base -case class Dummy1212(x: Int) extends Base -case class Dummy1213(x: Int) extends Base -case class Dummy1214(x: Int) extends Base -case class Dummy1215(x: Int) extends Base -case class Dummy1216(x: Int) extends Base -case class Dummy1217(x: Int) extends Base -case class Dummy1218(x: Int) extends Base -case class Dummy1219(x: Int) extends Base -case class Dummy1220(x: Int) extends Base -case class Dummy1221(x: Int) extends Base -case class Dummy1222(x: Int) extends Base -case class Dummy1223(x: Int) extends Base -case class Dummy1224(x: Int) extends Base -case class Dummy1225(x: Int) extends Base -case class Dummy1226(x: Int) extends Base -case class Dummy1227(x: Int) extends Base -case class Dummy1228(x: Int) extends Base -case class Dummy1229(x: Int) extends Base -case class Dummy1230(x: Int) extends Base -case class Dummy1231(x: Int) extends Base -case class Dummy1232(x: Int) extends Base -case class Dummy1233(x: Int) extends Base -case class Dummy1234(x: Int) extends Base -case class Dummy1235(x: Int) extends Base -case class Dummy1236(x: Int) extends Base -case class Dummy1237(x: Int) extends Base -case class Dummy1238(x: Int) extends Base -case class Dummy1239(x: Int) extends Base -case class Dummy1240(x: Int) extends Base -case class Dummy1241(x: Int) extends Base -case class Dummy1242(x: Int) extends Base -case class Dummy1243(x: Int) extends Base -case class Dummy1244(x: Int) extends Base -case class Dummy1245(x: Int) extends Base -case class Dummy1246(x: Int) extends Base -case class Dummy1247(x: Int) extends Base -case class Dummy1248(x: Int) extends Base -case class Dummy1249(x: Int) extends Base -case class Dummy1250(x: Int) extends Base -case class Dummy1251(x: Int) extends Base -case class Dummy1252(x: Int) extends Base -case class Dummy1253(x: Int) extends Base -case class Dummy1254(x: Int) extends Base -case class Dummy1255(x: Int) extends Base -case class Dummy1256(x: Int) extends Base -case class Dummy1257(x: Int) extends Base -case class Dummy1258(x: Int) extends Base -case class Dummy1259(x: Int) extends Base -case class Dummy1260(x: Int) extends Base -case class Dummy1261(x: Int) extends Base -case class Dummy1262(x: Int) extends Base -case class Dummy1263(x: Int) extends Base -case class Dummy1264(x: Int) extends Base -case class Dummy1265(x: Int) extends Base -case class Dummy1266(x: Int) extends Base -case class Dummy1267(x: Int) extends Base -case class Dummy1268(x: Int) extends Base -case class Dummy1269(x: Int) extends Base -case class Dummy1270(x: Int) extends Base -case class Dummy1271(x: Int) extends Base -case class Dummy1272(x: Int) extends Base -case class Dummy1273(x: Int) extends Base -case class Dummy1274(x: Int) extends Base -case class Dummy1275(x: Int) extends Base -case class Dummy1276(x: Int) extends Base -case class Dummy1277(x: Int) extends Base -case class Dummy1278(x: Int) extends Base -case class Dummy1279(x: Int) extends Base -case class Dummy1280(x: Int) extends Base -case class Dummy1281(x: Int) extends Base -case class Dummy1282(x: Int) extends Base -case class Dummy1283(x: Int) extends Base -case class Dummy1284(x: Int) extends Base -case class Dummy1285(x: Int) extends Base -case class Dummy1286(x: Int) extends Base -case class Dummy1287(x: Int) extends Base -case class Dummy1288(x: Int) extends Base -case class Dummy1289(x: Int) extends Base -case class Dummy1290(x: Int) extends Base -case class Dummy1291(x: Int) extends Base -case class Dummy1292(x: Int) extends Base -case class Dummy1293(x: Int) extends Base -case class Dummy1294(x: Int) extends Base -case class Dummy1295(x: Int) extends Base -case class Dummy1296(x: Int) extends Base -case class Dummy1297(x: Int) extends Base -case class Dummy1298(x: Int) extends Base -case class Dummy1299(x: Int) extends Base -case class Dummy1300(x: Int) extends Base -case class Dummy1301(x: Int) extends Base -case class Dummy1302(x: Int) extends Base -case class Dummy1303(x: Int) extends Base -case class Dummy1304(x: Int) extends Base -case class Dummy1305(x: Int) extends Base -case class Dummy1306(x: Int) extends Base -case class Dummy1307(x: Int) extends Base -case class Dummy1308(x: Int) extends Base -case class Dummy1309(x: Int) extends Base -case class Dummy1310(x: Int) extends Base -case class Dummy1311(x: Int) extends Base -case class Dummy1312(x: Int) extends Base -case class Dummy1313(x: Int) extends Base -case class Dummy1314(x: Int) extends Base -case class Dummy1315(x: Int) extends Base -case class Dummy1316(x: Int) extends Base -case class Dummy1317(x: Int) extends Base -case class Dummy1318(x: Int) extends Base -case class Dummy1319(x: Int) extends Base -case class Dummy1320(x: Int) extends Base -case class Dummy1321(x: Int) extends Base -case class Dummy1322(x: Int) extends Base -case class Dummy1323(x: Int) extends Base -case class Dummy1324(x: Int) extends Base -case class Dummy1325(x: Int) extends Base -case class Dummy1326(x: Int) extends Base -case class Dummy1327(x: Int) extends Base -case class Dummy1328(x: Int) extends Base -case class Dummy1329(x: Int) extends Base -case class Dummy1330(x: Int) extends Base -case class Dummy1331(x: Int) extends Base -case class Dummy1332(x: Int) extends Base -case class Dummy1333(x: Int) extends Base -case class Dummy1334(x: Int) extends Base -case class Dummy1335(x: Int) extends Base -case class Dummy1336(x: Int) extends Base -case class Dummy1337(x: Int) extends Base -case class Dummy1338(x: Int) extends Base -case class Dummy1339(x: Int) extends Base -case class Dummy1340(x: Int) extends Base -case class Dummy1341(x: Int) extends Base -case class Dummy1342(x: Int) extends Base -case class Dummy1343(x: Int) extends Base -case class Dummy1344(x: Int) extends Base -case class Dummy1345(x: Int) extends Base -case class Dummy1346(x: Int) extends Base -case class Dummy1347(x: Int) extends Base -case class Dummy1348(x: Int) extends Base -case class Dummy1349(x: Int) extends Base -case class Dummy1350(x: Int) extends Base -case class Dummy1351(x: Int) extends Base -case class Dummy1352(x: Int) extends Base -case class Dummy1353(x: Int) extends Base -case class Dummy1354(x: Int) extends Base -case class Dummy1355(x: Int) extends Base -case class Dummy1356(x: Int) extends Base -case class Dummy1357(x: Int) extends Base -case class Dummy1358(x: Int) extends Base -case class Dummy1359(x: Int) extends Base -case class Dummy1360(x: Int) extends Base -case class Dummy1361(x: Int) extends Base -case class Dummy1362(x: Int) extends Base -case class Dummy1363(x: Int) extends Base -case class Dummy1364(x: Int) extends Base -case class Dummy1365(x: Int) extends Base -case class Dummy1366(x: Int) extends Base -case class Dummy1367(x: Int) extends Base -case class Dummy1368(x: Int) extends Base -case class Dummy1369(x: Int) extends Base -case class Dummy1370(x: Int) extends Base -case class Dummy1371(x: Int) extends Base -case class Dummy1372(x: Int) extends Base -case class Dummy1373(x: Int) extends Base -case class Dummy1374(x: Int) extends Base -case class Dummy1375(x: Int) extends Base -case class Dummy1376(x: Int) extends Base -case class Dummy1377(x: Int) extends Base -case class Dummy1378(x: Int) extends Base -case class Dummy1379(x: Int) extends Base -case class Dummy1380(x: Int) extends Base -case class Dummy1381(x: Int) extends Base -case class Dummy1382(x: Int) extends Base -case class Dummy1383(x: Int) extends Base -case class Dummy1384(x: Int) extends Base -case class Dummy1385(x: Int) extends Base -case class Dummy1386(x: Int) extends Base -case class Dummy1387(x: Int) extends Base -case class Dummy1388(x: Int) extends Base -case class Dummy1389(x: Int) extends Base -case class Dummy1390(x: Int) extends Base -case class Dummy1391(x: Int) extends Base -case class Dummy1392(x: Int) extends Base -case class Dummy1393(x: Int) extends Base -case class Dummy1394(x: Int) extends Base -case class Dummy1395(x: Int) extends Base -case class Dummy1396(x: Int) extends Base -case class Dummy1397(x: Int) extends Base -case class Dummy1398(x: Int) extends Base -case class Dummy1399(x: Int) extends Base -case class Dummy1400(x: Int) extends Base -case class Dummy1401(x: Int) extends Base -case class Dummy1402(x: Int) extends Base -case class Dummy1403(x: Int) extends Base -case class Dummy1404(x: Int) extends Base -case class Dummy1405(x: Int) extends Base -case class Dummy1406(x: Int) extends Base -case class Dummy1407(x: Int) extends Base -case class Dummy1408(x: Int) extends Base -case class Dummy1409(x: Int) extends Base -case class Dummy1410(x: Int) extends Base -case class Dummy1411(x: Int) extends Base -case class Dummy1412(x: Int) extends Base -case class Dummy1413(x: Int) extends Base -case class Dummy1414(x: Int) extends Base -case class Dummy1415(x: Int) extends Base -case class Dummy1416(x: Int) extends Base -case class Dummy1417(x: Int) extends Base -case class Dummy1418(x: Int) extends Base -case class Dummy1419(x: Int) extends Base -case class Dummy1420(x: Int) extends Base -case class Dummy1421(x: Int) extends Base -case class Dummy1422(x: Int) extends Base -case class Dummy1423(x: Int) extends Base -case class Dummy1424(x: Int) extends Base -case class Dummy1425(x: Int) extends Base -case class Dummy1426(x: Int) extends Base -case class Dummy1427(x: Int) extends Base -case class Dummy1428(x: Int) extends Base -case class Dummy1429(x: Int) extends Base -case class Dummy1430(x: Int) extends Base -case class Dummy1431(x: Int) extends Base -case class Dummy1432(x: Int) extends Base -case class Dummy1433(x: Int) extends Base -case class Dummy1434(x: Int) extends Base -case class Dummy1435(x: Int) extends Base -case class Dummy1436(x: Int) extends Base -case class Dummy1437(x: Int) extends Base -case class Dummy1438(x: Int) extends Base -case class Dummy1439(x: Int) extends Base -case class Dummy1440(x: Int) extends Base -case class Dummy1441(x: Int) extends Base -case class Dummy1442(x: Int) extends Base -case class Dummy1443(x: Int) extends Base -case class Dummy1444(x: Int) extends Base -case class Dummy1445(x: Int) extends Base -case class Dummy1446(x: Int) extends Base -case class Dummy1447(x: Int) extends Base -case class Dummy1448(x: Int) extends Base -case class Dummy1449(x: Int) extends Base -case class Dummy1450(x: Int) extends Base -case class Dummy1451(x: Int) extends Base -case class Dummy1452(x: Int) extends Base -case class Dummy1453(x: Int) extends Base -case class Dummy1454(x: Int) extends Base -case class Dummy1455(x: Int) extends Base -case class Dummy1456(x: Int) extends Base -case class Dummy1457(x: Int) extends Base -case class Dummy1458(x: Int) extends Base -case class Dummy1459(x: Int) extends Base -case class Dummy1460(x: Int) extends Base -case class Dummy1461(x: Int) extends Base -case class Dummy1462(x: Int) extends Base -case class Dummy1463(x: Int) extends Base -case class Dummy1464(x: Int) extends Base -case class Dummy1465(x: Int) extends Base -case class Dummy1466(x: Int) extends Base -case class Dummy1467(x: Int) extends Base -case class Dummy1468(x: Int) extends Base -case class Dummy1469(x: Int) extends Base -case class Dummy1470(x: Int) extends Base -case class Dummy1471(x: Int) extends Base -case class Dummy1472(x: Int) extends Base -case class Dummy1473(x: Int) extends Base -case class Dummy1474(x: Int) extends Base -case class Dummy1475(x: Int) extends Base -case class Dummy1476(x: Int) extends Base -case class Dummy1477(x: Int) extends Base -case class Dummy1478(x: Int) extends Base -case class Dummy1479(x: Int) extends Base -case class Dummy1480(x: Int) extends Base -case class Dummy1481(x: Int) extends Base -case class Dummy1482(x: Int) extends Base -case class Dummy1483(x: Int) extends Base -case class Dummy1484(x: Int) extends Base -case class Dummy1485(x: Int) extends Base -case class Dummy1486(x: Int) extends Base -case class Dummy1487(x: Int) extends Base -case class Dummy1488(x: Int) extends Base -case class Dummy1489(x: Int) extends Base -case class Dummy1490(x: Int) extends Base -case class Dummy1491(x: Int) extends Base -case class Dummy1492(x: Int) extends Base -case class Dummy1493(x: Int) extends Base -case class Dummy1494(x: Int) extends Base -case class Dummy1495(x: Int) extends Base -case class Dummy1496(x: Int) extends Base -case class Dummy1497(x: Int) extends Base -case class Dummy1498(x: Int) extends Base -case class Dummy1499(x: Int) extends Base -case class Dummy1500(x: Int) extends Base -case class Dummy1501(x: Int) extends Base -case class Dummy1502(x: Int) extends Base -case class Dummy1503(x: Int) extends Base -case class Dummy1504(x: Int) extends Base -case class Dummy1505(x: Int) extends Base -case class Dummy1506(x: Int) extends Base -case class Dummy1507(x: Int) extends Base -case class Dummy1508(x: Int) extends Base -case class Dummy1509(x: Int) extends Base -case class Dummy1510(x: Int) extends Base -case class Dummy1511(x: Int) extends Base -case class Dummy1512(x: Int) extends Base -case class Dummy1513(x: Int) extends Base -case class Dummy1514(x: Int) extends Base -case class Dummy1515(x: Int) extends Base -case class Dummy1516(x: Int) extends Base -case class Dummy1517(x: Int) extends Base -case class Dummy1518(x: Int) extends Base -case class Dummy1519(x: Int) extends Base -case class Dummy1520(x: Int) extends Base -case class Dummy1521(x: Int) extends Base -case class Dummy1522(x: Int) extends Base -case class Dummy1523(x: Int) extends Base -case class Dummy1524(x: Int) extends Base -case class Dummy1525(x: Int) extends Base -case class Dummy1526(x: Int) extends Base -case class Dummy1527(x: Int) extends Base -case class Dummy1528(x: Int) extends Base -case class Dummy1529(x: Int) extends Base -case class Dummy1530(x: Int) extends Base -case class Dummy1531(x: Int) extends Base -case class Dummy1532(x: Int) extends Base -case class Dummy1533(x: Int) extends Base -case class Dummy1534(x: Int) extends Base -case class Dummy1535(x: Int) extends Base -case class Dummy1536(x: Int) extends Base -case class Dummy1537(x: Int) extends Base -case class Dummy1538(x: Int) extends Base -case class Dummy1539(x: Int) extends Base -case class Dummy1540(x: Int) extends Base -case class Dummy1541(x: Int) extends Base -case class Dummy1542(x: Int) extends Base -case class Dummy1543(x: Int) extends Base -case class Dummy1544(x: Int) extends Base -case class Dummy1545(x: Int) extends Base -case class Dummy1546(x: Int) extends Base -case class Dummy1547(x: Int) extends Base -case class Dummy1548(x: Int) extends Base -case class Dummy1549(x: Int) extends Base -case class Dummy1550(x: Int) extends Base -case class Dummy1551(x: Int) extends Base -case class Dummy1552(x: Int) extends Base -case class Dummy1553(x: Int) extends Base -case class Dummy1554(x: Int) extends Base -case class Dummy1555(x: Int) extends Base -case class Dummy1556(x: Int) extends Base -case class Dummy1557(x: Int) extends Base -case class Dummy1558(x: Int) extends Base -case class Dummy1559(x: Int) extends Base -case class Dummy1560(x: Int) extends Base -case class Dummy1561(x: Int) extends Base -case class Dummy1562(x: Int) extends Base -case class Dummy1563(x: Int) extends Base -case class Dummy1564(x: Int) extends Base -case class Dummy1565(x: Int) extends Base -case class Dummy1566(x: Int) extends Base -case class Dummy1567(x: Int) extends Base -case class Dummy1568(x: Int) extends Base -case class Dummy1569(x: Int) extends Base -case class Dummy1570(x: Int) extends Base -case class Dummy1571(x: Int) extends Base -case class Dummy1572(x: Int) extends Base -case class Dummy1573(x: Int) extends Base -case class Dummy1574(x: Int) extends Base -case class Dummy1575(x: Int) extends Base -case class Dummy1576(x: Int) extends Base -case class Dummy1577(x: Int) extends Base -case class Dummy1578(x: Int) extends Base -case class Dummy1579(x: Int) extends Base -case class Dummy1580(x: Int) extends Base -case class Dummy1581(x: Int) extends Base -case class Dummy1582(x: Int) extends Base -case class Dummy1583(x: Int) extends Base -case class Dummy1584(x: Int) extends Base -case class Dummy1585(x: Int) extends Base -case class Dummy1586(x: Int) extends Base -case class Dummy1587(x: Int) extends Base -case class Dummy1588(x: Int) extends Base -case class Dummy1589(x: Int) extends Base -case class Dummy1590(x: Int) extends Base -case class Dummy1591(x: Int) extends Base -case class Dummy1592(x: Int) extends Base -case class Dummy1593(x: Int) extends Base -case class Dummy1594(x: Int) extends Base -case class Dummy1595(x: Int) extends Base -case class Dummy1596(x: Int) extends Base -case class Dummy1597(x: Int) extends Base -case class Dummy1598(x: Int) extends Base -case class Dummy1599(x: Int) extends Base -case class Dummy1600(x: Int) extends Base -case class Dummy1601(x: Int) extends Base -case class Dummy1602(x: Int) extends Base -case class Dummy1603(x: Int) extends Base -case class Dummy1604(x: Int) extends Base -case class Dummy1605(x: Int) extends Base -case class Dummy1606(x: Int) extends Base -case class Dummy1607(x: Int) extends Base -case class Dummy1608(x: Int) extends Base -case class Dummy1609(x: Int) extends Base -case class Dummy1610(x: Int) extends Base -case class Dummy1611(x: Int) extends Base -case class Dummy1612(x: Int) extends Base -case class Dummy1613(x: Int) extends Base -case class Dummy1614(x: Int) extends Base -case class Dummy1615(x: Int) extends Base -case class Dummy1616(x: Int) extends Base -case class Dummy1617(x: Int) extends Base -case class Dummy1618(x: Int) extends Base -case class Dummy1619(x: Int) extends Base -case class Dummy1620(x: Int) extends Base -case class Dummy1621(x: Int) extends Base -case class Dummy1622(x: Int) extends Base -case class Dummy1623(x: Int) extends Base -case class Dummy1624(x: Int) extends Base -case class Dummy1625(x: Int) extends Base -case class Dummy1626(x: Int) extends Base -case class Dummy1627(x: Int) extends Base -case class Dummy1628(x: Int) extends Base -case class Dummy1629(x: Int) extends Base -case class Dummy1630(x: Int) extends Base -case class Dummy1631(x: Int) extends Base -case class Dummy1632(x: Int) extends Base -case class Dummy1633(x: Int) extends Base -case class Dummy1634(x: Int) extends Base -case class Dummy1635(x: Int) extends Base -case class Dummy1636(x: Int) extends Base -case class Dummy1637(x: Int) extends Base -case class Dummy1638(x: Int) extends Base -case class Dummy1639(x: Int) extends Base -case class Dummy1640(x: Int) extends Base -case class Dummy1641(x: Int) extends Base -case class Dummy1642(x: Int) extends Base -case class Dummy1643(x: Int) extends Base -case class Dummy1644(x: Int) extends Base -case class Dummy1645(x: Int) extends Base -case class Dummy1646(x: Int) extends Base -case class Dummy1647(x: Int) extends Base -case class Dummy1648(x: Int) extends Base -case class Dummy1649(x: Int) extends Base -case class Dummy1650(x: Int) extends Base -case class Dummy1651(x: Int) extends Base -case class Dummy1652(x: Int) extends Base -case class Dummy1653(x: Int) extends Base -case class Dummy1654(x: Int) extends Base -case class Dummy1655(x: Int) extends Base -case class Dummy1656(x: Int) extends Base -case class Dummy1657(x: Int) extends Base -case class Dummy1658(x: Int) extends Base -case class Dummy1659(x: Int) extends Base -case class Dummy1660(x: Int) extends Base -case class Dummy1661(x: Int) extends Base -case class Dummy1662(x: Int) extends Base -case class Dummy1663(x: Int) extends Base -case class Dummy1664(x: Int) extends Base -case class Dummy1665(x: Int) extends Base -case class Dummy1666(x: Int) extends Base -case class Dummy1667(x: Int) extends Base -case class Dummy1668(x: Int) extends Base -case class Dummy1669(x: Int) extends Base -case class Dummy1670(x: Int) extends Base -case class Dummy1671(x: Int) extends Base -case class Dummy1672(x: Int) extends Base -case class Dummy1673(x: Int) extends Base -case class Dummy1674(x: Int) extends Base -case class Dummy1675(x: Int) extends Base -case class Dummy1676(x: Int) extends Base -case class Dummy1677(x: Int) extends Base -case class Dummy1678(x: Int) extends Base -case class Dummy1679(x: Int) extends Base -case class Dummy1680(x: Int) extends Base -case class Dummy1681(x: Int) extends Base -case class Dummy1682(x: Int) extends Base -case class Dummy1683(x: Int) extends Base -case class Dummy1684(x: Int) extends Base -case class Dummy1685(x: Int) extends Base -case class Dummy1686(x: Int) extends Base -case class Dummy1687(x: Int) extends Base -case class Dummy1688(x: Int) extends Base -case class Dummy1689(x: Int) extends Base -case class Dummy1690(x: Int) extends Base -case class Dummy1691(x: Int) extends Base -case class Dummy1692(x: Int) extends Base -case class Dummy1693(x: Int) extends Base -case class Dummy1694(x: Int) extends Base -case class Dummy1695(x: Int) extends Base -case class Dummy1696(x: Int) extends Base -case class Dummy1697(x: Int) extends Base -case class Dummy1698(x: Int) extends Base -case class Dummy1699(x: Int) extends Base -case class Dummy1700(x: Int) extends Base -case class Dummy1701(x: Int) extends Base -case class Dummy1702(x: Int) extends Base -case class Dummy1703(x: Int) extends Base -case class Dummy1704(x: Int) extends Base -case class Dummy1705(x: Int) extends Base -case class Dummy1706(x: Int) extends Base -case class Dummy1707(x: Int) extends Base -case class Dummy1708(x: Int) extends Base -case class Dummy1709(x: Int) extends Base -case class Dummy1710(x: Int) extends Base -case class Dummy1711(x: Int) extends Base -case class Dummy1712(x: Int) extends Base -case class Dummy1713(x: Int) extends Base -case class Dummy1714(x: Int) extends Base -case class Dummy1715(x: Int) extends Base -case class Dummy1716(x: Int) extends Base -case class Dummy1717(x: Int) extends Base -case class Dummy1718(x: Int) extends Base -case class Dummy1719(x: Int) extends Base -case class Dummy1720(x: Int) extends Base -case class Dummy1721(x: Int) extends Base -case class Dummy1722(x: Int) extends Base -case class Dummy1723(x: Int) extends Base -case class Dummy1724(x: Int) extends Base -case class Dummy1725(x: Int) extends Base -case class Dummy1726(x: Int) extends Base -case class Dummy1727(x: Int) extends Base -case class Dummy1728(x: Int) extends Base -case class Dummy1729(x: Int) extends Base -case class Dummy1730(x: Int) extends Base -case class Dummy1731(x: Int) extends Base -case class Dummy1732(x: Int) extends Base -case class Dummy1733(x: Int) extends Base -case class Dummy1734(x: Int) extends Base -case class Dummy1735(x: Int) extends Base -case class Dummy1736(x: Int) extends Base -case class Dummy1737(x: Int) extends Base -case class Dummy1738(x: Int) extends Base -case class Dummy1739(x: Int) extends Base -case class Dummy1740(x: Int) extends Base -case class Dummy1741(x: Int) extends Base -case class Dummy1742(x: Int) extends Base -case class Dummy1743(x: Int) extends Base -case class Dummy1744(x: Int) extends Base -case class Dummy1745(x: Int) extends Base -case class Dummy1746(x: Int) extends Base -case class Dummy1747(x: Int) extends Base -case class Dummy1748(x: Int) extends Base -case class Dummy1749(x: Int) extends Base -case class Dummy1750(x: Int) extends Base -case class Dummy1751(x: Int) extends Base -case class Dummy1752(x: Int) extends Base -case class Dummy1753(x: Int) extends Base -case class Dummy1754(x: Int) extends Base -case class Dummy1755(x: Int) extends Base -case class Dummy1756(x: Int) extends Base -case class Dummy1757(x: Int) extends Base -case class Dummy1758(x: Int) extends Base -case class Dummy1759(x: Int) extends Base -case class Dummy1760(x: Int) extends Base -case class Dummy1761(x: Int) extends Base -case class Dummy1762(x: Int) extends Base -case class Dummy1763(x: Int) extends Base -case class Dummy1764(x: Int) extends Base -case class Dummy1765(x: Int) extends Base -case class Dummy1766(x: Int) extends Base -case class Dummy1767(x: Int) extends Base -case class Dummy1768(x: Int) extends Base -case class Dummy1769(x: Int) extends Base -case class Dummy1770(x: Int) extends Base -case class Dummy1771(x: Int) extends Base -case class Dummy1772(x: Int) extends Base -case class Dummy1773(x: Int) extends Base -case class Dummy1774(x: Int) extends Base -case class Dummy1775(x: Int) extends Base -case class Dummy1776(x: Int) extends Base -case class Dummy1777(x: Int) extends Base -case class Dummy1778(x: Int) extends Base -case class Dummy1779(x: Int) extends Base -case class Dummy1780(x: Int) extends Base -case class Dummy1781(x: Int) extends Base -case class Dummy1782(x: Int) extends Base -case class Dummy1783(x: Int) extends Base -case class Dummy1784(x: Int) extends Base -case class Dummy1785(x: Int) extends Base -case class Dummy1786(x: Int) extends Base -case class Dummy1787(x: Int) extends Base -case class Dummy1788(x: Int) extends Base -case class Dummy1789(x: Int) extends Base -case class Dummy1790(x: Int) extends Base -case class Dummy1791(x: Int) extends Base -case class Dummy1792(x: Int) extends Base -case class Dummy1793(x: Int) extends Base -case class Dummy1794(x: Int) extends Base -case class Dummy1795(x: Int) extends Base -case class Dummy1796(x: Int) extends Base -case class Dummy1797(x: Int) extends Base -case class Dummy1798(x: Int) extends Base -case class Dummy1799(x: Int) extends Base -case class Dummy1800(x: Int) extends Base -case class Dummy1801(x: Int) extends Base -case class Dummy1802(x: Int) extends Base -case class Dummy1803(x: Int) extends Base -case class Dummy1804(x: Int) extends Base -case class Dummy1805(x: Int) extends Base -case class Dummy1806(x: Int) extends Base -case class Dummy1807(x: Int) extends Base -case class Dummy1808(x: Int) extends Base -case class Dummy1809(x: Int) extends Base -case class Dummy1810(x: Int) extends Base -case class Dummy1811(x: Int) extends Base -case class Dummy1812(x: Int) extends Base -case class Dummy1813(x: Int) extends Base -case class Dummy1814(x: Int) extends Base -case class Dummy1815(x: Int) extends Base -case class Dummy1816(x: Int) extends Base -case class Dummy1817(x: Int) extends Base -case class Dummy1818(x: Int) extends Base -case class Dummy1819(x: Int) extends Base -case class Dummy1820(x: Int) extends Base -case class Dummy1821(x: Int) extends Base -case class Dummy1822(x: Int) extends Base -case class Dummy1823(x: Int) extends Base -case class Dummy1824(x: Int) extends Base -case class Dummy1825(x: Int) extends Base -case class Dummy1826(x: Int) extends Base -case class Dummy1827(x: Int) extends Base -case class Dummy1828(x: Int) extends Base -case class Dummy1829(x: Int) extends Base -case class Dummy1830(x: Int) extends Base -case class Dummy1831(x: Int) extends Base -case class Dummy1832(x: Int) extends Base -case class Dummy1833(x: Int) extends Base -case class Dummy1834(x: Int) extends Base -case class Dummy1835(x: Int) extends Base -case class Dummy1836(x: Int) extends Base -case class Dummy1837(x: Int) extends Base -case class Dummy1838(x: Int) extends Base -case class Dummy1839(x: Int) extends Base -case class Dummy1840(x: Int) extends Base -case class Dummy1841(x: Int) extends Base -case class Dummy1842(x: Int) extends Base -case class Dummy1843(x: Int) extends Base -case class Dummy1844(x: Int) extends Base -case class Dummy1845(x: Int) extends Base -case class Dummy1846(x: Int) extends Base -case class Dummy1847(x: Int) extends Base -case class Dummy1848(x: Int) extends Base -case class Dummy1849(x: Int) extends Base -case class Dummy1850(x: Int) extends Base -case class Dummy1851(x: Int) extends Base -case class Dummy1852(x: Int) extends Base -case class Dummy1853(x: Int) extends Base -case class Dummy1854(x: Int) extends Base -case class Dummy1855(x: Int) extends Base -case class Dummy1856(x: Int) extends Base -case class Dummy1857(x: Int) extends Base -case class Dummy1858(x: Int) extends Base -case class Dummy1859(x: Int) extends Base -case class Dummy1860(x: Int) extends Base -case class Dummy1861(x: Int) extends Base -case class Dummy1862(x: Int) extends Base -case class Dummy1863(x: Int) extends Base -case class Dummy1864(x: Int) extends Base -case class Dummy1865(x: Int) extends Base -case class Dummy1866(x: Int) extends Base -case class Dummy1867(x: Int) extends Base -case class Dummy1868(x: Int) extends Base -case class Dummy1869(x: Int) extends Base -case class Dummy1870(x: Int) extends Base -case class Dummy1871(x: Int) extends Base -case class Dummy1872(x: Int) extends Base -case class Dummy1873(x: Int) extends Base -case class Dummy1874(x: Int) extends Base -case class Dummy1875(x: Int) extends Base -case class Dummy1876(x: Int) extends Base -case class Dummy1877(x: Int) extends Base -case class Dummy1878(x: Int) extends Base -case class Dummy1879(x: Int) extends Base -case class Dummy1880(x: Int) extends Base -case class Dummy1881(x: Int) extends Base -case class Dummy1882(x: Int) extends Base -case class Dummy1883(x: Int) extends Base -case class Dummy1884(x: Int) extends Base -case class Dummy1885(x: Int) extends Base -case class Dummy1886(x: Int) extends Base -case class Dummy1887(x: Int) extends Base -case class Dummy1888(x: Int) extends Base -case class Dummy1889(x: Int) extends Base -case class Dummy1890(x: Int) extends Base -case class Dummy1891(x: Int) extends Base -case class Dummy1892(x: Int) extends Base -case class Dummy1893(x: Int) extends Base -case class Dummy1894(x: Int) extends Base -case class Dummy1895(x: Int) extends Base -case class Dummy1896(x: Int) extends Base -case class Dummy1897(x: Int) extends Base -case class Dummy1898(x: Int) extends Base -case class Dummy1899(x: Int) extends Base -case class Dummy1900(x: Int) extends Base -case class Dummy1901(x: Int) extends Base -case class Dummy1902(x: Int) extends Base -case class Dummy1903(x: Int) extends Base -case class Dummy1904(x: Int) extends Base -case class Dummy1905(x: Int) extends Base -case class Dummy1906(x: Int) extends Base -case class Dummy1907(x: Int) extends Base -case class Dummy1908(x: Int) extends Base -case class Dummy1909(x: Int) extends Base -case class Dummy1910(x: Int) extends Base -case class Dummy1911(x: Int) extends Base -case class Dummy1912(x: Int) extends Base -case class Dummy1913(x: Int) extends Base -case class Dummy1914(x: Int) extends Base -case class Dummy1915(x: Int) extends Base -case class Dummy1916(x: Int) extends Base -case class Dummy1917(x: Int) extends Base -case class Dummy1918(x: Int) extends Base -case class Dummy1919(x: Int) extends Base -case class Dummy1920(x: Int) extends Base -case class Dummy1921(x: Int) extends Base -case class Dummy1922(x: Int) extends Base -case class Dummy1923(x: Int) extends Base -case class Dummy1924(x: Int) extends Base -case class Dummy1925(x: Int) extends Base -case class Dummy1926(x: Int) extends Base -case class Dummy1927(x: Int) extends Base -case class Dummy1928(x: Int) extends Base -case class Dummy1929(x: Int) extends Base -case class Dummy1930(x: Int) extends Base -case class Dummy1931(x: Int) extends Base -case class Dummy1932(x: Int) extends Base -case class Dummy1933(x: Int) extends Base -case class Dummy1934(x: Int) extends Base -case class Dummy1935(x: Int) extends Base -case class Dummy1936(x: Int) extends Base -case class Dummy1937(x: Int) extends Base -case class Dummy1938(x: Int) extends Base -case class Dummy1939(x: Int) extends Base -case class Dummy1940(x: Int) extends Base -case class Dummy1941(x: Int) extends Base -case class Dummy1942(x: Int) extends Base -case class Dummy1943(x: Int) extends Base -case class Dummy1944(x: Int) extends Base -case class Dummy1945(x: Int) extends Base -case class Dummy1946(x: Int) extends Base -case class Dummy1947(x: Int) extends Base -case class Dummy1948(x: Int) extends Base -case class Dummy1949(x: Int) extends Base -case class Dummy1950(x: Int) extends Base -case class Dummy1951(x: Int) extends Base -case class Dummy1952(x: Int) extends Base -case class Dummy1953(x: Int) extends Base -case class Dummy1954(x: Int) extends Base -case class Dummy1955(x: Int) extends Base -case class Dummy1956(x: Int) extends Base -case class Dummy1957(x: Int) extends Base -case class Dummy1958(x: Int) extends Base -case class Dummy1959(x: Int) extends Base -case class Dummy1960(x: Int) extends Base -case class Dummy1961(x: Int) extends Base -case class Dummy1962(x: Int) extends Base -case class Dummy1963(x: Int) extends Base -case class Dummy1964(x: Int) extends Base -case class Dummy1965(x: Int) extends Base -case class Dummy1966(x: Int) extends Base -case class Dummy1967(x: Int) extends Base -case class Dummy1968(x: Int) extends Base -case class Dummy1969(x: Int) extends Base -case class Dummy1970(x: Int) extends Base -case class Dummy1971(x: Int) extends Base -case class Dummy1972(x: Int) extends Base -case class Dummy1973(x: Int) extends Base -case class Dummy1974(x: Int) extends Base -case class Dummy1975(x: Int) extends Base -case class Dummy1976(x: Int) extends Base -case class Dummy1977(x: Int) extends Base -case class Dummy1978(x: Int) extends Base -case class Dummy1979(x: Int) extends Base -case class Dummy1980(x: Int) extends Base -case class Dummy1981(x: Int) extends Base -case class Dummy1982(x: Int) extends Base -case class Dummy1983(x: Int) extends Base -case class Dummy1984(x: Int) extends Base -case class Dummy1985(x: Int) extends Base -case class Dummy1986(x: Int) extends Base -case class Dummy1987(x: Int) extends Base -case class Dummy1988(x: Int) extends Base -case class Dummy1989(x: Int) extends Base -case class Dummy1990(x: Int) extends Base -case class Dummy1991(x: Int) extends Base -case class Dummy1992(x: Int) extends Base -case class Dummy1993(x: Int) extends Base -case class Dummy1994(x: Int) extends Base -case class Dummy1995(x: Int) extends Base -case class Dummy1996(x: Int) extends Base -case class Dummy1997(x: Int) extends Base -case class Dummy1998(x: Int) extends Base -case class Dummy1999(x: Int) extends Base -def test(y: Base) = y match { - case Dummy0(p) => p - case Dummy1(p) => p - case Dummy2(p) => p - case Dummy3(p) => p - case Dummy4(p) => p - case Dummy5(p) => p - case Dummy6(p) => p - case Dummy7(p) => p - case Dummy8(p) => p - case Dummy9(p) => p - case Dummy10(p) => p - case Dummy11(p) => p - case Dummy12(p) => p - case Dummy13(p) => p - case Dummy14(p) => p - case Dummy15(p) => p - case Dummy16(p) => p - case Dummy17(p) => p - case Dummy18(p) => p - case Dummy19(p) => p - case Dummy20(p) => p - case Dummy21(p) => p - case Dummy22(p) => p - case Dummy23(p) => p - case Dummy24(p) => p - case Dummy25(p) => p - case Dummy26(p) => p - case Dummy27(p) => p - case Dummy28(p) => p - case Dummy29(p) => p - case Dummy30(p) => p - case Dummy31(p) => p - case Dummy32(p) => p - case Dummy33(p) => p - case Dummy34(p) => p - case Dummy35(p) => p - case Dummy36(p) => p - case Dummy37(p) => p - case Dummy38(p) => p - case Dummy39(p) => p - case Dummy40(p) => p - case Dummy41(p) => p - case Dummy42(p) => p - case Dummy43(p) => p - case Dummy44(p) => p - case Dummy45(p) => p - case Dummy46(p) => p - case Dummy47(p) => p - case Dummy48(p) => p - case Dummy49(p) => p - case Dummy50(p) => p - case Dummy51(p) => p - case Dummy52(p) => p - case Dummy53(p) => p - case Dummy54(p) => p - case Dummy55(p) => p - case Dummy56(p) => p - case Dummy57(p) => p - case Dummy58(p) => p - case Dummy59(p) => p - case Dummy60(p) => p - case Dummy61(p) => p - case Dummy62(p) => p - case Dummy63(p) => p - case Dummy64(p) => p - case Dummy65(p) => p - case Dummy66(p) => p - case Dummy67(p) => p - case Dummy68(p) => p - case Dummy69(p) => p - case Dummy70(p) => p - case Dummy71(p) => p - case Dummy72(p) => p - case Dummy73(p) => p - case Dummy74(p) => p - case Dummy75(p) => p - case Dummy76(p) => p - case Dummy77(p) => p - case Dummy78(p) => p - case Dummy79(p) => p - case Dummy80(p) => p - case Dummy81(p) => p - case Dummy82(p) => p - case Dummy83(p) => p - case Dummy84(p) => p - case Dummy85(p) => p - case Dummy86(p) => p - case Dummy87(p) => p - case Dummy88(p) => p - case Dummy89(p) => p - case Dummy90(p) => p - case Dummy91(p) => p - case Dummy92(p) => p - case Dummy93(p) => p - case Dummy94(p) => p - case Dummy95(p) => p - case Dummy96(p) => p - case Dummy97(p) => p - case Dummy98(p) => p - case Dummy99(p) => p - case Dummy100(p) => p - case Dummy101(p) => p - case Dummy102(p) => p - case Dummy103(p) => p - case Dummy104(p) => p - case Dummy105(p) => p - case Dummy106(p) => p - case Dummy107(p) => p - case Dummy108(p) => p - case Dummy109(p) => p - case Dummy110(p) => p - case Dummy111(p) => p - case Dummy112(p) => p - case Dummy113(p) => p - case Dummy114(p) => p - case Dummy115(p) => p - case Dummy116(p) => p - case Dummy117(p) => p - case Dummy118(p) => p - case Dummy119(p) => p - case Dummy120(p) => p - case Dummy121(p) => p - case Dummy122(p) => p - case Dummy123(p) => p - case Dummy124(p) => p - case Dummy125(p) => p - case Dummy126(p) => p - case Dummy127(p) => p - case Dummy128(p) => p - case Dummy129(p) => p - case Dummy130(p) => p - case Dummy131(p) => p - case Dummy132(p) => p - case Dummy133(p) => p - case Dummy134(p) => p - case Dummy135(p) => p - case Dummy136(p) => p - case Dummy137(p) => p - case Dummy138(p) => p - case Dummy139(p) => p - case Dummy140(p) => p - case Dummy141(p) => p - case Dummy142(p) => p - case Dummy143(p) => p - case Dummy144(p) => p - case Dummy145(p) => p - case Dummy146(p) => p - case Dummy147(p) => p - case Dummy148(p) => p - case Dummy149(p) => p - case Dummy150(p) => p - case Dummy151(p) => p - case Dummy152(p) => p - case Dummy153(p) => p - case Dummy154(p) => p - case Dummy155(p) => p - case Dummy156(p) => p - case Dummy157(p) => p - case Dummy158(p) => p - case Dummy159(p) => p - case Dummy160(p) => p - case Dummy161(p) => p - case Dummy162(p) => p - case Dummy163(p) => p - case Dummy164(p) => p - case Dummy165(p) => p - case Dummy166(p) => p - case Dummy167(p) => p - case Dummy168(p) => p - case Dummy169(p) => p - case Dummy170(p) => p - case Dummy171(p) => p - case Dummy172(p) => p - case Dummy173(p) => p - case Dummy174(p) => p - case Dummy175(p) => p - case Dummy176(p) => p - case Dummy177(p) => p - case Dummy178(p) => p - case Dummy179(p) => p - case Dummy180(p) => p - case Dummy181(p) => p - case Dummy182(p) => p - case Dummy183(p) => p - case Dummy184(p) => p - case Dummy185(p) => p - case Dummy186(p) => p - case Dummy187(p) => p - case Dummy188(p) => p - case Dummy189(p) => p - case Dummy190(p) => p - case Dummy191(p) => p - case Dummy192(p) => p - case Dummy193(p) => p - case Dummy194(p) => p - case Dummy195(p) => p - case Dummy196(p) => p - case Dummy197(p) => p - case Dummy198(p) => p - case Dummy199(p) => p - case Dummy200(p) => p - case Dummy201(p) => p - case Dummy202(p) => p - case Dummy203(p) => p - case Dummy204(p) => p - case Dummy205(p) => p - case Dummy206(p) => p - case Dummy207(p) => p - case Dummy208(p) => p - case Dummy209(p) => p - case Dummy210(p) => p - case Dummy211(p) => p - case Dummy212(p) => p - case Dummy213(p) => p - case Dummy214(p) => p - case Dummy215(p) => p - case Dummy216(p) => p - case Dummy217(p) => p - case Dummy218(p) => p - case Dummy219(p) => p - case Dummy220(p) => p - case Dummy221(p) => p - case Dummy222(p) => p - case Dummy223(p) => p - case Dummy224(p) => p - case Dummy225(p) => p - case Dummy226(p) => p - case Dummy227(p) => p - case Dummy228(p) => p - case Dummy229(p) => p - case Dummy230(p) => p - case Dummy231(p) => p - case Dummy232(p) => p - case Dummy233(p) => p - case Dummy234(p) => p - case Dummy235(p) => p - case Dummy236(p) => p - case Dummy237(p) => p - case Dummy238(p) => p - case Dummy239(p) => p - case Dummy240(p) => p - case Dummy241(p) => p - case Dummy242(p) => p - case Dummy243(p) => p - case Dummy244(p) => p - case Dummy245(p) => p - case Dummy246(p) => p - case Dummy247(p) => p - case Dummy248(p) => p - case Dummy249(p) => p - case Dummy250(p) => p - case Dummy251(p) => p - case Dummy252(p) => p - case Dummy253(p) => p - case Dummy254(p) => p - case Dummy255(p) => p - case Dummy256(p) => p - case Dummy257(p) => p - case Dummy258(p) => p - case Dummy259(p) => p - case Dummy260(p) => p - case Dummy261(p) => p - case Dummy262(p) => p - case Dummy263(p) => p - case Dummy264(p) => p - case Dummy265(p) => p - case Dummy266(p) => p - case Dummy267(p) => p - case Dummy268(p) => p - case Dummy269(p) => p - case Dummy270(p) => p - case Dummy271(p) => p - case Dummy272(p) => p - case Dummy273(p) => p - case Dummy274(p) => p - case Dummy275(p) => p - case Dummy276(p) => p - case Dummy277(p) => p - case Dummy278(p) => p - case Dummy279(p) => p - case Dummy280(p) => p - case Dummy281(p) => p - case Dummy282(p) => p - case Dummy283(p) => p - case Dummy284(p) => p - case Dummy285(p) => p - case Dummy286(p) => p - case Dummy287(p) => p - case Dummy288(p) => p - case Dummy289(p) => p - case Dummy290(p) => p - case Dummy291(p) => p - case Dummy292(p) => p - case Dummy293(p) => p - case Dummy294(p) => p - case Dummy295(p) => p - case Dummy296(p) => p - case Dummy297(p) => p - case Dummy298(p) => p - case Dummy299(p) => p - case Dummy300(p) => p - case Dummy301(p) => p - case Dummy302(p) => p - case Dummy303(p) => p - case Dummy304(p) => p - case Dummy305(p) => p - case Dummy306(p) => p - case Dummy307(p) => p - case Dummy308(p) => p - case Dummy309(p) => p - case Dummy310(p) => p - case Dummy311(p) => p - case Dummy312(p) => p - case Dummy313(p) => p - case Dummy314(p) => p - case Dummy315(p) => p - case Dummy316(p) => p - case Dummy317(p) => p - case Dummy318(p) => p - case Dummy319(p) => p - case Dummy320(p) => p - case Dummy321(p) => p - case Dummy322(p) => p - case Dummy323(p) => p - case Dummy324(p) => p - case Dummy325(p) => p - case Dummy326(p) => p - case Dummy327(p) => p - case Dummy328(p) => p - case Dummy329(p) => p - case Dummy330(p) => p - case Dummy331(p) => p - case Dummy332(p) => p - case Dummy333(p) => p - case Dummy334(p) => p - case Dummy335(p) => p - case Dummy336(p) => p - case Dummy337(p) => p - case Dummy338(p) => p - case Dummy339(p) => p - case Dummy340(p) => p - case Dummy341(p) => p - case Dummy342(p) => p - case Dummy343(p) => p - case Dummy344(p) => p - case Dummy345(p) => p - case Dummy346(p) => p - case Dummy347(p) => p - case Dummy348(p) => p - case Dummy349(p) => p - case Dummy350(p) => p - case Dummy351(p) => p - case Dummy352(p) => p - case Dummy353(p) => p - case Dummy354(p) => p - case Dummy355(p) => p - case Dummy356(p) => p - case Dummy357(p) => p - case Dummy358(p) => p - case Dummy359(p) => p - case Dummy360(p) => p - case Dummy361(p) => p - case Dummy362(p) => p - case Dummy363(p) => p - case Dummy364(p) => p - case Dummy365(p) => p - case Dummy366(p) => p - case Dummy367(p) => p - case Dummy368(p) => p - case Dummy369(p) => p - case Dummy370(p) => p - case Dummy371(p) => p - case Dummy372(p) => p - case Dummy373(p) => p - case Dummy374(p) => p - case Dummy375(p) => p - case Dummy376(p) => p - case Dummy377(p) => p - case Dummy378(p) => p - case Dummy379(p) => p - case Dummy380(p) => p - case Dummy381(p) => p - case Dummy382(p) => p - case Dummy383(p) => p - case Dummy384(p) => p - case Dummy385(p) => p - case Dummy386(p) => p - case Dummy387(p) => p - case Dummy388(p) => p - case Dummy389(p) => p - case Dummy390(p) => p - case Dummy391(p) => p - case Dummy392(p) => p - case Dummy393(p) => p - case Dummy394(p) => p - case Dummy395(p) => p - case Dummy396(p) => p - case Dummy397(p) => p - case Dummy398(p) => p - case Dummy399(p) => p - case Dummy400(p) => p - case Dummy401(p) => p - case Dummy402(p) => p - case Dummy403(p) => p - case Dummy404(p) => p - case Dummy405(p) => p - case Dummy406(p) => p - case Dummy407(p) => p - case Dummy408(p) => p - case Dummy409(p) => p - case Dummy410(p) => p - case Dummy411(p) => p - case Dummy412(p) => p - case Dummy413(p) => p - case Dummy414(p) => p - case Dummy415(p) => p - case Dummy416(p) => p - case Dummy417(p) => p - case Dummy418(p) => p - case Dummy419(p) => p - case Dummy420(p) => p - case Dummy421(p) => p - case Dummy422(p) => p - case Dummy423(p) => p - case Dummy424(p) => p - case Dummy425(p) => p - case Dummy426(p) => p - case Dummy427(p) => p - case Dummy428(p) => p - case Dummy429(p) => p - case Dummy430(p) => p - case Dummy431(p) => p - case Dummy432(p) => p - case Dummy433(p) => p - case Dummy434(p) => p - case Dummy435(p) => p - case Dummy436(p) => p - case Dummy437(p) => p - case Dummy438(p) => p - case Dummy439(p) => p - case Dummy440(p) => p - case Dummy441(p) => p - case Dummy442(p) => p - case Dummy443(p) => p - case Dummy444(p) => p - case Dummy445(p) => p - case Dummy446(p) => p - case Dummy447(p) => p - case Dummy448(p) => p - case Dummy449(p) => p - case Dummy450(p) => p - case Dummy451(p) => p - case Dummy452(p) => p - case Dummy453(p) => p - case Dummy454(p) => p - case Dummy455(p) => p - case Dummy456(p) => p - case Dummy457(p) => p - case Dummy458(p) => p - case Dummy459(p) => p - case Dummy460(p) => p - case Dummy461(p) => p - case Dummy462(p) => p - case Dummy463(p) => p - case Dummy464(p) => p - case Dummy465(p) => p - case Dummy466(p) => p - case Dummy467(p) => p - case Dummy468(p) => p - case Dummy469(p) => p - case Dummy470(p) => p - case Dummy471(p) => p - case Dummy472(p) => p - case Dummy473(p) => p - case Dummy474(p) => p - case Dummy475(p) => p - case Dummy476(p) => p - case Dummy477(p) => p - case Dummy478(p) => p - case Dummy479(p) => p - case Dummy480(p) => p - case Dummy481(p) => p - case Dummy482(p) => p - case Dummy483(p) => p - case Dummy484(p) => p - case Dummy485(p) => p - case Dummy486(p) => p - case Dummy487(p) => p - case Dummy488(p) => p - case Dummy489(p) => p - case Dummy490(p) => p - case Dummy491(p) => p - case Dummy492(p) => p - case Dummy493(p) => p - case Dummy494(p) => p - case Dummy495(p) => p - case Dummy496(p) => p - case Dummy497(p) => p - case Dummy498(p) => p - case Dummy499(p) => p - case Dummy500(p) => p - case Dummy501(p) => p - case Dummy502(p) => p - case Dummy503(p) => p - case Dummy504(p) => p - case Dummy505(p) => p - case Dummy506(p) => p - case Dummy507(p) => p - case Dummy508(p) => p - case Dummy509(p) => p - case Dummy510(p) => p - case Dummy511(p) => p - case Dummy512(p) => p - case Dummy513(p) => p - case Dummy514(p) => p - case Dummy515(p) => p - case Dummy516(p) => p - case Dummy517(p) => p - case Dummy518(p) => p - case Dummy519(p) => p - case Dummy520(p) => p - case Dummy521(p) => p - case Dummy522(p) => p - case Dummy523(p) => p - case Dummy524(p) => p - case Dummy525(p) => p - case Dummy526(p) => p - case Dummy527(p) => p - case Dummy528(p) => p - case Dummy529(p) => p - case Dummy530(p) => p - case Dummy531(p) => p - case Dummy532(p) => p - case Dummy533(p) => p - case Dummy534(p) => p - case Dummy535(p) => p - case Dummy536(p) => p - case Dummy537(p) => p - case Dummy538(p) => p - case Dummy539(p) => p - case Dummy540(p) => p - case Dummy541(p) => p - case Dummy542(p) => p - case Dummy543(p) => p - case Dummy544(p) => p - case Dummy545(p) => p - case Dummy546(p) => p - case Dummy547(p) => p - case Dummy548(p) => p - case Dummy549(p) => p - case Dummy550(p) => p - case Dummy551(p) => p - case Dummy552(p) => p - case Dummy553(p) => p - case Dummy554(p) => p - case Dummy555(p) => p - case Dummy556(p) => p - case Dummy557(p) => p - case Dummy558(p) => p - case Dummy559(p) => p - case Dummy560(p) => p - case Dummy561(p) => p - case Dummy562(p) => p - case Dummy563(p) => p - case Dummy564(p) => p - case Dummy565(p) => p - case Dummy566(p) => p - case Dummy567(p) => p - case Dummy568(p) => p - case Dummy569(p) => p - case Dummy570(p) => p - case Dummy571(p) => p - case Dummy572(p) => p - case Dummy573(p) => p - case Dummy574(p) => p - case Dummy575(p) => p - case Dummy576(p) => p - case Dummy577(p) => p - case Dummy578(p) => p - case Dummy579(p) => p - case Dummy580(p) => p - case Dummy581(p) => p - case Dummy582(p) => p - case Dummy583(p) => p - case Dummy584(p) => p - case Dummy585(p) => p - case Dummy586(p) => p - case Dummy587(p) => p - case Dummy588(p) => p - case Dummy589(p) => p - case Dummy590(p) => p - case Dummy591(p) => p - case Dummy592(p) => p - case Dummy593(p) => p - case Dummy594(p) => p - case Dummy595(p) => p - case Dummy596(p) => p - case Dummy597(p) => p - case Dummy598(p) => p - case Dummy599(p) => p - case Dummy600(p) => p - case Dummy601(p) => p - case Dummy602(p) => p - case Dummy603(p) => p - case Dummy604(p) => p - case Dummy605(p) => p - case Dummy606(p) => p - case Dummy607(p) => p - case Dummy608(p) => p - case Dummy609(p) => p - case Dummy610(p) => p - case Dummy611(p) => p - case Dummy612(p) => p - case Dummy613(p) => p - case Dummy614(p) => p - case Dummy615(p) => p - case Dummy616(p) => p - case Dummy617(p) => p - case Dummy618(p) => p - case Dummy619(p) => p - case Dummy620(p) => p - case Dummy621(p) => p - case Dummy622(p) => p - case Dummy623(p) => p - case Dummy624(p) => p - case Dummy625(p) => p - case Dummy626(p) => p - case Dummy627(p) => p - case Dummy628(p) => p - case Dummy629(p) => p - case Dummy630(p) => p - case Dummy631(p) => p - case Dummy632(p) => p - case Dummy633(p) => p - case Dummy634(p) => p - case Dummy635(p) => p - case Dummy636(p) => p - case Dummy637(p) => p - case Dummy638(p) => p - case Dummy639(p) => p - case Dummy640(p) => p - case Dummy641(p) => p - case Dummy642(p) => p - case Dummy643(p) => p - case Dummy644(p) => p - case Dummy645(p) => p - case Dummy646(p) => p - case Dummy647(p) => p - case Dummy648(p) => p - case Dummy649(p) => p - case Dummy650(p) => p - case Dummy651(p) => p - case Dummy652(p) => p - case Dummy653(p) => p - case Dummy654(p) => p - case Dummy655(p) => p - case Dummy656(p) => p - case Dummy657(p) => p - case Dummy658(p) => p - case Dummy659(p) => p - case Dummy660(p) => p - case Dummy661(p) => p - case Dummy662(p) => p - case Dummy663(p) => p - case Dummy664(p) => p - case Dummy665(p) => p - case Dummy666(p) => p - case Dummy667(p) => p - case Dummy668(p) => p - case Dummy669(p) => p - case Dummy670(p) => p - case Dummy671(p) => p - case Dummy672(p) => p - case Dummy673(p) => p - case Dummy674(p) => p - case Dummy675(p) => p - case Dummy676(p) => p - case Dummy677(p) => p - case Dummy678(p) => p - case Dummy679(p) => p - case Dummy680(p) => p - case Dummy681(p) => p - case Dummy682(p) => p - case Dummy683(p) => p - case Dummy684(p) => p - case Dummy685(p) => p - case Dummy686(p) => p - case Dummy687(p) => p - case Dummy688(p) => p - case Dummy689(p) => p - case Dummy690(p) => p - case Dummy691(p) => p - case Dummy692(p) => p - case Dummy693(p) => p - case Dummy694(p) => p - case Dummy695(p) => p - case Dummy696(p) => p - case Dummy697(p) => p - case Dummy698(p) => p - case Dummy699(p) => p - case Dummy700(p) => p - case Dummy701(p) => p - case Dummy702(p) => p - case Dummy703(p) => p - case Dummy704(p) => p - case Dummy705(p) => p - case Dummy706(p) => p - case Dummy707(p) => p - case Dummy708(p) => p - case Dummy709(p) => p - case Dummy710(p) => p - case Dummy711(p) => p - case Dummy712(p) => p - case Dummy713(p) => p - case Dummy714(p) => p - case Dummy715(p) => p - case Dummy716(p) => p - case Dummy717(p) => p - case Dummy718(p) => p - case Dummy719(p) => p - case Dummy720(p) => p - case Dummy721(p) => p - case Dummy722(p) => p - case Dummy723(p) => p - case Dummy724(p) => p - case Dummy725(p) => p - case Dummy726(p) => p - case Dummy727(p) => p - case Dummy728(p) => p - case Dummy729(p) => p - case Dummy730(p) => p - case Dummy731(p) => p - case Dummy732(p) => p - case Dummy733(p) => p - case Dummy734(p) => p - case Dummy735(p) => p - case Dummy736(p) => p - case Dummy737(p) => p - case Dummy738(p) => p - case Dummy739(p) => p - case Dummy740(p) => p - case Dummy741(p) => p - case Dummy742(p) => p - case Dummy743(p) => p - case Dummy744(p) => p - case Dummy745(p) => p - case Dummy746(p) => p - case Dummy747(p) => p - case Dummy748(p) => p - case Dummy749(p) => p - case Dummy750(p) => p - case Dummy751(p) => p - case Dummy752(p) => p - case Dummy753(p) => p - case Dummy754(p) => p - case Dummy755(p) => p - case Dummy756(p) => p - case Dummy757(p) => p - case Dummy758(p) => p - case Dummy759(p) => p - case Dummy760(p) => p - case Dummy761(p) => p - case Dummy762(p) => p - case Dummy763(p) => p - case Dummy764(p) => p - case Dummy765(p) => p - case Dummy766(p) => p - case Dummy767(p) => p - case Dummy768(p) => p - case Dummy769(p) => p - case Dummy770(p) => p - case Dummy771(p) => p - case Dummy772(p) => p - case Dummy773(p) => p - case Dummy774(p) => p - case Dummy775(p) => p - case Dummy776(p) => p - case Dummy777(p) => p - case Dummy778(p) => p - case Dummy779(p) => p - case Dummy780(p) => p - case Dummy781(p) => p - case Dummy782(p) => p - case Dummy783(p) => p - case Dummy784(p) => p - case Dummy785(p) => p - case Dummy786(p) => p - case Dummy787(p) => p - case Dummy788(p) => p - case Dummy789(p) => p - case Dummy790(p) => p - case Dummy791(p) => p - case Dummy792(p) => p - case Dummy793(p) => p - case Dummy794(p) => p - case Dummy795(p) => p - case Dummy796(p) => p - case Dummy797(p) => p - case Dummy798(p) => p - case Dummy799(p) => p - case Dummy800(p) => p - case Dummy801(p) => p - case Dummy802(p) => p - case Dummy803(p) => p - case Dummy804(p) => p - case Dummy805(p) => p - case Dummy806(p) => p - case Dummy807(p) => p - case Dummy808(p) => p - case Dummy809(p) => p - case Dummy810(p) => p - case Dummy811(p) => p - case Dummy812(p) => p - case Dummy813(p) => p - case Dummy814(p) => p - case Dummy815(p) => p - case Dummy816(p) => p - case Dummy817(p) => p - case Dummy818(p) => p - case Dummy819(p) => p - case Dummy820(p) => p - case Dummy821(p) => p - case Dummy822(p) => p - case Dummy823(p) => p - case Dummy824(p) => p - case Dummy825(p) => p - case Dummy826(p) => p - case Dummy827(p) => p - case Dummy828(p) => p - case Dummy829(p) => p - case Dummy830(p) => p - case Dummy831(p) => p - case Dummy832(p) => p - case Dummy833(p) => p - case Dummy834(p) => p - case Dummy835(p) => p - case Dummy836(p) => p - case Dummy837(p) => p - case Dummy838(p) => p - case Dummy839(p) => p - case Dummy840(p) => p - case Dummy841(p) => p - case Dummy842(p) => p - case Dummy843(p) => p - case Dummy844(p) => p - case Dummy845(p) => p - case Dummy846(p) => p - case Dummy847(p) => p - case Dummy848(p) => p - case Dummy849(p) => p - case Dummy850(p) => p - case Dummy851(p) => p - case Dummy852(p) => p - case Dummy853(p) => p - case Dummy854(p) => p - case Dummy855(p) => p - case Dummy856(p) => p - case Dummy857(p) => p - case Dummy858(p) => p - case Dummy859(p) => p - case Dummy860(p) => p - case Dummy861(p) => p - case Dummy862(p) => p - case Dummy863(p) => p - case Dummy864(p) => p - case Dummy865(p) => p - case Dummy866(p) => p - case Dummy867(p) => p - case Dummy868(p) => p - case Dummy869(p) => p - case Dummy870(p) => p - case Dummy871(p) => p - case Dummy872(p) => p - case Dummy873(p) => p - case Dummy874(p) => p - case Dummy875(p) => p - case Dummy876(p) => p - case Dummy877(p) => p - case Dummy878(p) => p - case Dummy879(p) => p - case Dummy880(p) => p - case Dummy881(p) => p - case Dummy882(p) => p - case Dummy883(p) => p - case Dummy884(p) => p - case Dummy885(p) => p - case Dummy886(p) => p - case Dummy887(p) => p - case Dummy888(p) => p - case Dummy889(p) => p - case Dummy890(p) => p - case Dummy891(p) => p - case Dummy892(p) => p - case Dummy893(p) => p - case Dummy894(p) => p - case Dummy895(p) => p - case Dummy896(p) => p - case Dummy897(p) => p - case Dummy898(p) => p - case Dummy899(p) => p - case Dummy900(p) => p - case Dummy901(p) => p - case Dummy902(p) => p - case Dummy903(p) => p - case Dummy904(p) => p - case Dummy905(p) => p - case Dummy906(p) => p - case Dummy907(p) => p - case Dummy908(p) => p - case Dummy909(p) => p - case Dummy910(p) => p - case Dummy911(p) => p - case Dummy912(p) => p - case Dummy913(p) => p - case Dummy914(p) => p - case Dummy915(p) => p - case Dummy916(p) => p - case Dummy917(p) => p - case Dummy918(p) => p - case Dummy919(p) => p - case Dummy920(p) => p - case Dummy921(p) => p - case Dummy922(p) => p - case Dummy923(p) => p - case Dummy924(p) => p - case Dummy925(p) => p - case Dummy926(p) => p - case Dummy927(p) => p - case Dummy928(p) => p - case Dummy929(p) => p - case Dummy930(p) => p - case Dummy931(p) => p - case Dummy932(p) => p - case Dummy933(p) => p - case Dummy934(p) => p - case Dummy935(p) => p - case Dummy936(p) => p - case Dummy937(p) => p - case Dummy938(p) => p - case Dummy939(p) => p - case Dummy940(p) => p - case Dummy941(p) => p - case Dummy942(p) => p - case Dummy943(p) => p - case Dummy944(p) => p - case Dummy945(p) => p - case Dummy946(p) => p - case Dummy947(p) => p - case Dummy948(p) => p - case Dummy949(p) => p - case Dummy950(p) => p - case Dummy951(p) => p - case Dummy952(p) => p - case Dummy953(p) => p - case Dummy954(p) => p - case Dummy955(p) => p - case Dummy956(p) => p - case Dummy957(p) => p - case Dummy958(p) => p - case Dummy959(p) => p - case Dummy960(p) => p - case Dummy961(p) => p - case Dummy962(p) => p - case Dummy963(p) => p - case Dummy964(p) => p - case Dummy965(p) => p - case Dummy966(p) => p - case Dummy967(p) => p - case Dummy968(p) => p - case Dummy969(p) => p - case Dummy970(p) => p - case Dummy971(p) => p - case Dummy972(p) => p - case Dummy973(p) => p - case Dummy974(p) => p - case Dummy975(p) => p - case Dummy976(p) => p - case Dummy977(p) => p - case Dummy978(p) => p - case Dummy979(p) => p - case Dummy980(p) => p - case Dummy981(p) => p - case Dummy982(p) => p - case Dummy983(p) => p - case Dummy984(p) => p - case Dummy985(p) => p - case Dummy986(p) => p - case Dummy987(p) => p - case Dummy988(p) => p - case Dummy989(p) => p - case Dummy990(p) => p - case Dummy991(p) => p - case Dummy992(p) => p - case Dummy993(p) => p - case Dummy994(p) => p - case Dummy995(p) => p - case Dummy996(p) => p - case Dummy997(p) => p - case Dummy998(p) => p - case Dummy999(p) => p - case Dummy1000(p) => p - case Dummy1001(p) => p - case Dummy1002(p) => p - case Dummy1003(p) => p - case Dummy1004(p) => p - case Dummy1005(p) => p - case Dummy1006(p) => p - case Dummy1007(p) => p - case Dummy1008(p) => p - case Dummy1009(p) => p - case Dummy1010(p) => p - case Dummy1011(p) => p - case Dummy1012(p) => p - case Dummy1013(p) => p - case Dummy1014(p) => p - case Dummy1015(p) => p - case Dummy1016(p) => p - case Dummy1017(p) => p - case Dummy1018(p) => p - case Dummy1019(p) => p - case Dummy1020(p) => p - case Dummy1021(p) => p - case Dummy1022(p) => p - case Dummy1023(p) => p - case Dummy1024(p) => p - case Dummy1025(p) => p - case Dummy1026(p) => p - case Dummy1027(p) => p - case Dummy1028(p) => p - case Dummy1029(p) => p - case Dummy1030(p) => p - case Dummy1031(p) => p - case Dummy1032(p) => p - case Dummy1033(p) => p - case Dummy1034(p) => p - case Dummy1035(p) => p - case Dummy1036(p) => p - case Dummy1037(p) => p - case Dummy1038(p) => p - case Dummy1039(p) => p - case Dummy1040(p) => p - case Dummy1041(p) => p - case Dummy1042(p) => p - case Dummy1043(p) => p - case Dummy1044(p) => p - case Dummy1045(p) => p - case Dummy1046(p) => p - case Dummy1047(p) => p - case Dummy1048(p) => p - case Dummy1049(p) => p - case Dummy1050(p) => p - case Dummy1051(p) => p - case Dummy1052(p) => p - case Dummy1053(p) => p - case Dummy1054(p) => p - case Dummy1055(p) => p - case Dummy1056(p) => p - case Dummy1057(p) => p - case Dummy1058(p) => p - case Dummy1059(p) => p - case Dummy1060(p) => p - case Dummy1061(p) => p - case Dummy1062(p) => p - case Dummy1063(p) => p - case Dummy1064(p) => p - case Dummy1065(p) => p - case Dummy1066(p) => p - case Dummy1067(p) => p - case Dummy1068(p) => p - case Dummy1069(p) => p - case Dummy1070(p) => p - case Dummy1071(p) => p - case Dummy1072(p) => p - case Dummy1073(p) => p - case Dummy1074(p) => p - case Dummy1075(p) => p - case Dummy1076(p) => p - case Dummy1077(p) => p - case Dummy1078(p) => p - case Dummy1079(p) => p - case Dummy1080(p) => p - case Dummy1081(p) => p - case Dummy1082(p) => p - case Dummy1083(p) => p - case Dummy1084(p) => p - case Dummy1085(p) => p - case Dummy1086(p) => p - case Dummy1087(p) => p - case Dummy1088(p) => p - case Dummy1089(p) => p - case Dummy1090(p) => p - case Dummy1091(p) => p - case Dummy1092(p) => p - case Dummy1093(p) => p - case Dummy1094(p) => p - case Dummy1095(p) => p - case Dummy1096(p) => p - case Dummy1097(p) => p - case Dummy1098(p) => p - case Dummy1099(p) => p - case Dummy1100(p) => p - case Dummy1101(p) => p - case Dummy1102(p) => p - case Dummy1103(p) => p - case Dummy1104(p) => p - case Dummy1105(p) => p - case Dummy1106(p) => p - case Dummy1107(p) => p - case Dummy1108(p) => p - case Dummy1109(p) => p - case Dummy1110(p) => p - case Dummy1111(p) => p - case Dummy1112(p) => p - case Dummy1113(p) => p - case Dummy1114(p) => p - case Dummy1115(p) => p - case Dummy1116(p) => p - case Dummy1117(p) => p - case Dummy1118(p) => p - case Dummy1119(p) => p - case Dummy1120(p) => p - case Dummy1121(p) => p - case Dummy1122(p) => p - case Dummy1123(p) => p - case Dummy1124(p) => p - case Dummy1125(p) => p - case Dummy1126(p) => p - case Dummy1127(p) => p - case Dummy1128(p) => p - case Dummy1129(p) => p - case Dummy1130(p) => p - case Dummy1131(p) => p - case Dummy1132(p) => p - case Dummy1133(p) => p - case Dummy1134(p) => p - case Dummy1135(p) => p - case Dummy1136(p) => p - case Dummy1137(p) => p - case Dummy1138(p) => p - case Dummy1139(p) => p - case Dummy1140(p) => p - case Dummy1141(p) => p - case Dummy1142(p) => p - case Dummy1143(p) => p - case Dummy1144(p) => p - case Dummy1145(p) => p - case Dummy1146(p) => p - case Dummy1147(p) => p - case Dummy1148(p) => p - case Dummy1149(p) => p - case Dummy1150(p) => p - case Dummy1151(p) => p - case Dummy1152(p) => p - case Dummy1153(p) => p - case Dummy1154(p) => p - case Dummy1155(p) => p - case Dummy1156(p) => p - case Dummy1157(p) => p - case Dummy1158(p) => p - case Dummy1159(p) => p - case Dummy1160(p) => p - case Dummy1161(p) => p - case Dummy1162(p) => p - case Dummy1163(p) => p - case Dummy1164(p) => p - case Dummy1165(p) => p - case Dummy1166(p) => p - case Dummy1167(p) => p - case Dummy1168(p) => p - case Dummy1169(p) => p - case Dummy1170(p) => p - case Dummy1171(p) => p - case Dummy1172(p) => p - case Dummy1173(p) => p - case Dummy1174(p) => p - case Dummy1175(p) => p - case Dummy1176(p) => p - case Dummy1177(p) => p - case Dummy1178(p) => p - case Dummy1179(p) => p - case Dummy1180(p) => p - case Dummy1181(p) => p - case Dummy1182(p) => p - case Dummy1183(p) => p - case Dummy1184(p) => p - case Dummy1185(p) => p - case Dummy1186(p) => p - case Dummy1187(p) => p - case Dummy1188(p) => p - case Dummy1189(p) => p - case Dummy1190(p) => p - case Dummy1191(p) => p - case Dummy1192(p) => p - case Dummy1193(p) => p - case Dummy1194(p) => p - case Dummy1195(p) => p - case Dummy1196(p) => p - case Dummy1197(p) => p - case Dummy1198(p) => p - case Dummy1199(p) => p - case Dummy1200(p) => p - case Dummy1201(p) => p - case Dummy1202(p) => p - case Dummy1203(p) => p - case Dummy1204(p) => p - case Dummy1205(p) => p - case Dummy1206(p) => p - case Dummy1207(p) => p - case Dummy1208(p) => p - case Dummy1209(p) => p - case Dummy1210(p) => p - case Dummy1211(p) => p - case Dummy1212(p) => p - case Dummy1213(p) => p - case Dummy1214(p) => p - case Dummy1215(p) => p - case Dummy1216(p) => p - case Dummy1217(p) => p - case Dummy1218(p) => p - case Dummy1219(p) => p - case Dummy1220(p) => p - case Dummy1221(p) => p - case Dummy1222(p) => p - case Dummy1223(p) => p - case Dummy1224(p) => p - case Dummy1225(p) => p - case Dummy1226(p) => p - case Dummy1227(p) => p - case Dummy1228(p) => p - case Dummy1229(p) => p - case Dummy1230(p) => p - case Dummy1231(p) => p - case Dummy1232(p) => p - case Dummy1233(p) => p - case Dummy1234(p) => p - case Dummy1235(p) => p - case Dummy1236(p) => p - case Dummy1237(p) => p - case Dummy1238(p) => p - case Dummy1239(p) => p - case Dummy1240(p) => p - case Dummy1241(p) => p - case Dummy1242(p) => p - case Dummy1243(p) => p - case Dummy1244(p) => p - case Dummy1245(p) => p - case Dummy1246(p) => p - case Dummy1247(p) => p - case Dummy1248(p) => p - case Dummy1249(p) => p - case Dummy1250(p) => p - case Dummy1251(p) => p - case Dummy1252(p) => p - case Dummy1253(p) => p - case Dummy1254(p) => p - case Dummy1255(p) => p - case Dummy1256(p) => p - case Dummy1257(p) => p - case Dummy1258(p) => p - case Dummy1259(p) => p - case Dummy1260(p) => p - case Dummy1261(p) => p - case Dummy1262(p) => p - case Dummy1263(p) => p - case Dummy1264(p) => p - case Dummy1265(p) => p - case Dummy1266(p) => p - case Dummy1267(p) => p - case Dummy1268(p) => p - case Dummy1269(p) => p - case Dummy1270(p) => p - case Dummy1271(p) => p - case Dummy1272(p) => p - case Dummy1273(p) => p - case Dummy1274(p) => p - case Dummy1275(p) => p - case Dummy1276(p) => p - case Dummy1277(p) => p - case Dummy1278(p) => p - case Dummy1279(p) => p - case Dummy1280(p) => p - case Dummy1281(p) => p - case Dummy1282(p) => p - case Dummy1283(p) => p - case Dummy1284(p) => p - case Dummy1285(p) => p - case Dummy1286(p) => p - case Dummy1287(p) => p - case Dummy1288(p) => p - case Dummy1289(p) => p - case Dummy1290(p) => p - case Dummy1291(p) => p - case Dummy1292(p) => p - case Dummy1293(p) => p - case Dummy1294(p) => p - case Dummy1295(p) => p - case Dummy1296(p) => p - case Dummy1297(p) => p - case Dummy1298(p) => p - case Dummy1299(p) => p - case Dummy1300(p) => p - case Dummy1301(p) => p - case Dummy1302(p) => p - case Dummy1303(p) => p - case Dummy1304(p) => p - case Dummy1305(p) => p - case Dummy1306(p) => p - case Dummy1307(p) => p - case Dummy1308(p) => p - case Dummy1309(p) => p - case Dummy1310(p) => p - case Dummy1311(p) => p - case Dummy1312(p) => p - case Dummy1313(p) => p - case Dummy1314(p) => p - case Dummy1315(p) => p - case Dummy1316(p) => p - case Dummy1317(p) => p - case Dummy1318(p) => p - case Dummy1319(p) => p - case Dummy1320(p) => p - case Dummy1321(p) => p - case Dummy1322(p) => p - case Dummy1323(p) => p - case Dummy1324(p) => p - case Dummy1325(p) => p - case Dummy1326(p) => p - case Dummy1327(p) => p - case Dummy1328(p) => p - case Dummy1329(p) => p - case Dummy1330(p) => p - case Dummy1331(p) => p - case Dummy1332(p) => p - case Dummy1333(p) => p - case Dummy1334(p) => p - case Dummy1335(p) => p - case Dummy1336(p) => p - case Dummy1337(p) => p - case Dummy1338(p) => p - case Dummy1339(p) => p - case Dummy1340(p) => p - case Dummy1341(p) => p - case Dummy1342(p) => p - case Dummy1343(p) => p - case Dummy1344(p) => p - case Dummy1345(p) => p - case Dummy1346(p) => p - case Dummy1347(p) => p - case Dummy1348(p) => p - case Dummy1349(p) => p - case Dummy1350(p) => p - case Dummy1351(p) => p - case Dummy1352(p) => p - case Dummy1353(p) => p - case Dummy1354(p) => p - case Dummy1355(p) => p - case Dummy1356(p) => p - case Dummy1357(p) => p - case Dummy1358(p) => p - case Dummy1359(p) => p - case Dummy1360(p) => p - case Dummy1361(p) => p - case Dummy1362(p) => p - case Dummy1363(p) => p - case Dummy1364(p) => p - case Dummy1365(p) => p - case Dummy1366(p) => p - case Dummy1367(p) => p - case Dummy1368(p) => p - case Dummy1369(p) => p - case Dummy1370(p) => p - case Dummy1371(p) => p - case Dummy1372(p) => p - case Dummy1373(p) => p - case Dummy1374(p) => p - case Dummy1375(p) => p - case Dummy1376(p) => p - case Dummy1377(p) => p - case Dummy1378(p) => p - case Dummy1379(p) => p - case Dummy1380(p) => p - case Dummy1381(p) => p - case Dummy1382(p) => p - case Dummy1383(p) => p - case Dummy1384(p) => p - case Dummy1385(p) => p - case Dummy1386(p) => p - case Dummy1387(p) => p - case Dummy1388(p) => p - case Dummy1389(p) => p - case Dummy1390(p) => p - case Dummy1391(p) => p - case Dummy1392(p) => p - case Dummy1393(p) => p - case Dummy1394(p) => p - case Dummy1395(p) => p - case Dummy1396(p) => p - case Dummy1397(p) => p - case Dummy1398(p) => p - case Dummy1399(p) => p - case Dummy1400(p) => p - case Dummy1401(p) => p - case Dummy1402(p) => p - case Dummy1403(p) => p - case Dummy1404(p) => p - case Dummy1405(p) => p - case Dummy1406(p) => p - case Dummy1407(p) => p - case Dummy1408(p) => p - case Dummy1409(p) => p - case Dummy1410(p) => p - case Dummy1411(p) => p - case Dummy1412(p) => p - case Dummy1413(p) => p - case Dummy1414(p) => p - case Dummy1415(p) => p - case Dummy1416(p) => p - case Dummy1417(p) => p - case Dummy1418(p) => p - case Dummy1419(p) => p - case Dummy1420(p) => p - case Dummy1421(p) => p - case Dummy1422(p) => p - case Dummy1423(p) => p - case Dummy1424(p) => p - case Dummy1425(p) => p - case Dummy1426(p) => p - case Dummy1427(p) => p - case Dummy1428(p) => p - case Dummy1429(p) => p - case Dummy1430(p) => p - case Dummy1431(p) => p - case Dummy1432(p) => p - case Dummy1433(p) => p - case Dummy1434(p) => p - case Dummy1435(p) => p - case Dummy1436(p) => p - case Dummy1437(p) => p - case Dummy1438(p) => p - case Dummy1439(p) => p - case Dummy1440(p) => p - case Dummy1441(p) => p - case Dummy1442(p) => p - case Dummy1443(p) => p - case Dummy1444(p) => p - case Dummy1445(p) => p - case Dummy1446(p) => p - case Dummy1447(p) => p - case Dummy1448(p) => p - case Dummy1449(p) => p - case Dummy1450(p) => p - case Dummy1451(p) => p - case Dummy1452(p) => p - case Dummy1453(p) => p - case Dummy1454(p) => p - case Dummy1455(p) => p - case Dummy1456(p) => p - case Dummy1457(p) => p - case Dummy1458(p) => p - case Dummy1459(p) => p - case Dummy1460(p) => p - case Dummy1461(p) => p - case Dummy1462(p) => p - case Dummy1463(p) => p - case Dummy1464(p) => p - case Dummy1465(p) => p - case Dummy1466(p) => p - case Dummy1467(p) => p - case Dummy1468(p) => p - case Dummy1469(p) => p - case Dummy1470(p) => p - case Dummy1471(p) => p - case Dummy1472(p) => p - case Dummy1473(p) => p - case Dummy1474(p) => p - case Dummy1475(p) => p - case Dummy1476(p) => p - case Dummy1477(p) => p - case Dummy1478(p) => p - case Dummy1479(p) => p - case Dummy1480(p) => p - case Dummy1481(p) => p - case Dummy1482(p) => p - case Dummy1483(p) => p - case Dummy1484(p) => p - case Dummy1485(p) => p - case Dummy1486(p) => p - case Dummy1487(p) => p - case Dummy1488(p) => p - case Dummy1489(p) => p - case Dummy1490(p) => p - case Dummy1491(p) => p - case Dummy1492(p) => p - case Dummy1493(p) => p - case Dummy1494(p) => p - case Dummy1495(p) => p - case Dummy1496(p) => p - case Dummy1497(p) => p - case Dummy1498(p) => p - case Dummy1499(p) => p - case Dummy1500(p) => p - case Dummy1501(p) => p - case Dummy1502(p) => p - case Dummy1503(p) => p - case Dummy1504(p) => p - case Dummy1505(p) => p - case Dummy1506(p) => p - case Dummy1507(p) => p - case Dummy1508(p) => p - case Dummy1509(p) => p - case Dummy1510(p) => p - case Dummy1511(p) => p - case Dummy1512(p) => p - case Dummy1513(p) => p - case Dummy1514(p) => p - case Dummy1515(p) => p - case Dummy1516(p) => p - case Dummy1517(p) => p - case Dummy1518(p) => p - case Dummy1519(p) => p - case Dummy1520(p) => p - case Dummy1521(p) => p - case Dummy1522(p) => p - case Dummy1523(p) => p - case Dummy1524(p) => p - case Dummy1525(p) => p - case Dummy1526(p) => p - case Dummy1527(p) => p - case Dummy1528(p) => p - case Dummy1529(p) => p - case Dummy1530(p) => p - case Dummy1531(p) => p - case Dummy1532(p) => p - case Dummy1533(p) => p - case Dummy1534(p) => p - case Dummy1535(p) => p - case Dummy1536(p) => p - case Dummy1537(p) => p - case Dummy1538(p) => p - case Dummy1539(p) => p - case Dummy1540(p) => p - case Dummy1541(p) => p - case Dummy1542(p) => p - case Dummy1543(p) => p - case Dummy1544(p) => p - case Dummy1545(p) => p - case Dummy1546(p) => p - case Dummy1547(p) => p - case Dummy1548(p) => p - case Dummy1549(p) => p - case Dummy1550(p) => p - case Dummy1551(p) => p - case Dummy1552(p) => p - case Dummy1553(p) => p - case Dummy1554(p) => p - case Dummy1555(p) => p - case Dummy1556(p) => p - case Dummy1557(p) => p - case Dummy1558(p) => p - case Dummy1559(p) => p - case Dummy1560(p) => p - case Dummy1561(p) => p - case Dummy1562(p) => p - case Dummy1563(p) => p - case Dummy1564(p) => p - case Dummy1565(p) => p - case Dummy1566(p) => p - case Dummy1567(p) => p - case Dummy1568(p) => p - case Dummy1569(p) => p - case Dummy1570(p) => p - case Dummy1571(p) => p - case Dummy1572(p) => p - case Dummy1573(p) => p - case Dummy1574(p) => p - case Dummy1575(p) => p - case Dummy1576(p) => p - case Dummy1577(p) => p - case Dummy1578(p) => p - case Dummy1579(p) => p - case Dummy1580(p) => p - case Dummy1581(p) => p - case Dummy1582(p) => p - case Dummy1583(p) => p - case Dummy1584(p) => p - case Dummy1585(p) => p - case Dummy1586(p) => p - case Dummy1587(p) => p - case Dummy1588(p) => p - case Dummy1589(p) => p - case Dummy1590(p) => p - case Dummy1591(p) => p - case Dummy1592(p) => p - case Dummy1593(p) => p - case Dummy1594(p) => p - case Dummy1595(p) => p - case Dummy1596(p) => p - case Dummy1597(p) => p - case Dummy1598(p) => p - case Dummy1599(p) => p - case Dummy1600(p) => p - case Dummy1601(p) => p - case Dummy1602(p) => p - case Dummy1603(p) => p - case Dummy1604(p) => p - case Dummy1605(p) => p - case Dummy1606(p) => p - case Dummy1607(p) => p - case Dummy1608(p) => p - case Dummy1609(p) => p - case Dummy1610(p) => p - case Dummy1611(p) => p - case Dummy1612(p) => p - case Dummy1613(p) => p - case Dummy1614(p) => p - case Dummy1615(p) => p - case Dummy1616(p) => p - case Dummy1617(p) => p - case Dummy1618(p) => p - case Dummy1619(p) => p - case Dummy1620(p) => p - case Dummy1621(p) => p - case Dummy1622(p) => p - case Dummy1623(p) => p - case Dummy1624(p) => p - case Dummy1625(p) => p - case Dummy1626(p) => p - case Dummy1627(p) => p - case Dummy1628(p) => p - case Dummy1629(p) => p - case Dummy1630(p) => p - case Dummy1631(p) => p - case Dummy1632(p) => p - case Dummy1633(p) => p - case Dummy1634(p) => p - case Dummy1635(p) => p - case Dummy1636(p) => p - case Dummy1637(p) => p - case Dummy1638(p) => p - case Dummy1639(p) => p - case Dummy1640(p) => p - case Dummy1641(p) => p - case Dummy1642(p) => p - case Dummy1643(p) => p - case Dummy1644(p) => p - case Dummy1645(p) => p - case Dummy1646(p) => p - case Dummy1647(p) => p - case Dummy1648(p) => p - case Dummy1649(p) => p - case Dummy1650(p) => p - case Dummy1651(p) => p - case Dummy1652(p) => p - case Dummy1653(p) => p - case Dummy1654(p) => p - case Dummy1655(p) => p - case Dummy1656(p) => p - case Dummy1657(p) => p - case Dummy1658(p) => p - case Dummy1659(p) => p - case Dummy1660(p) => p - case Dummy1661(p) => p - case Dummy1662(p) => p - case Dummy1663(p) => p - case Dummy1664(p) => p - case Dummy1665(p) => p - case Dummy1666(p) => p - case Dummy1667(p) => p - case Dummy1668(p) => p - case Dummy1669(p) => p - case Dummy1670(p) => p - case Dummy1671(p) => p - case Dummy1672(p) => p - case Dummy1673(p) => p - case Dummy1674(p) => p - case Dummy1675(p) => p - case Dummy1676(p) => p - case Dummy1677(p) => p - case Dummy1678(p) => p - case Dummy1679(p) => p - case Dummy1680(p) => p - case Dummy1681(p) => p - case Dummy1682(p) => p - case Dummy1683(p) => p - case Dummy1684(p) => p - case Dummy1685(p) => p - case Dummy1686(p) => p - case Dummy1687(p) => p - case Dummy1688(p) => p - case Dummy1689(p) => p - case Dummy1690(p) => p - case Dummy1691(p) => p - case Dummy1692(p) => p - case Dummy1693(p) => p - case Dummy1694(p) => p - case Dummy1695(p) => p - case Dummy1696(p) => p - case Dummy1697(p) => p - case Dummy1698(p) => p - case Dummy1699(p) => p - case Dummy1700(p) => p - case Dummy1701(p) => p - case Dummy1702(p) => p - case Dummy1703(p) => p - case Dummy1704(p) => p - case Dummy1705(p) => p - case Dummy1706(p) => p - case Dummy1707(p) => p - case Dummy1708(p) => p - case Dummy1709(p) => p - case Dummy1710(p) => p - case Dummy1711(p) => p - case Dummy1712(p) => p - case Dummy1713(p) => p - case Dummy1714(p) => p - case Dummy1715(p) => p - case Dummy1716(p) => p - case Dummy1717(p) => p - case Dummy1718(p) => p - case Dummy1719(p) => p - case Dummy1720(p) => p - case Dummy1721(p) => p - case Dummy1722(p) => p - case Dummy1723(p) => p - case Dummy1724(p) => p - case Dummy1725(p) => p - case Dummy1726(p) => p - case Dummy1727(p) => p - case Dummy1728(p) => p - case Dummy1729(p) => p - case Dummy1730(p) => p - case Dummy1731(p) => p - case Dummy1732(p) => p - case Dummy1733(p) => p - case Dummy1734(p) => p - case Dummy1735(p) => p - case Dummy1736(p) => p - case Dummy1737(p) => p - case Dummy1738(p) => p - case Dummy1739(p) => p - case Dummy1740(p) => p - case Dummy1741(p) => p - case Dummy1742(p) => p - case Dummy1743(p) => p - case Dummy1744(p) => p - case Dummy1745(p) => p - case Dummy1746(p) => p - case Dummy1747(p) => p - case Dummy1748(p) => p - case Dummy1749(p) => p - case Dummy1750(p) => p - case Dummy1751(p) => p - case Dummy1752(p) => p - case Dummy1753(p) => p - case Dummy1754(p) => p - case Dummy1755(p) => p - case Dummy1756(p) => p - case Dummy1757(p) => p - case Dummy1758(p) => p - case Dummy1759(p) => p - case Dummy1760(p) => p - case Dummy1761(p) => p - case Dummy1762(p) => p - case Dummy1763(p) => p - case Dummy1764(p) => p - case Dummy1765(p) => p - case Dummy1766(p) => p - case Dummy1767(p) => p - case Dummy1768(p) => p - case Dummy1769(p) => p - case Dummy1770(p) => p - case Dummy1771(p) => p - case Dummy1772(p) => p - case Dummy1773(p) => p - case Dummy1774(p) => p - case Dummy1775(p) => p - case Dummy1776(p) => p - case Dummy1777(p) => p - case Dummy1778(p) => p - case Dummy1779(p) => p - case Dummy1780(p) => p - case Dummy1781(p) => p - case Dummy1782(p) => p - case Dummy1783(p) => p - case Dummy1784(p) => p - case Dummy1785(p) => p - case Dummy1786(p) => p - case Dummy1787(p) => p - case Dummy1788(p) => p - case Dummy1789(p) => p - case Dummy1790(p) => p - case Dummy1791(p) => p - case Dummy1792(p) => p - case Dummy1793(p) => p - case Dummy1794(p) => p - case Dummy1795(p) => p - case Dummy1796(p) => p - case Dummy1797(p) => p - case Dummy1798(p) => p - case Dummy1799(p) => p - case Dummy1800(p) => p - case Dummy1801(p) => p - case Dummy1802(p) => p - case Dummy1803(p) => p - case Dummy1804(p) => p - case Dummy1805(p) => p - case Dummy1806(p) => p - case Dummy1807(p) => p - case Dummy1808(p) => p - case Dummy1809(p) => p - case Dummy1810(p) => p - case Dummy1811(p) => p - case Dummy1812(p) => p - case Dummy1813(p) => p - case Dummy1814(p) => p - case Dummy1815(p) => p - case Dummy1816(p) => p - case Dummy1817(p) => p - case Dummy1818(p) => p - case Dummy1819(p) => p - case Dummy1820(p) => p - case Dummy1821(p) => p - case Dummy1822(p) => p - case Dummy1823(p) => p - case Dummy1824(p) => p - case Dummy1825(p) => p - case Dummy1826(p) => p - case Dummy1827(p) => p - case Dummy1828(p) => p - case Dummy1829(p) => p - case Dummy1830(p) => p - case Dummy1831(p) => p - case Dummy1832(p) => p - case Dummy1833(p) => p - case Dummy1834(p) => p - case Dummy1835(p) => p - case Dummy1836(p) => p - case Dummy1837(p) => p - case Dummy1838(p) => p - case Dummy1839(p) => p - case Dummy1840(p) => p - case Dummy1841(p) => p - case Dummy1842(p) => p - case Dummy1843(p) => p - case Dummy1844(p) => p - case Dummy1845(p) => p - case Dummy1846(p) => p - case Dummy1847(p) => p - case Dummy1848(p) => p - case Dummy1849(p) => p - case Dummy1850(p) => p - case Dummy1851(p) => p - case Dummy1852(p) => p - case Dummy1853(p) => p - case Dummy1854(p) => p - case Dummy1855(p) => p - case Dummy1856(p) => p - case Dummy1857(p) => p - case Dummy1858(p) => p - case Dummy1859(p) => p - case Dummy1860(p) => p - case Dummy1861(p) => p - case Dummy1862(p) => p - case Dummy1863(p) => p - case Dummy1864(p) => p - case Dummy1865(p) => p - case Dummy1866(p) => p - case Dummy1867(p) => p - case Dummy1868(p) => p - case Dummy1869(p) => p - case Dummy1870(p) => p - case Dummy1871(p) => p - case Dummy1872(p) => p - case Dummy1873(p) => p - case Dummy1874(p) => p - case Dummy1875(p) => p - case Dummy1876(p) => p - case Dummy1877(p) => p - case Dummy1878(p) => p - case Dummy1879(p) => p - case Dummy1880(p) => p - case Dummy1881(p) => p - case Dummy1882(p) => p - case Dummy1883(p) => p - case Dummy1884(p) => p - case Dummy1885(p) => p - case Dummy1886(p) => p - case Dummy1887(p) => p - case Dummy1888(p) => p - case Dummy1889(p) => p - case Dummy1890(p) => p - case Dummy1891(p) => p - case Dummy1892(p) => p - case Dummy1893(p) => p - case Dummy1894(p) => p - case Dummy1895(p) => p - case Dummy1896(p) => p - case Dummy1897(p) => p - case Dummy1898(p) => p - case Dummy1899(p) => p - case Dummy1900(p) => p - case Dummy1901(p) => p - case Dummy1902(p) => p - case Dummy1903(p) => p - case Dummy1904(p) => p - case Dummy1905(p) => p - case Dummy1906(p) => p - case Dummy1907(p) => p - case Dummy1908(p) => p - case Dummy1909(p) => p - case Dummy1910(p) => p - case Dummy1911(p) => p - case Dummy1912(p) => p - case Dummy1913(p) => p - case Dummy1914(p) => p - case Dummy1915(p) => p - case Dummy1916(p) => p - case Dummy1917(p) => p - case Dummy1918(p) => p - case Dummy1919(p) => p - case Dummy1920(p) => p - case Dummy1921(p) => p - case Dummy1922(p) => p - case Dummy1923(p) => p - case Dummy1924(p) => p - case Dummy1925(p) => p - case Dummy1926(p) => p - case Dummy1927(p) => p - case Dummy1928(p) => p - case Dummy1929(p) => p - case Dummy1930(p) => p - case Dummy1931(p) => p - case Dummy1932(p) => p - case Dummy1933(p) => p - case Dummy1934(p) => p - case Dummy1935(p) => p - case Dummy1936(p) => p - case Dummy1937(p) => p - case Dummy1938(p) => p - case Dummy1939(p) => p - case Dummy1940(p) => p - case Dummy1941(p) => p - case Dummy1942(p) => p - case Dummy1943(p) => p - case Dummy1944(p) => p - case Dummy1945(p) => p - case Dummy1946(p) => p - case Dummy1947(p) => p - case Dummy1948(p) => p - case Dummy1949(p) => p - case Dummy1950(p) => p - case Dummy1951(p) => p - case Dummy1952(p) => p - case Dummy1953(p) => p - case Dummy1954(p) => p - case Dummy1955(p) => p - case Dummy1956(p) => p - case Dummy1957(p) => p - case Dummy1958(p) => p - case Dummy1959(p) => p - case Dummy1960(p) => p - case Dummy1961(p) => p - case Dummy1962(p) => p - case Dummy1963(p) => p - case Dummy1964(p) => p - case Dummy1965(p) => p - case Dummy1966(p) => p - case Dummy1967(p) => p - case Dummy1968(p) => p - case Dummy1969(p) => p - case Dummy1970(p) => p - case Dummy1971(p) => p - case Dummy1972(p) => p - case Dummy1973(p) => p - case Dummy1974(p) => p - case Dummy1975(p) => p - case Dummy1976(p) => p - case Dummy1977(p) => p - case Dummy1978(p) => p - case Dummy1979(p) => p - case Dummy1980(p) => p - case Dummy1981(p) => p - case Dummy1982(p) => p - case Dummy1983(p) => p - case Dummy1984(p) => p - case Dummy1985(p) => p - case Dummy1986(p) => p - case Dummy1987(p) => p - case Dummy1988(p) => p - case Dummy1989(p) => p - case Dummy1990(p) => p - case Dummy1991(p) => p - case Dummy1992(p) => p - case Dummy1993(p) => p - case Dummy1994(p) => p - case Dummy1995(p) => p - case Dummy1996(p) => p - case Dummy1997(p) => p - case Dummy1998(p) => p - case Dummy1999(p) => p -} -} diff --git a/test/benchmarks/bench b/test/benchmarks/bench deleted file mode 100755 index 3aa7e7468c..0000000000 --- a/test/benchmarks/bench +++ /dev/null @@ -1,63 +0,0 @@ - -################################################################# -# -# A simple script used to rebuild benchmarks using fsc and then run them. -# If you need to rebuild, use: -# -# ./bench <arguments> -# -# Omitting <arguments> will print more information. -# If you don't want to rebuild: -# -# ./bench skip <same-args-as-above> -# -################################################################# - - -TOP_DIR=$PWD -# build/pack for ant, target/pack for sbt -SCALA_BUILD_DIR=../../target/pack -SRC_DIR=src/ -TARGET_DIR=target -CLASS_DIR=$TARGET_DIR/classes - -FSC=$SCALA_BUILD_DIR/bin/fsc -SCALA_LIBS_PATH=$SCALA_BUILD_DIR/lib -CLASSPATH=$SCALA_LIBS_PATH/scala-library.jar:lib/jsr166_and_extra.jar - -ARTIFACT=benchmarks.jar -ARTIFACT_PATH=$TARGET_DIR/$ARTIFACT - - -if [ "$1" != "skip" ] -then - # fetch source file list - find $SRC_DIR -name *.scala -print > source.list - - # recompile with fsc - $FSC -cp $CLASSPATH -d $CLASS_DIR @source.list - - # copy files - cd $SRC_DIR - cp -r * ../$CLASS_DIR - cd .. - - # jar it up - rm $ARTIFACT_PATH - cd $CLASS_DIR - jar cf $ARTIFACT . - mv $ARTIFACT $TOP_DIR/$ARTIFACT_PATH - cd $TOP_DIR -fi - -# run a benchmark -RUNCOMMAND="java -Xms256m -Xmx512m -server -cp $CLASSPATH:$ARTIFACT_PATH scala.collection.parallel.Benchmarking " -if [ "$1" != skip ] -then - $RUNCOMMAND "$@" -else - $RUNCOMMAND $2 $3 $4 $5 $6 $7 $8 -fi - - - diff --git a/test/benchmarks/lib/jsr166_and_extra.jar.desired.sha1 b/test/benchmarks/lib/jsr166_and_extra.jar.desired.sha1 deleted file mode 100644 index c879571eae..0000000000 --- a/test/benchmarks/lib/jsr166_and_extra.jar.desired.sha1 +++ /dev/null @@ -1 +0,0 @@ -0392ecdeb306263c471ce51fa368223388b82b61 ?jsr166_and_extra.jar diff --git a/test/benchmarks/source.list b/test/benchmarks/source.list deleted file mode 100644 index c5d5f7f8fe..0000000000 --- a/test/benchmarks/source.list +++ /dev/null @@ -1,79 +0,0 @@ -src/scala/collection/parallel/Benchmarking.scala -src/scala/collection/parallel/benchmarks/parallel_view/SeqViewBenches.scala -src/scala/collection/parallel/benchmarks/hashtables/ParallelHashTables.scala -src/scala/collection/parallel/benchmarks/hashtables/ParallelHashTableSets.scala -src/scala/collection/parallel/benchmarks/arrays/ObjectAccess.scala -src/scala/collection/parallel/benchmarks/arrays/IntAccess.scala -src/scala/collection/parallel/benchmarks/arrays/Resetting.scala -src/scala/collection/parallel/benchmarks/arrays/Arrays.scala -src/scala/collection/parallel/benchmarks/arrays/UnknownManif.scala -src/scala/collection/parallel/benchmarks/arrays/Dummy.scala -src/scala/collection/parallel/benchmarks/parallel_array/FlatMapLight.scala -src/scala/collection/parallel/benchmarks/parallel_array/FilterLight.scala -src/scala/collection/parallel/benchmarks/parallel_array/CountHeavy.scala -src/scala/collection/parallel/benchmarks/parallel_array/PartitionLight.scala -src/scala/collection/parallel/benchmarks/parallel_array/SliceFew.scala -src/scala/collection/parallel/benchmarks/parallel_array/SplitHalf.scala -src/scala/collection/parallel/benchmarks/parallel_array/PadToDouble.scala -src/scala/collection/parallel/benchmarks/parallel_array/IntersectHalf.scala -src/scala/collection/parallel/benchmarks/parallel_array/ForallLight.scala -src/scala/collection/parallel/benchmarks/parallel_array/AggregateLight.scala -src/scala/collection/parallel/benchmarks/parallel_array/SumLight.scala -src/scala/collection/parallel/benchmarks/parallel_array/MinLight.scala -src/scala/collection/parallel/benchmarks/parallel_array/CountList.scala -src/scala/collection/parallel/benchmarks/parallel_array/PatchHalf.scala -src/scala/collection/parallel/benchmarks/parallel_array/GroupBy.scala -src/scala/collection/parallel/benchmarks/parallel_array/DiffHalf.scala -src/scala/collection/parallel/benchmarks/parallel_array/TakeMany.scala -src/scala/collection/parallel/benchmarks/parallel_array/PartialMapLight.scala -src/scala/collection/parallel/benchmarks/parallel_array/ScanLight.scala -src/scala/collection/parallel/benchmarks/parallel_array/Reverse.scala -src/scala/collection/parallel/benchmarks/parallel_array/SpanLight.scala -src/scala/collection/parallel/benchmarks/parallel_array/PlusPlus.scala -src/scala/collection/parallel/benchmarks/parallel_array/ReduceNew.scala -src/scala/collection/parallel/benchmarks/parallel_array/Resettable.scala -src/scala/collection/parallel/benchmarks/parallel_array/ReducePrime.scala -src/scala/collection/parallel/benchmarks/parallel_array/DropMany.scala -src/scala/collection/parallel/benchmarks/parallel_array/ReduceList.scala -src/scala/collection/parallel/benchmarks/parallel_array/ForeachLight.scala -src/scala/collection/parallel/benchmarks/parallel_array/ScanMedium.scala -src/scala/collection/parallel/benchmarks/parallel_array/MatrixMultiplication.scala -src/scala/collection/parallel/benchmarks/parallel_array/SliceMedium.scala -src/scala/collection/parallel/benchmarks/parallel_array/ReverseMap.scala -src/scala/collection/parallel/benchmarks/parallel_array/Companion.scala -src/scala/collection/parallel/benchmarks/parallel_array/CountLight.scala -src/scala/collection/parallel/benchmarks/parallel_array/IndexWhere.scala -src/scala/collection/parallel/benchmarks/parallel_array/LastIndexWhere.scala -src/scala/collection/parallel/benchmarks/parallel_array/ReduceLight.scala -src/scala/collection/parallel/benchmarks/parallel_array/CopyToArray.scala -src/scala/collection/parallel/benchmarks/parallel_array/MapLight.scala -src/scala/collection/parallel/benchmarks/parallel_array/RemoveDuplicates.scala -src/scala/collection/parallel/benchmarks/parallel_array/SliceMany.scala -src/scala/collection/parallel/benchmarks/parallel_array/TakeWhileLight.scala -src/scala/collection/parallel/benchmarks/parallel_array/SegmentLength.scala -src/scala/collection/parallel/benchmarks/parallel_array/ForeachHeavy.scala -src/scala/collection/parallel/benchmarks/parallel_array/FindLight.scala -src/scala/collection/parallel/benchmarks/parallel_array/ForallQuickStop.scala -src/scala/collection/parallel/benchmarks/parallel_array/ForallStop80k.scala -src/scala/collection/parallel/benchmarks/parallel_array/SameElementsLong.scala -src/scala/collection/parallel/benchmarks/parallel_array/SequentialOps.scala -src/scala/collection/parallel/benchmarks/parallel_array/ForallHeavy.scala -src/scala/collection/parallel/benchmarks/parallel_array/ExistsLight.scala -src/scala/collection/parallel/benchmarks/parallel_array/ReduceHeavy.scala -src/scala/collection/parallel/benchmarks/parallel_array/Corresponds.scala -src/scala/collection/parallel/benchmarks/generic/Operators.scala -src/scala/collection/parallel/benchmarks/generic/ParallelBenches.scala -src/scala/collection/parallel/benchmarks/generic/Dummy.scala -src/scala/collection/parallel/benchmarks/parallel_range/RangeBenches.scala -src/scala/collection/parallel/benchmarks/misc/Dictionary.scala -src/scala/collection/parallel/benchmarks/misc/Loader.scala -src/scala/collection/parallel/benchmarks/misc/Coder.scala -src/scala/collection/parallel/benchmarks/Bench.scala -src/scala/collection/parallel/benchmarks/hashtries/Foreach.scala -src/scala/collection/parallel/benchmarks/hashtries/Combine.scala -src/scala/collection/parallel/benchmarks/hashtries/MultipleCombine.scala -src/scala/collection/parallel/benchmarks/hashtries/Iterate.scala -src/scala/collection/parallel/benchmarks/hashtries/Construct.scala -src/scala/collection/parallel/benchmarks/hashtries/IntInit.scala -src/scala/collection/parallel/benchmarks/hashtries/Lookup.scala -src/scala/collection/parallel/benchmarks/hashtries/ParallelHashTries.scala diff --git a/test/benchmarks/src/scala/collection/immutable/range-bench.scala b/test/benchmarks/src/scala/collection/immutable/range-bench.scala deleted file mode 100644 index e167ff04e8..0000000000 --- a/test/benchmarks/src/scala/collection/immutable/range-bench.scala +++ /dev/null @@ -1,61 +0,0 @@ -package scala.collection.immutable -package benchmarks - -object RangeTest { - // not inlined any more, needs investigation - // - // class XXS { - // private val array = Array.range(0, 100) - // def tst = { var sum = 0; for (i <- 0 until array.length) sum += array(i); sum } - // } - - var x: Int = 0 - - def foreachSum(max: Int): Int = { - var sum = 0 - 1 to max foreach (sum += _) - sum - } - def whileSum(max: Int) = { - var sum = 0 - var num = 1 - while (num <= max) { - sum += num - num += 1 - } - sum - } - - def show(max: Int, foreachNanos: Long, whileNanos: Long) { - val winner = if (foreachNanos < whileNanos) "foreachSum" else "whileSum" - val ratio = if (foreachNanos < whileNanos) foreachNanos.toDouble / whileNanos else whileNanos.toDouble / foreachNanos - println("1 to %d:, %12s wins, %.3f: foreach %.3f while %.3f".format( - max, winner, ratio, - foreachNanos.toDouble / 1000000L, - whileNanos.toDouble / 1000000L) - ) - } - - def run(max: Int) = { - val foreachFirst = util.Random.nextBoolean - val t1 = System.nanoTime - x = if (foreachFirst) foreachSum(max) else whileSum(max) - val t2 = System.nanoTime - x = if (foreachFirst) whileSum(max) else foreachSum(max) - val t3 = System.nanoTime - - val foreachNanos = if (foreachFirst) t2 - t1 else t3 - t2 - val whileNanos = if (foreachFirst) t3 - t2 else t2 - t1 - show(max, foreachNanos, whileNanos) - } - - def main(args: Array[String]): Unit = { - var max = if (args.isEmpty) 100 else args(0).toInt - while (max > 0) { - run(max) - run(max) - run(max) - max += (max / 7) - } - } -} diff --git a/test/benchmarks/src/scala/collection/mutable/hashtable-bench.scala b/test/benchmarks/src/scala/collection/mutable/hashtable-bench.scala deleted file mode 100644 index c01e7cb46e..0000000000 --- a/test/benchmarks/src/scala/collection/mutable/hashtable-bench.scala +++ /dev/null @@ -1,61 +0,0 @@ -import scala.collection.mutable.HashMap - -object Test { - var dummy: Long = 0L - var _foreach: Long = 0L - var _iterator: Long = 0L - - def numbers: Seq[Int] = 1 to 1000000 - val map: HashMap[Int, Int] = HashMap(numbers zip numbers: _*) - - @inline final def timed(body: => Unit): Long = { - val start = System.nanoTime - body - System.nanoTime - start - } - - def go(xs: Iterable[Int], reps: Int) = { - _foreach = 0L - _iterator = 0L - - 0 until reps foreach { _ => - _foreach += timed(xs foreach (dummy += _)) - _iterator += timed(xs.iterator foreach (dummy += _)) - } - - " foreach avg " + (_foreach / reps) + "\n iterator avg " + (_iterator / reps) + "\n" - } - - def go2(xs: collection.Map[Int, Int], reps: Int) = { - _foreach = 0L - _iterator = 0L - - def incDummy(nums: (Int, Int)) = { - dummy += nums._1 - dummy -= nums._2 - } - - 0 until reps foreach { _ => - _foreach += timed(xs foreach incDummy) - _iterator += timed(xs.iterator foreach incDummy) - } - - " foreach avg " + (_foreach / reps) + "\n iterator avg " + (_iterator / reps) + "\n" - } - - def main(args: Array[String]): Unit = { - println("map.keys:") - go(map.keys, 10) // warm - println(go(map.keys, 10)) - - println("map.values:") - go(map.values, 10) // warm - println(go(map.values, 10)) - - println("map:") - go2(map, 10) // warm - println(go2(map, 10)) - - println("// pay me no mind ... " + dummy) - } -} diff --git a/test/benchmarks/src/scala/collection/parallel/Benchmarking.scala b/test/benchmarks/src/scala/collection/parallel/Benchmarking.scala deleted file mode 100644 index bd75764636..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/Benchmarking.scala +++ /dev/null @@ -1,223 +0,0 @@ -package scala.collection.parallel - - -import scala.collection.mutable.LinkedHashSet - -import benchmarks._ - - -/** - * All benchmarks are registered here. - * - * @author prokopec - */ -trait BenchmarkRegister { - - val benchcreators = LinkedHashSet[BenchCompanion]() - - def register(companion: BenchCompanion) = benchcreators += companion - - // parallel array benchmarks - register(parallel_array.ReduceLight) - register(parallel_array.ReduceNew) - register(parallel_array.ReduceList) - register(parallel_array.ReducePrime) - register(parallel_array.ReduceHeavy) - register(parallel_array.CountLight) - register(parallel_array.CountList) - register(parallel_array.CountHeavy) - register(parallel_array.ForeachLight) - register(parallel_array.ForeachHeavy) - register(parallel_array.SumLight) - register(parallel_array.MinLight) - register(parallel_array.MapLight) - register(parallel_array.FilterLight) - register(parallel_array.PartitionLight) - register(parallel_array.PartialMapLight) - register(parallel_array.FlatMapLight) - register(parallel_array.PlusPlus) - register(parallel_array.ForallLight) - register(parallel_array.ForallQuickStop) - register(parallel_array.ForallStop80k) - register(parallel_array.ForallHeavy) - register(parallel_array.ExistsLight) - register(parallel_array.FindLight) - register(parallel_array.TakeMany) - register(parallel_array.DropMany) - register(parallel_array.SliceMany) - register(parallel_array.SliceMedium) - register(parallel_array.SliceFew) - register(parallel_array.SplitHalf) - register(parallel_array.TakeWhileLight) - register(parallel_array.SpanLight) - register(parallel_array.CopyToArray) - register(parallel_array.SegmentLength) - register(parallel_array.IndexWhere) - register(parallel_array.LastIndexWhere) - register(parallel_array.Reverse) - register(parallel_array.ReverseMap) - register(parallel_array.SameElementsLong) - register(parallel_array.Corresponds) - register(parallel_array.DiffHalf) - register(parallel_array.IntersectHalf) - register(parallel_array.RemoveDuplicates) - register(parallel_array.PatchHalf) - register(parallel_array.PadToDouble) - register(parallel_array.AggregateLight) - register(parallel_array.ScanLight) - register(parallel_array.ScanMedium) - register(parallel_array.GroupByLight) - register(parallel_array.MatrixMultiplication) - - // parallel views - register(parallel_view.DummyViewBenchList.Reduce) - register(parallel_view.DummyViewBenchList.MediumReduce) - register(parallel_view.DummyViewBenchList.ModifyThenReduce) - register(parallel_view.DummyViewBenchList.ModifyThenForce) - register(parallel_view.DummyViewBenchList.Iteration) - register(parallel_view.DummyViewBenchList.IterationS) - register(parallel_view.DummyViewBenchList.IterationM) - register(parallel_view.DummyViewBenchList.IterationA) - register(parallel_view.DummyViewBenchList.IterationZ) - register(parallel_view.DummyViewBenchList.IterationP) - - // parallel ranges - register(parallel_range.RangeBenches.Reduce) - register(parallel_range.RangeBenches.ReduceMedium) - register(parallel_range.RangeBenches.ForeachAdd) - register(parallel_range.RangeBenches.ForeachAddCollatz) - register(parallel_range.RangeBenches.ForeachModify) - register(parallel_range.RangeBenches.ForeachModifyMedium) - register(parallel_range.RangeBenches.ForeachModifyHeavy) - register(parallel_range.RangeBenches.MapLight) - register(parallel_range.RangeBenches.MapMedium) - - // array benchmarks - register(arrays.ObjectAccess) - register(arrays.IntAccess) - - // hash benchmarks - register(hashtries.Foreach) - register(hashtries.Iterate) - register(hashtries.Construct) - register(hashtries.Lookup) - register(hashtries.Combine) - register(hashtries.MultipleCombine) - - // parallel hash trie benchmarks - register(hashtries.RefParHashTrieBenches.Reduce) - register(hashtries.RefParHashTrieBenches.ReduceMedium) - register(hashtries.RefParHashTrieBenches.Reduce2) - register(hashtries.RefParHashTrieBenches.Map) - register(hashtries.RefParHashTrieBenches.Map2) - - // parallel hash table map benchmarks - register(hashtables.RefParHashTableBenches.Reduce) - register(hashtables.RefParHashTableBenches.Reduce2) - register(hashtables.RefParHashTableBenches.Foreach) - register(hashtables.RefParHashTableBenches.ForeachSet) - register(hashtables.RefParHashTableBenches.Map) - register(hashtables.RefParHashTableBenches.Map2) - register(hashtables.RefParHashTableBenches.HeavyMap) - register(hashtables.RefParHashTableBenches.Filter) - register(hashtables.RefParHashTableBenches.FlatMap) - register(hashtables.RefParHashTableBenches.FlatMap2) - - // parallel hash table set benchmarks - register(hashtables.RefParHashTableSetBenches.Reduce) - register(hashtables.RefParHashTableSetBenches.Reduce2) - register(hashtables.RefParHashTableSetBenches.Foreach) - register(hashtables.RefParHashTableSetBenches.ForeachSet) - register(hashtables.RefParHashTableSetBenches.Map) - register(hashtables.RefParHashTableSetBenches.Map2) - register(hashtables.RefParHashTableSetBenches.HeavyMap) - register(hashtables.RefParHashTableSetBenches.Filter) - register(hashtables.RefParHashTableSetBenches.FlatMap) - - // general examples - register(misc.Coder) - register(misc.Loader) -} - - -/** - * Serves as an entrypoint to run all the benchmarks. - */ -object Benchmarking extends BenchmarkRegister { - - def printHelp { - println("Must enter at least four arguments: <collection> <benchmark> <size of the collection> <type>") - println(" Example: ParArray reduce-light 50000 par") - println(" Example: ParArray -all 50000 par") - println - println("General synthax: <collection> <benchmark> <size> <type> <parallelism-level>") - println(" <collection> - name of the collection to test, `-all` runs benchmarks for all collections") - println(" <benchmark> - name of the specific benchmark, `-all` runs all benchmarks for the chosen collections") - println(" <size> - the size (number of elements) of the collection, or `-default` for default size per benchmark") - println(" <type> - `seq` for benchmarking sequential version of the functionality") - println(" `par` for benchmarking parallel version of the functionality") - println(" `<something-else>` for running comparison benchmarks") - println(" `-all` for running sequential, parallel and comparison benchmarks") - println(" <parallelism-level> - the level of parallelism used (default 2)") - } - - def otherOptions(args: Array[String]) { - if (args.length == 0) printHelp - else args(0) match { - case "-list" => // lists all benchmarks - for (bc <- benchcreators) println(bc.fullname) - case _ => printHelp - } - } - - def main(args: Array[String]) { - if (args.length < 4) { - otherOptions(args) - return - } - - val collname = args(0) - val benchname = args(1) - val size = if (args(2) == "-default") -1 else args(2).toInt - val tpe = args(3) - val parlevel = if (args.length >= 5) args(4).toInt else 2 - - // find all benchmarks to run - val benches = benchcreators.filter(comp => { - (collname, benchname) match { - case ("-all", "-all") => true - case ("-all", bn) if (benchname != "-all") => bn == comp.benchName - case (cn, "-all") if (collname != "-all") => cn == comp.collectionName - case (cn, bn) => cn == comp.collectionName && bn == comp.benchName - } - }).flatMap(comp => { - val collsz = if (size != -1) size else comp.defaultSize - if (tpe != "-all") List(comp.apply(collsz, parlevel, tpe)) - else for (benchtype <- "seq" :: "par" :: comp.comparisons) - yield comp.apply(collsz, parlevel, benchtype) - }) - - println("Running benchmarks...") - for (b <- benches) b.executeBenchmark - } - -} - - - - - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/Bench.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/Bench.scala deleted file mode 100644 index c20bbaeef1..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/Bench.scala +++ /dev/null @@ -1,126 +0,0 @@ -package scala.collection.parallel.benchmarks - - -import scala.collection._ -import scala.testing.Benchmark - - - -trait BenchCompanion { - def benchName: String - def collectionName: String - def fullname = collectionName + "." + benchName - def defaultSize = 100000 - def comparisons = List[String]() - def apply(sz: Int, parallelism: Int, what: String): Bench -} - - -/** - * An interface for all benchmark classes. - * A benchmark runs some functionality a prespecified number of times. - */ -trait Bench extends Benchmark { - val size: Int - - val parallelism: Int - - val runWhat: String - - /** - * Name of the benchmark. Convention is for it to start with the name of the collection being - * tested, continuing '.' and ending with the name of the specific functionality being benchmarked. - * @return - */ - def name: String = companion.fullname - def collectionName: String = companion.collectionName - def benchName: String = companion.benchName - - def companion: BenchCompanion - - def runseq: Unit - - def runpar: Unit - - /** - * Describes the number of runs of the test. - */ - val runs = 10 - - /** - * Returns the number of repetitions for this benchmark. - */ - def repetitionsPerRun = 500 - - /** - * Resets the benchmark object. Typically, this means recreating - * the collection being tested. - */ - def reset: Unit - - /** - * Returns a map of available comparison tests. - */ - def comparisons: List[String] = companion.comparisons - - def comparison(name: String): Option[() => Unit] = comparisonMap.get(name) - - def comparisonMap: Map[String, () => Unit] - - def run = runWhat match { - case "seq" => for (i <- 0 until repetitionsPerRun) runseq - case "par" => for (i <- 0 until repetitionsPerRun) runpar - case _ => comparison(runWhat) match { - case Some(fun) => for (i <- 0 until repetitionsPerRun) fun() - case None => throw new IllegalArgumentException("Unknown bench option: `" + runWhat + - "`, need `seq`, `par` or one of: " + comparisons.mkString("`", "`, `", "`")) - } - } - - /** - * Prints results of the benchmark. May be overridden in benchmarks. - */ - def printResults {} - - def onEnd {} - - def executeBenchmark = { - println("-----------------------") - print(name + ", " + runWhat + ", par.=" + parallelism + ", sz=" + niceSize + ": ") - - val times = runBenchmark(runs) - - onEnd - - for (t <- times) print(t + " ") - println - printResults - } - - private def niceSize = if (size < 1000 || size % 1000 != 0) size.toString else size / 1000 + "k" -} - - -trait HavingResult[T] extends Bench { - var runresult: T = null.asInstanceOf[T] - - abstract override def printResults { - println("result: " + (if (runresult != null) runresult else "<not set>")) - super.printResults - } -} - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/Arrays.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/Arrays.scala deleted file mode 100644 index 39232122a9..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/Arrays.scala +++ /dev/null @@ -1,63 +0,0 @@ -package scala.collection.parallel.benchmarks.arrays - - - - - - - -object Arrays { - - @inline def genericApply[T](xs: Array[T], idx: Int): T = xs.asInstanceOf[AnyRef] match { - case x: Array[AnyRef] => x(idx).asInstanceOf[T] - case _ => genericApplyNotAnyRef(xs, idx) - } - - @noinline private def genericApplyNotAnyRef[T](xs: Array[T], idx: Int): T = xs.asInstanceOf[AnyRef] match { - case x: Array[Int] => x(idx).asInstanceOf[T] - case x: Array[Double] => x(idx).asInstanceOf[T] - case x: Array[Long] => x(idx).asInstanceOf[T] - case x: Array[Float] => x(idx).asInstanceOf[T] - case x: Array[Char] => x(idx).asInstanceOf[T] - case x: Array[Byte] => x(idx).asInstanceOf[T] - case x: Array[Short] => x(idx).asInstanceOf[T] - case x: Array[Boolean] => x(idx).asInstanceOf[T] - case x: Array[Unit] => x(idx).asInstanceOf[T] - case null => throw new NullPointerException - } - - @inline def apply(xs: AnyRef, idx: Int): Any = xs match { - case x: Array[AnyRef] => x(idx).asInstanceOf[Any] - case _ => applyNotAnyRef(xs, idx) - } - - @noinline private def applyNotAnyRef(xs: AnyRef, idx: Int): Any = xs match { - case x: Array[Int] => x(idx).asInstanceOf[Any] - case x: Array[Double] => x(idx).asInstanceOf[Any] - case x: Array[Long] => x(idx).asInstanceOf[Any] - case x: Array[Float] => x(idx).asInstanceOf[Any] - case x: Array[Char] => x(idx).asInstanceOf[Any] - case x: Array[Byte] => x(idx).asInstanceOf[Any] - case x: Array[Short] => x(idx).asInstanceOf[Any] - case x: Array[Boolean] => x(idx).asInstanceOf[Any] - case x: Array[Unit] => x(idx).asInstanceOf[Any] - case null => throw new NullPointerException - } - -} - - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/Dummy.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/Dummy.scala deleted file mode 100644 index 56af7b9d85..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/Dummy.scala +++ /dev/null @@ -1,22 +0,0 @@ -package scala.collection.parallel.benchmarks.arrays - - - - -case class Dummy(in: Int) { - def op = {} -} - -object Dummy { - def dummyOp(a: Int) = { if (a < 0) -1 } - def dummyOp(d: Dummy) = { if (d.in < 0) d.op } -} - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/IntAccess.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/IntAccess.scala deleted file mode 100644 index 81f0e4da03..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/IntAccess.scala +++ /dev/null @@ -1,68 +0,0 @@ -package scala.collection.parallel.benchmarks.arrays - - -import scala.collection.parallel.benchmarks._ - - - -object IntAccess extends BenchCompanion { - def collectionName = "array"; - def benchName = "access-int"; - def apply(sz: Int, p: Int, what: String) = new IntAccess(sz, p, what) - override def comparisons = List("any", "cast", "manif", "unknown") - override def defaultSize = 100000 -} - - -class IntAccess(sz: Int, p: Int, what: String) -extends Resetting(n => n, sz, p, what) with UnknownManif[Int] { - def companion = IntAccess - - def runseq {} - def runpar {} - - def runany = { - var i = 0 - while (i < sz) { - val d = anyarray(i).asInstanceOf[Int] - i += 1 - } - } - - def runcast = { - var i = 0 - while (i < sz) { - val d = Arrays.apply(castarray, i).asInstanceOf[Int] - i += 1 - } - } - - def runmanif = { - var i = 0 - while (i < sz) { - val d = manifarray(i) - if (op(d)) i += 1 - i += 1 - } - } - - def op(a: Int) = a < 0 - - def comparisonMap = collection.Map("any" -> runany _, "cast" -> runcast _, - "manif" -> runmanif _, "unknown" -> rununknown _) - -} - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/ObjectAccess.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/ObjectAccess.scala deleted file mode 100644 index 29251f3719..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/ObjectAccess.scala +++ /dev/null @@ -1,75 +0,0 @@ -package scala.collection.parallel.benchmarks.arrays - - -import scala.collection.parallel.benchmarks._ - - - -object ObjectAccess extends BenchCompanion { - def collectionName = "array"; - def benchName = "access-obj"; - def apply(sz: Int, p: Int, what: String) = new ObjectAccess(sz, p, what) - override def comparisons = List("any", "cast", "gencast", "manif", "unknown") - override def defaultSize = 100000 -} - - -class ObjectAccess(sz: Int, p: Int, what: String) -extends Resetting(Dummy(_), sz, p, what) with UnknownManif[Dummy] { - def companion = ObjectAccess - - def runseq {} - def runpar {} - - def runany = { - var i = 0 - while (i < sz) { - val d = anyarray(i).asInstanceOf[Dummy] - Dummy.dummyOp(d) - i += 1 - } - } - - def runcast = { - var i = 0 - while (i < sz) { - val d = Arrays.apply(castarray, i).asInstanceOf[Dummy] - i += 1 - } - } - - def rungenericcast = { - var i = 0 - while (i < sz) { - val d = Arrays.genericApply(gencastarray, i) - i += 1 - } - } - - def runmanif = { - var i = 0 - while (i < sz) { - val d = manifarray(i) - if (d.in < 0) i += 1 - i += 1 - } - } - - def comparisonMap = collection.Map("any" -> runany _, "cast" -> runcast _, "gencast" -> rungenericcast _, - "manif" -> runmanif _, "unknown" -> rununknown _) - -} - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/Resetting.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/Resetting.scala deleted file mode 100644 index 22d2107f62..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/Resetting.scala +++ /dev/null @@ -1,39 +0,0 @@ -package scala.collection.parallel.benchmarks.arrays - - -import scala.collection.parallel.benchmarks._ - - -abstract class Resetting[T: ClassTag](elemcreate: Int => T, sz: Int, p: Int, what: String) -extends Bench { - val size = sz - val parallelism = p - val runWhat = what - - var anyarray: Array[Any] = null - var castarray: AnyRef = null - var gencastarray: Array[T] = null - var manifarray: Array[T] = null - - reset - - def reset = what match { - case "any" => - anyarray = new Array[Any](sz) - for (i <- 0 until sz) anyarray(i) = elemcreate(i) - case "cast" => - val arr = new Array[T](sz) - for (i <- 0 until sz) arr(i) = elemcreate(i) - castarray = arr - case "gencast" => - gencastarray = new Array[T](sz) - for (i <- 0 until sz) gencastarray(i) = elemcreate(i) - case "manif" => - manifarray = new Array[T](sz) - for (i <- 0 until sz) manifarray(i) = elemcreate(i) - case "unknown" => - manifarray = new Array[T](sz) - for (i <- 0 until sz) manifarray(i) = elemcreate(i) - case _ => - } -} diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/UnknownManif.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/UnknownManif.scala deleted file mode 100644 index 46a28ae111..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/arrays/UnknownManif.scala +++ /dev/null @@ -1,38 +0,0 @@ -package scala.collection.parallel.benchmarks.arrays - - - - -trait UnknownManif[T] { - def manifarray: Array[T] - def size: Int - - def rununknown { - val arr = manifarray - val sz = size - var i = 0 - while (i < sz) { - val d = arr(i) - op(d) - i += 1 - } - } - - def op(d: Any) {} -} - - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/generic/Dummy.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/generic/Dummy.scala deleted file mode 100644 index 3b5308f8c2..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/generic/Dummy.scala +++ /dev/null @@ -1,83 +0,0 @@ -package scala.collection.parallel.benchmarks.generic - - - - -class Dummy(val in: Int) { - var num = in - override def toString = in.toString - override def hashCode = in - def dummy = num + in - def one = "1".length -} - - -object DummyOperators extends Operators[Dummy] { - val foreachFun = (a: Dummy) => { - a - () - } - val reducer = (a: Dummy, b: Dummy) => { - var i = 0 - if (a.in > b.in) { - a.num = a.in + b.in + i - a - } else { - b.num = a.in + b.in + i - b - } - } - private def rec(a: Int, b: Int): Int = { - val result = if (b == 0) a else { - rec(b, a - b * (a / b)) - } - result + 1000 - } - val mediumreducer = (a: Dummy, b: Dummy) => { - var i = 0 - var sum = a.num + b.num - b.num = rec(a.num, b.num) - b - } - val filterer = (a: Dummy) => { - a.in % 2 == 0 - } - val mapper = (a: Dummy) => { - a.num = a.dummy + a.num + a.in + a.one - a - } - override val mapper2 = (a: Dummy) => { - val x = 1 - new Dummy(a.in * -2 + x) - } - val heavymapper = (a: Dummy) => { - var i = -100 - while (i < 0) { - if (a.in < i) a.num += 1 - i += 1 - } - a - } - val flatmapper = (a: Dummy) => { - List(a, a, a, a, a) - } - val taker = (a: Dummy) => { - a.in >= 0 - } - val eachFun: Dummy => Unit = (d: Dummy) => { - d.dummy - } - override val eachPairFun: ((Dummy, Dummy)) => Unit = p => { - p._1.dummy - p._2.dummy - } - override def sequence(sz: Int): Seq[Dummy] = { - val pa = new collection.parallel.mutable.ParArray[Dummy](sz) - for (i <- 0 until sz) pa(i) = new Dummy(i) - pa - } -} - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/generic/Operators.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/generic/Operators.scala deleted file mode 100644 index 539e3f6972..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/generic/Operators.scala +++ /dev/null @@ -1,64 +0,0 @@ -package scala.collection.parallel.benchmarks.generic - - - - - - -trait Operators[T] { - - def foreachFun: T => Unit - def reducer: (T, T) => T - def mediumreducer: (T, T) => T - def filterer: T => Boolean - def mapper: T => T - def mapper2: T => T = error("unsupported") - def heavymapper: T => T - def flatmapper: T => Seq[T] - def taker: T => Boolean - def eachFun: T => Unit - def eachPairFun: ((T, T)) => Unit = error("unsupported") - def sequence(sz: Int): Seq[T] = error("unsupported") - -} - - - -trait IntOperators extends Operators[Int] { - - val foreachFun: Int => Unit = x => () - val reducer: (Int, Int) => Int = _ + _ - val mediumreducer: (Int, Int) => Int = (a: Int, b: Int) => { - val result = if (b == 0) a else { - mediumreducer.apply(b, a - b * (a / b)) - } - result + 1000 - } - val filterer: Int => Boolean = _ % 2 == 0 - val mapper: Int => Int = _ * 2 - val heavymapper: Int => Int = (n: Int) => { - var i = -10 - var sum = 0 - while (i < 0) { - sum += -i - i += 1 - } - n + sum - } - val flatmapper: Int => Seq[Int] = (n: Int) => { - List(n, n, n, n, n) - } - val taker: Int => Boolean = _ < 10000 - val eachFun: Int => Unit = { n => - n % 2 == 0 - } - -} - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/generic/ParallelBenches.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/generic/ParallelBenches.scala deleted file mode 100644 index c39c384927..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/generic/ParallelBenches.scala +++ /dev/null @@ -1,362 +0,0 @@ -package scala.collection.parallel -package benchmarks -package generic - - - -import scala.collection.SeqView - - - -trait ParIterableBenches[T, Coll <: ParIterable[T]] { -self => - - def createSequential(sz: Int, p: Int): Iterable[T] - def createParallel(sz: Int, p: Int): Coll - def nameOfCollection: String - def operators: Operators[T] - - trait IterableBenchCompanion extends BenchCompanion { - def collectionName = self.nameOfCollection - } - - trait IterableBench extends collection.parallel.benchmarks.Bench { - protected var seqcoll: Iterable[T] = null - protected var parcoll: Coll = null.asInstanceOf[Coll] - - reset - - def reset = runWhat match { - case "seq" => this.seqcoll = createSequential(size, parallelism) - case "par" => this.parcoll = createParallel(size, parallelism) - case _ => - } - - def nameOfCollection = self.nameOfCollection - def operators = self.operators - def createSequential(sz: Int, p: Int) = self.createSequential(size, parallelism) - def createParallel(sz: Int, p: Int) = self.createParallel(size, parallelism) - def forkJoinPool: scala.concurrent.forkjoin.ForkJoinPool = self.forkJoinPool - - override def printResults { - println(" --- Fork join pool state --- ") - println("Parallelism: " + forkJoinPool.getParallelism) - println("Active threads: " + forkJoinPool.getActiveThreadCount) - println("Work stealings: " + forkJoinPool.getStealCount) - } - - } - - def forkJoinPool: scala.concurrent.forkjoin.ForkJoinPool - -} - - -trait ParSeqBenches[T, Coll <: ParSeq[T]] extends ParIterableBenches[T, Coll] { -self => - - def createSequential(sz: Int, p: Int): Seq[T] - - trait SeqBenchCompanion extends BenchCompanion { - def collectionName = self.nameOfCollection - } - - trait SeqBench extends IterableBench { - def seqcollAsSeq = seqcoll.asInstanceOf[Seq[T]] - override def createSequential(sz: Int, p: Int) = self.createSequential(sz, p) - } - -} - - - - -/** Standard benchmarks for collections. - */ -trait StandardParIterableBenches[T, Coll <: ParIterable[T]] extends ParIterableBenches[T, Coll] { - - object Reduce extends IterableBenchCompanion { - override def defaultSize = 50000 - def benchName = "reduce"; - def apply(sz: Int, p: Int, w: String) = new Reduce(sz, p, w) - } - - class Reduce(val size: Int, val parallelism: Int, val runWhat: String) - extends IterableBench { - def comparisonMap = collection.Map() - def runseq = this.seqcoll.reduceLeft(operators.reducer) - def runpar = this.parcoll.reduce(operators.reducer) - def companion = Reduce - } - - object ReduceMedium extends IterableBenchCompanion { - override def defaultSize = 5000 - def benchName = "reduce-medium"; - def apply(sz: Int, p: Int, w: String) = new ReduceMedium(sz, p, w) - } - - class ReduceMedium(val size: Int, val parallelism: Int, val runWhat: String) - extends IterableBench { - def comparisonMap = collection.Map() - def runseq = this.seqcoll.reduceLeft(operators.mediumreducer) - def runpar = this.parcoll.reduce(operators.mediumreducer) - def companion = ReduceMedium - } - - object Map extends IterableBenchCompanion { - override def defaultSize = 5000 - def benchName = "map"; - def apply(sz: Int, p: Int, w: String) = new Map(sz, p, w) - } - - class Map(val size: Int, val parallelism: Int, val runWhat: String) - extends IterableBench { - def comparisonMap = collection.Map() - def runseq = this.seqcoll.map(operators.mapper) - def runpar = this.parcoll.map(operators.mapper) - def companion = Map - } - - object Filter extends IterableBenchCompanion { - override def defaultSize = 5000 - def benchName = "filter"; - def apply(sz: Int, p: Int, w: String) = new Filter(sz, p, w) - } - - class Filter(val size: Int, val parallelism: Int, val runWhat: String) - extends IterableBench { - def comparisonMap = collection.Map() - def runseq = this.seqcoll.filter(operators.filterer) - def runpar = this.parcoll.filter(operators.filterer) - def companion = Filter - } - - object FlatMap extends IterableBenchCompanion { - override def defaultSize = 5000 - def benchName = "flatmap"; - def apply(sz: Int, p: Int, w: String) = new FlatMap(sz, p, w) - } - - class FlatMap(val size: Int, val parallelism: Int, val runWhat: String) - extends IterableBench { - def comparisonMap = collection.Map() - def runseq = this.seqcoll.flatMap(operators.flatmapper) - def runpar = this.parcoll.flatMap(operators.flatmapper) - def companion = FlatMap - } - -} - - - -/** Benchmarks for sequence views. - */ -trait ParSeqViewBenches[T, Coll <: ParSeqView[T, ParSeq[T], CollSeq], CollSeq] extends ParSeqBenches[T, Coll] { -self => - - trait SeqViewBench extends SeqBench { - lazy val seqview: SeqView[T, Seq[T]] = createSeqView(size, parallelism) - - def createSeqView(sz: Int, p: Int) = self.createSeqView(sz, p) - } - - def createSeqView(sz: Int, p: Int): SeqView[T, Seq[T]] - - object Iteration extends SeqBenchCompanion { - override def defaultSize = 250000 - def benchName = "iter" - def apply(sz: Int, p: Int, w: String) = new Iteration(sz, p, w) - } - - class Iteration(val size: Int, val parallelism: Int, val runWhat: String) - extends SeqBench with SeqViewBench { - def comparisonMap = collection.Map("seqview" -> runseqview _) - def runseq = this.seqcoll.foreach(operators.eachFun) - def runpar = this.parcoll.pforeach(operators.eachFun) - def runseqview = { - this.seqview.foreach(operators.eachFun) - } - def companion = Iteration - } - - object IterationS extends SeqBenchCompanion { - override def defaultSize = 250000 - def benchName = "iter-s" - def apply(sz: Int, p: Int, w: String) = new IterationS(sz, p, w) - } - - class IterationS(val size: Int, val parallelism: Int, val runWhat: String) - extends SeqBench with SeqViewBench { - def comparisonMap = collection.Map("seqview" -> runseqview _) - def runseq = this.seqcoll.slice(0, size / 2).foreach(operators.eachFun) - def runpar = this.parcoll.slice(0, size / 2).pforeach(operators.eachFun) - def runseqview = this.seqview.slice(0, size / 2).foreach(operators.eachFun) - def companion = IterationS - } - - object IterationM extends SeqBenchCompanion { - override def defaultSize = 100000 - def benchName = "iter-m" - def apply(sz: Int, p: Int, w: String) = new IterationM(sz, p, w) - } - - class IterationM(val size: Int, val parallelism: Int, val runWhat: String) - extends SeqBench with SeqViewBench { - def comparisonMap = collection.Map("seqview" -> runseqview _) - def runseq = this.seqcoll.map(operators.mapper).foreach(operators.eachFun) - def runpar = this.parcoll.map(operators.mapper).pforeach(operators.eachFun) - def runseqview = this.seqview.map(operators.mapper).foreach(operators.eachFun) - def companion = IterationM - } - - object IterationA extends SeqBenchCompanion { - override def defaultSize = 50000 - def benchName = "iter-a" - def apply(sz: Int, p: Int, w: String) = new IterationA(sz, p, w) - } - - class IterationA(val size: Int, val parallelism: Int, val runWhat: String) - extends SeqBench with SeqViewBench { - val appended = operators.sequence(size) - val sqappended = appended.toSeq - def comparisonMap = collection.Map("seqview" -> runseqview _) - def runseq = { - val withapp = this.seqcoll.++(sqappended) - withapp.foreach(operators.eachFun) - } - def runpar = this.parcoll.++(appended).pforeach(operators.eachFun) - def runseqview = this.seqview.++(appended).foreach(operators.eachFun) - def companion = IterationA - } - - object IterationZ extends SeqBenchCompanion { - override def defaultSize = 50000 - def benchName = "iter-z" - def apply(sz: Int, p: Int, w: String) = new IterationZ(sz, p, w) - } - - class IterationZ(val size: Int, val parallelism: Int, val runWhat: String) - extends SeqBench with SeqViewBench { - val zipped = operators.sequence(size) - def comparisonMap = collection.Map("seqview" -> runseqview _) - def runseq = { - val withzip = this.seqcoll.zip(zipped) - withzip.foreach(operators.eachPairFun) - } - def runpar = this.parcoll.zip(zipped).pforeach(operators.eachPairFun) - def runseqview = this.seqview.zip(zipped).foreach(operators.eachPairFun) - def companion = IterationZ - } - - object IterationP extends SeqBenchCompanion { - override def defaultSize = 50000 - def benchName = "iter-p" - def apply(sz: Int, p: Int, w: String) = new IterationP(sz, p, w) - } - - class IterationP(val size: Int, val parallelism: Int, val runWhat: String) - extends SeqBench with SeqViewBench { - val patch = operators.sequence(size / 4) - val sqpatch = patch.toSeq - def comparisonMap = collection.Map("seqview" -> runseqview _) - def runseq = { - val withpatch = this.seqcollAsSeq.patch(size / 4, sqpatch, size / 2) - withpatch.foreach(operators.eachFun) - } - def runpar = this.parcoll.patch(size / 4, patch, size / 2).pforeach(operators.eachFun) - def runseqview = this.seqview.patch(size / 4, patch, size / 2).foreach(operators.eachFun) - def companion = IterationP - } - - object Reduce extends SeqBenchCompanion { - override def defaultSize = 50000 - def benchName = "reduce"; - def apply(sz: Int, p: Int, w: String) = new Reduce(sz, p, w) - } - - class Reduce(val size: Int, val parallelism: Int, val runWhat: String) - extends SeqBench with SeqViewBench { - def comparisonMap = collection.Map() - def runseq = this.seqcoll.reduceLeft(operators.reducer) - def runpar = this.parcoll.reduce(operators.reducer) - def companion = Reduce - } - - object MediumReduce extends SeqBenchCompanion { - override def defaultSize = 50000 - def benchName = "reduce-medium"; - def apply(sz: Int, p: Int, w: String) = new MediumReduce(sz, p, w) - } - - class MediumReduce(val size: Int, val parallelism: Int, val runWhat: String) - extends SeqBench with SeqViewBench { - def comparisonMap = collection.Map() - def runseq = this.seqcoll.reduceLeft(operators.mediumreducer) - def runpar = this.parcoll.reduce(operators.mediumreducer) - def companion = Reduce - } - - object ModifyThenReduce extends SeqBenchCompanion { - override def defaultSize = 20000 - def benchName = "modify-then-reduce"; - def apply(sz: Int, p: Int, w: String) = new ModifyThenReduce(sz, p, w) - } - - class ModifyThenReduce(val size: Int, val parallelism: Int, val runWhat: String) - extends SeqBench with SeqViewBench { - val toadd = createSequential(size, parallelism) - def comparisonMap = collection.Map() - def runseq = { - val modified = (seqcoll ++ toadd).drop(size).map(operators.mapper).++(toadd).take(size) - modified.reduceLeft(operators.reducer) - } - def runpar = { - val modified = (parcoll ++ toadd).drop(size).map(operators.mapper).++(toadd).take(size) - modified.reduce(operators.reducer) - } - def companion = ModifyThenReduce - } - - object ModifyThenForce extends SeqBenchCompanion { - override def defaultSize = 20000 - def benchName = "modify-then-force"; - def apply(sz: Int, p: Int, w: String) = new ModifyThenForce(sz, p, w) - } - - class ModifyThenForce(val size: Int, val parallelism: Int, val runWhat: String) - extends SeqBench with SeqViewBench { - val toadd = createSequential(size, parallelism) - def comparisonMap = collection.Map() - def runseq = (seqcoll ++ toadd).drop(size).map(operators.mapper).++(toadd).take(size) - def runpar = { - val r: ParSeqView[T, ParSeq[T], Seq[T]] = (parcoll ++ toadd).drop(size).map(operators.mapper).++(toadd).take(size) - r.force - } - def companion = ModifyThenForce - } - -} - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtables/ParallelHashTableSets.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtables/ParallelHashTableSets.scala deleted file mode 100644 index 17f0315103..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtables/ParallelHashTableSets.scala +++ /dev/null @@ -1,144 +0,0 @@ -package scala.collection.parallel.benchmarks.hashtables - - - - -import scala.collection.parallel.benchmarks.generic.StandardParIterableBenches -import scala.collection.parallel.benchmarks.generic.Dummy -import scala.collection.parallel.benchmarks.generic.DummyOperators -import scala.collection.parallel.mutable.ParHashSet - - - - - -trait ParHashTableSetBenches[T] extends StandardParIterableBenches[T, ParHashSet[T]] { - - def nameOfCollection = "mutable.ParHashSet" - def comparisonMap = collection.mutable.Set() - val forkJoinPool = new scala.concurrent.forkjoin.ForkJoinPool - - object Map2 extends IterableBenchCompanion { - override def defaultSize = 50000 - override def comparisons = List() - def benchName = "map2"; - def apply(sz: Int, p: Int, w: String) = new Map2(sz, p, w) - } - - class Map2(val size: Int, val parallelism: Int, val runWhat: String) - extends IterableBench { - var result: Int = 0 - def comparisonMap = collection.Map() - def runseq = { - val r = this.seqcoll.asInstanceOf[collection.mutable.HashSet[T]].map(operators.mapper2) - result = r.size - } - def runpar = { - result = this.parcoll.map(operators.mapper2).size - } - def companion = Map2 - override def repetitionsPerRun = 50 - override def printResults { - println("Size of last result: " + result) - } - } - - object HeavyMap extends IterableBenchCompanion { - override def defaultSize = 5000 - override def comparisons = List() - def benchName = "heavy-map"; - def apply(sz: Int, p: Int, w: String) = new HeavyMap(sz, p, w) - } - - class HeavyMap(val size: Int, val parallelism: Int, val runWhat: String) - extends IterableBench { - var result: Int = 0 - def comparisonMap = collection.Map() - def runseq = { - val r = this.seqcoll.asInstanceOf[collection.mutable.HashSet[T]].map(operators.heavymapper) - result = r.size - } - def runpar = { - result = this.parcoll.map(operators.heavymapper).size - } - def companion = HeavyMap - override def repetitionsPerRun = 50 - } - - object Reduce2 extends IterableBenchCompanion { - override def defaultSize = 50000 - override def comparisons = List() - def benchName = "reduce2"; - def apply(sz: Int, p: Int, w: String) = new Reduce2(sz, p, w) - } - - class Reduce2(val size: Int, val parallelism: Int, val runWhat: String) - extends IterableBench { - def comparisonMap = collection.Map() - def runseq = this.seqcoll.reduceLeft(operators.mediumreducer) - def runpar = this.parcoll.reduce(operators.mediumreducer) - def companion = Reduce2 - } - - object Foreach extends IterableBenchCompanion { - override def defaultSize = 50000 - override def comparisons = List() - def benchName = "foreach"; - def apply(sz: Int, p: Int, w: String) = new Foreach(sz, p, w) - } - - class Foreach(val size: Int, val parallelism: Int, val runWhat: String) - extends IterableBench { - def comparisonMap = collection.Map() - def runseq = this.seqcoll.foreach(operators.foreachFun) - def runpar = this.parcoll.pforeach(operators.foreachFun) - def companion = Foreach - } - -} - - - - - -object RefParHashTableSetBenches extends ParHashTableSetBenches[Dummy] { - - object ForeachSet extends IterableBenchCompanion { - override def defaultSize = 50000 - override def comparisons = List() - def benchName = "foreach-set"; - def apply(sz: Int, p: Int, w: String) = new ForeachSet(sz, p, w) - } - - class ForeachSet(val size: Int, val parallelism: Int, val runWhat: String) - extends IterableBench { - val array = new Array[Int](size) - def comparisonMap = collection.Map() - def runseq = for (x <- this.seqcoll) array(x.in) += 1 - def runpar = this.parcoll.pforeach { x => array(x.in) += 1 } - def companion = ForeachSet - - override def onEnd { - for (i <- 0 until array.length) { - assert(array(i) == repetitionsPerRun * runs) - } - } - } - - val operators = DummyOperators - - def createSequential(sz: Int, p: Int) = { - val ht = new collection.mutable.HashSet[Dummy] - for (i <- 0 until sz) ht += new Dummy(i) - ht - } - - def createParallel(sz: Int, p: Int) = { - val phm = new ParHashSet[Dummy] - for (i <- 0 until sz) phm += new Dummy(i) - forkJoinPool.setParallelism(p) - collection.parallel.tasksupport.environment = forkJoinPool - phm - } - -} diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtables/ParallelHashTables.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtables/ParallelHashTables.scala deleted file mode 100644 index 79d038bf3d..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtables/ParallelHashTables.scala +++ /dev/null @@ -1,232 +0,0 @@ -package scala.collection.parallel.benchmarks.hashtables - - - - -import scala.collection.parallel.benchmarks.generic.StandardParIterableBenches -import scala.collection.parallel.benchmarks.generic.Dummy -import scala.collection.parallel.benchmarks.generic.Operators -import scala.collection.parallel.mutable.ParHashMap - - - - - -trait ParHashTableBenches[K, V] extends StandardParIterableBenches[(K, V), ParHashMap[K, V]] { - - def nameOfCollection = "mutable.ParHashMap" - def comparisonMap = collection.mutable.Map() - val forkJoinPool = new scala.concurrent.forkjoin.ForkJoinPool - - object Map2 extends IterableBenchCompanion { - override def defaultSize = 40000 - override def comparisons = List("jhashtable") - def benchName = "map2"; - def apply(sz: Int, p: Int, w: String) = new Map2(sz, p, w) - } - - class Map2(val size: Int, val parallelism: Int, val runWhat: String) - extends IterableBench { - var result: Int = 0 - def comparisonMap = collection.Map("jhashtable" -> runjhashtable _) - def runseq = { - val r = this.seqcoll.asInstanceOf[collection.mutable.HashMap[K, V]].map(operators.mapper2) - result = r.size - } - def runpar = { - result = this.parcoll.map(operators.mapper2).size - } - def runjhashtable = { - val jumap = new java.util.HashMap[K, V]() - val it = this.seqcoll.iterator - val f = operators.mapper2 - while (it.hasNext) { - val p = f(it.next) - jumap.put(p._1, p._2) - } - result = jumap.size - } - override def reset = runWhat match { - case "jhashtable" => this.seqcoll = createSequential(size, parallelism) - case _ => super.reset - } - def companion = Map2 - override def repetitionsPerRun = 50 - override def printResults { - println("Size of last result: " + result) - } - } - - object FlatMap2 extends IterableBenchCompanion { - override def defaultSize = 5000 - def benchName = "flatmap2"; - def apply(sz: Int, p: Int, w: String) = new FlatMap2(sz, p, w) - } - - class FlatMap2(val size: Int, val parallelism: Int, val runWhat: String) - extends IterableBench { - def comparisonMap = collection.Map() - override def repetitionsPerRun = 25 - def runseq = this.seqcoll.flatMap(operators.flatmapper) - def runpar = this.parcoll.flatMap(operators.flatmapper) - def companion = FlatMap2 - } - - object HeavyMap extends IterableBenchCompanion { - override def defaultSize = 5000 - override def comparisons = List() - def benchName = "heavy-map"; - def apply(sz: Int, p: Int, w: String) = new HeavyMap(sz, p, w) - } - - class HeavyMap(val size: Int, val parallelism: Int, val runWhat: String) - extends IterableBench { - var result: Int = 0 - def comparisonMap = collection.Map() - def runseq = { - val r = this.seqcoll.asInstanceOf[collection.mutable.HashMap[K, V]].map(operators.heavymapper) - result = r.size - } - def runpar = { - result = this.parcoll.map(operators.heavymapper).size - } - def companion = HeavyMap - override def repetitionsPerRun = 50 - } - - object Reduce2 extends IterableBenchCompanion { - override def defaultSize = 50000 - override def comparisons = List() - def benchName = "reduce2"; - def apply(sz: Int, p: Int, w: String) = new Reduce2(sz, p, w) - } - - class Reduce2(val size: Int, val parallelism: Int, val runWhat: String) - extends IterableBench { - def comparisonMap = collection.Map() - def runseq = this.seqcoll.reduceLeft(operators.mediumreducer) - def runpar = this.parcoll.reduce(operators.mediumreducer) - def companion = Reduce2 - } - - object Foreach extends IterableBenchCompanion { - override def defaultSize = 50000 - override def comparisons = List() - def benchName = "foreach"; - def apply(sz: Int, p: Int, w: String) = new Foreach(sz, p, w) - } - - class Foreach(val size: Int, val parallelism: Int, val runWhat: String) - extends IterableBench { - def comparisonMap = collection.Map() - def runseq = this.seqcoll.foreach(operators.foreachFun) - def runpar = this.parcoll.pforeach(operators.foreachFun) - def companion = Foreach - } - -} - - - - - -object RefParHashTableBenches extends ParHashTableBenches[Dummy, Dummy] { - - type DPair = (Dummy, Dummy); - - object ForeachSet extends IterableBenchCompanion { - override def defaultSize = 50000 - override def comparisons = List() - def benchName = "foreach-set"; - def apply(sz: Int, p: Int, w: String) = new ForeachSet(sz, p, w) - } - - class ForeachSet(val size: Int, val parallelism: Int, val runWhat: String) - extends IterableBench { - val array = new Array[Int](size) - def comparisonMap = collection.Map() - def runseq = for (p <- this.seqcoll) array(p._1.in) += 1 - def runpar = this.parcoll.pforeach { p => array(p._1.in) += 1 } - def companion = ForeachSet - - override def onEnd { - for (i <- 0 until array.length) { - assert(array(i) == repetitionsPerRun * runs) - } - } - } - - object operators extends Operators[DPair] { - def gcd(a: Int, b: Int): Int = { - val result = if (b == 0) a else { - gcd(b, a - b * (a / b)) - } - result + 1000 - } - def heavy(a: Int): Int = { - var i = 0 - var sum = a - while (i < 3000) { - i += 1 - sum += a + i - } - sum - } - val foreachFun = (t: DPair) => { - t - () - } - val reducer = (x: DPair, y: DPair) => { - //y._2.num = x._2.in + y._2.in - y - } - val mediumreducer = (x: DPair, y: DPair) => { - y._2.num = gcd(x._2.in, y._2.in) - y - } - val filterer = (p: DPair) => { - p._1.num % 2 == 0 - } - val mapper = (p: DPair) => { - val a = p._1 - a.num = a.in % 2 - (a, p._2) - } - val flatmapper = (p: DPair) => { - for (i <- 0 until 20) yield p - } - override val mapper2 = (p: DPair) => { - val a = 1 //heavy(p._1.in) - (new Dummy(p._1.in * -2 + a), p._2) - } - val heavymapper = (p: DPair) => { - var i = -2000 - var t = p._1.in - while (i < 0) { - t += (p._2.num - p._1.num) / 500 - p._1.num += p._2.num + t - i += 1 - } - (p._1, new Dummy(0)) - } - val taker = (p: DPair) => true - val eachFun: DPair => Unit = { dp => - dp._1.dummy - } - } - - def createSequential(sz: Int, p: Int) = { - val ht = new collection.mutable.HashMap[Dummy, Dummy] - for (i <- 0 until sz) ht += ((new Dummy(i), new Dummy(i))) - ht - } - - def createParallel(sz: Int, p: Int) = { - val phm = new ParHashMap[Dummy, Dummy] - for (i <- 0 until sz) phm += ((new Dummy(i), new Dummy(i))) - forkJoinPool.setParallelism(p) - collection.parallel.tasksupport.environment = forkJoinPool - phm - } - -} diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/Combine.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/Combine.scala deleted file mode 100644 index 96598840fd..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/Combine.scala +++ /dev/null @@ -1,66 +0,0 @@ -package scala.collection.parallel.benchmarks -package hashtries - - - - -import collection.immutable.{HashMap => HashTrie} -import collection.mutable.HashMap - - - - - - -class Combine(val size: Int, val parallelism: Int, val runWhat: String) extends Bench with IntInit { - var thattrie = new HashTrie[Int, Int] - for (i <- size until 2 * size) thattrie += ((i, i)) - val thatmap = new HashMap[Int, Int] - for (i <- size until 2 * size) thatmap += ((i, i)) - - def runpar = throw new UnsupportedOperationException - def runseq = runhashtrie - def runhashtrie = { - hashtrie merge thattrie - // println - // println("both tries: " + HashTrie.bothtries) - // println("one trie, one item: " + HashTrie.onetrie) - // println("both single: " + HashTrie.bothsingle) - // System exit 1 - } - def rundestructive = { - hashtrie merge thattrie - } - def runappendtrie = hashtrie ++ thattrie - def runhashmap = hashmap ++ thatmap - def companion = Combine - def comparisonMap = Map("hashtrie" -> runhashtrie _, "hashmap" -> runhashmap _, "destruct" -> rundestructive _, "appendtrie" -> runappendtrie _) - override def reset = runWhat match { - case "appendtrie" => initHashTrie - case "destruct" => initHashTrie - case _ => super.reset - } -} - - -object Combine extends BenchCompanion { - def collectionName = "HashTrie" - def benchName = "combine"; - def apply(sz: Int, p: Int, what: String) = new Combine(sz, p, what) - override def defaultSize = 5000 -} - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/Construct.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/Construct.scala deleted file mode 100644 index f65a349ec5..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/Construct.scala +++ /dev/null @@ -1,54 +0,0 @@ -package scala.collection.parallel.benchmarks -package hashtries - - - - -import collection.immutable.{HashMap => HashTrie} -import collection.mutable.HashMap - - - - - - -class Construct(val size: Int, val parallelism: Int, val runWhat: String) extends Bench { - def reset {} - - def runpar = throw new UnsupportedOperationException - def runseq = throw new UnsupportedOperationException - def runhashmap = { - val hashmap = new HashMap[Int, Int] - for (i <- 0 until size) hashmap += ((i, i)) - } - def runhashtrie = { - var hashtrie = new HashTrie[Int, Int] - for (i <- 0 until size) hashtrie += ((i, i)) - } - - def companion = Construct - def comparisonMap = Map("hashmap" -> runhashmap _, "hashtrie" -> runhashtrie _) -} - - -object Construct extends BenchCompanion { - def collectionName = "HashTrie" - def benchName = "construct"; - def apply(sz: Int, p: Int, what: String) = new Construct(sz, p, what) - override def defaultSize = 5000 -} - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/Foreach.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/Foreach.scala deleted file mode 100644 index f53ea02e36..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/Foreach.scala +++ /dev/null @@ -1,45 +0,0 @@ -package scala.collection.parallel.benchmarks -package hashtries - - - - -import collection.immutable.{HashMap => HashTrie} -import collection.mutable.HashMap - - - - - - -class Foreach(val size: Int, val parallelism: Int, val runWhat: String) extends Bench with IntInit { - def runpar = throw new UnsupportedOperationException - def runseq = runhashtrie - def runhashmap = hashmap.foreach(n => ()) - def runhashtrie = hashtrie.foreach(n => ()) - def companion = Foreach - def comparisonMap = Map("hashmap" -> runhashmap _, "hashtrie" -> runhashtrie _) -} - - -object Foreach extends BenchCompanion { - def collectionName = "HashTrie" - def benchName = "foreach-light"; - def apply(sz: Int, p: Int, what: String) = new Foreach(sz, p, what) - override def defaultSize = 25000 -} - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/IntInit.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/IntInit.scala deleted file mode 100644 index 79ebd0e98c..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/IntInit.scala +++ /dev/null @@ -1,31 +0,0 @@ -package scala.collection.parallel.benchmarks -package hashtries - - - - -import collection.immutable.{HashMap => HashTrie} -import collection.mutable.HashMap - - - -trait IntInit extends Bench { - var hashmap: HashMap[Int, Int] = null - var hashtrie: HashTrie[Int, Int] = null - - reset - def reset = runWhat match { - case "hashmap" => initHashMap - case "hashtrie" => initHashTrie - case "seq" => initHashTrie - } - def initHashTrie = { - hashtrie = new HashTrie - for (i <- 0 until size) hashtrie += ((i, i)) - } - def initHashMap = { - hashmap = new HashMap - for (i <- 0 until size) hashmap += ((i, i)) - } - -} diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/Iterate.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/Iterate.scala deleted file mode 100644 index d27aa200b8..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/Iterate.scala +++ /dev/null @@ -1,51 +0,0 @@ -package scala.collection.parallel.benchmarks -package hashtries - - - - -import collection.immutable.{HashMap => HashTrie} -import collection.mutable.HashMap - - - - - - -class Iterate(val size: Int, val parallelism: Int, val runWhat: String) extends Bench with IntInit { - def runpar = throw new UnsupportedOperationException - def runseq = throw new UnsupportedOperationException - def runhashmap = { - val it = hashmap.iterator - while (it.hasNext) it.next - } - def runhashtrie = { - val it = hashtrie.iterator - while (it.hasNext) it.next - } - def companion = Iterate - def comparisonMap = Map("hashmap" -> runhashmap _, "hashtrie" -> runhashtrie _) -} - - -object Iterate extends BenchCompanion { - def collectionName = "HashTrie" - def benchName = "iterate-light"; - def apply(sz: Int, p: Int, what: String) = new Iterate(sz, p, what) - override def defaultSize = 25000 -} - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/Lookup.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/Lookup.scala deleted file mode 100644 index 4ee8c17118..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/Lookup.scala +++ /dev/null @@ -1,57 +0,0 @@ -package scala.collection.parallel.benchmarks -package hashtries - - - - -import collection.immutable.{HashMap => HashTrie} -import collection.mutable.HashMap - - - - - - -class Lookup(val size: Int, val parallelism: Int, val runWhat: String) extends Bench with IntInit { - def runpar = throw new UnsupportedOperationException - def runseq = throw new UnsupportedOperationException - def runhashmap = { - var i = 0 - while (i < size) { - hashmap(i) - i += 1 - } - } - def runhashtrie = { - var i = 0 - while (i < size) { - hashtrie(i) - i += 1 - } - } - def companion = Iterate - def comparisonMap = Map("hashmap" -> runhashmap _, "hashtrie" -> runhashtrie _) -} - - -object Lookup extends BenchCompanion { - def collectionName = "HashTrie" - def benchName = "lookup"; - def apply(sz: Int, p: Int, what: String) = new Lookup(sz, p, what) - override def defaultSize = 25000 -} - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/MultipleCombine.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/MultipleCombine.scala deleted file mode 100644 index c08d6b5cad..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/MultipleCombine.scala +++ /dev/null @@ -1,87 +0,0 @@ -package scala.collection.parallel.benchmarks -package hashtries - - - - -import collection.immutable.{HashMap => HashTrie} -import collection.mutable.HashMap - - - - - - -class MultipleCombine(val size: Int, val parallelism: Int, val runWhat: String) extends Bench with IntInit { - var combines = 10 - - var thattries = new Array[HashTrie[Int, Int]](combines) - def initTries = for (r <- 0 until combines) { - var thattrie = new HashTrie[Int, Int] - for (i <- ((r + 1) * size) until ((r + 2) * size)) thattrie += ((i, i)) - thattries(r) = thattrie - } - initTries - - val thatmaps = new Array[HashMap[Int, Int]](10) - def initMaps = for (r <- 0 until combines) { - var thatmap = new HashMap[Int, Int] - for (i <- ((r + 1) * size) until ((r + 2) * size)) thatmap += ((i, i)) - thatmaps(r) = thatmap - } - initMaps - - override def repetitionsPerRun = 25 - def runpar = throw new UnsupportedOperationException - def runseq = runhashtrie - def runhashtrie = { - initHashTrie - var trie = hashtrie - for (r <- 0 until combines) trie = trie merge thattries(r) - } - def runappendtrie = { - initHashTrie - var trie = hashtrie - for (r <- 0 until combines) trie = trie ++ thattries(r) - } - def runhashmap = { - initHashMap - var map = hashmap - for (r <- 0 until combines) map = map ++ thatmaps(r) - } - def rundestructive = { - initHashTrie - var trie = hashtrie - for (r <- 0 until combines) trie = trie merge thattries(r) - } - def companion = MultipleCombine - def comparisonMap = Map("hashtrie" -> runhashtrie _, "hashmap" -> runhashmap _, "appendtrie" -> runappendtrie _, "destruct" -> rundestructive _) - override def reset = runWhat match { - case "appendtrie" => initHashTrie - case "destruct" => initHashTrie - case _ => super.reset - } -} - - -object MultipleCombine extends BenchCompanion { - def collectionName = "HashTrie" - def benchName = "multi-combine"; - def apply(sz: Int, p: Int, what: String) = new MultipleCombine(sz, p, what) - override def defaultSize = 5000 -} - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/ParallelHashTries.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/ParallelHashTries.scala deleted file mode 100644 index dc8804cf57..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/hashtries/ParallelHashTries.scala +++ /dev/null @@ -1,180 +0,0 @@ -package scala.collection.parallel.benchmarks.hashtries - - - - -import scala.collection.parallel.benchmarks.generic.StandardParIterableBenches -import scala.collection.parallel.benchmarks.generic.Dummy -import scala.collection.parallel.benchmarks.generic.Operators -import scala.collection.parallel.immutable.ParHashMap - - - - - -trait ParHashTrieBenches[K, V] extends StandardParIterableBenches[(K, V), ParHashMap[K, V]] { - - def nameOfCollection = "immutable.ParHashMap" - def comparisonMap = collection.Map() - val forkJoinPool = new scala.concurrent.forkjoin.ForkJoinPool - - object Map2 extends IterableBenchCompanion { - override def defaultSize = 5000 - override def comparisons = List("jhashtable", "hashtable") - def benchName = "map2"; - def apply(sz: Int, p: Int, w: String) = new Map2(sz, p, w) - } - - class Map2(val size: Int, val parallelism: Int, val runWhat: String) - extends IterableBench { - var result: Int = 0 - def comparisonMap = collection.Map("jhashtable" -> runjhashtable _, "hashtable" -> runhashtable _) - def runseq = { - val r = this.seqcoll.asInstanceOf[collection.immutable.HashMap[K, V]].map(operators.mapper2) - result = r.size - } - def runpar = { - result = this.parcoll.map(operators.mapper2).size - } - def runjhashtable = { - val jumap = new java.util.HashMap[K, V]() - val it = this.seqcoll.iterator - while (it.hasNext) { - val p = it.next - jumap.put(p._1, p._2) - } - result = jumap.size - } - def runhashtable = { - val smap = collection.mutable.HashMap[K, V]() - val it = this.seqcoll.iterator - while (it.hasNext) { - val p = it.next - smap.put(p._1, p._2) - } - result = smap.size - } - override def reset = runWhat match { - case "jhashtable" => this.seqcoll = createSequential(size, parallelism) - case "hashtable" => this.seqcoll = createSequential(size, parallelism) - case _ => super.reset - } - def companion = Map2 - override def repetitionsPerRun = 50 - override def printResults { - println("Size of last result: " + result) - } - } - - object Reduce2 extends IterableBenchCompanion { - override def defaultSize = 50000 - override def comparisons = List("hashtable") - def benchName = "reduce2"; - def apply(sz: Int, p: Int, w: String) = new Reduce2(sz, p, w) - } - - class Reduce2(val size: Int, val parallelism: Int, val runWhat: String) - extends IterableBench { - private var ht: collection.mutable.HashMap[K, V] = _ - def comparisonMap = collection.Map("hashtable" -> runhashtable _) - def runseq = this.seqcoll.reduceLeft(operators.reducer) - def runpar = this.parcoll.reduce(operators.reducer) - def runhashtable = ht.reduceLeft(operators.reducer) - override def reset = runWhat match { - case "hashtable" => ht = createHashTable(size) - case _ => super.reset - } - def companion = Reduce2 - } - - def createHashTable(sz: Int): collection.mutable.HashMap[K, V] - -} - - - - - -object RefParHashTrieBenches extends ParHashTrieBenches[Dummy, Dummy] { - - type DPair = (Dummy, Dummy) - - object operators extends Operators[DPair] { - def gcd(a: Int, b: Int): Int = { - val result = if (b == 0) a else { - gcd(b, a - b * (a / b)) - } - result + 1000 - } - def heavy(a: Int): Int = { - var i = 0 - var sum = a - while (i < 3000) { - i += 1 - sum += a + i - } - sum - } - val foreachFun = (t: DPair) => { - t - () - } - val reducer = (x: DPair, y: DPair) => { - //y._2.num = x._2.in + y._2.in - y - } - val mediumreducer = (x: DPair, y: DPair) => { - y._2.num = gcd(x._2.in, y._2.in) - y - } - val filterer = (p: DPair) => { - p._1.num % 2 == 0 - } - val mapper = (p: DPair) => { - val a = p._1 - a.num = a.in % 2 - (a, p._2) - } - val flatmapper = (p: DPair) => { - List(p, p, p, p, p) - } - override val mapper2 = (p: DPair) => { - val a = 1 //heavy(p._1.in) - (new Dummy(p._1.in * -2 + a), p._2) - } - val heavymapper = (p: DPair) => { - val a = p._1 - var i = -100 - while (i < 0) { - if (a.in < i) a.num += 1 - i += 1 - } - (a, p._2) - } - val taker = (p: DPair) => true - val eachFun: DPair => Unit = { dp => - dp._1.dummy - } - } - - def createSequential(sz: Int, p: Int) = { - var ht = new collection.immutable.HashMap[Dummy, Dummy] - for (i <- 0 until sz) ht += ((new Dummy(i), new Dummy(i))) - ht - } - - def createParallel(sz: Int, p: Int) = { - var pht = new ParHashMap[Dummy, Dummy] - for (i <- 0 until sz) pht += ((new Dummy(i), new Dummy(i))) - forkJoinPool.setParallelism(p) - collection.parallel.tasksupport.environment = forkJoinPool - pht - } - - def createHashTable(sz: Int) = { - val hm = collection.mutable.HashMap[Dummy, Dummy]() - for (i <- 0 until sz) hm.put(new Dummy(i), new Dummy(i)) - hm - } - -} diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/misc/Coder.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/misc/Coder.scala deleted file mode 100644 index 04e37085b8..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/misc/Coder.scala +++ /dev/null @@ -1,162 +0,0 @@ -package scala.collection.parallel.benchmarks -package misc - - - - - - -import collection._ //immutable._ -import collection.parallel._//immutable._ - - -class SeqCoder(words: List[String]) { - - private val m = Map( - '2' -> "ABC", '3' -> "DEF", '4' -> "GHI", '5' -> "JKL", - '6' -> "MNO", '7' -> "PQRS", '8' -> "TUV", '9' -> "WXYZ") - - /** Invert the mnemonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */ - private val charCode: Map[Char, Char] = - for ((digit, letters) <- m; letter <- letters) yield letter -> digit - - /** Maps a word to the digit string it represents, - * e.g. `Java` -> `5282` */ - private def wordCode(word: String): String = word.toUpperCase map charCode - - /** A map from digit strings to the words that represent - * them e.g. `5282` -> List(`Java`, `Kata`, `Lava`, ...) - */ - val wordsForNum: Map[String, Seq[String]] = - (words groupBy wordCode).map(t => (t._1, t._2.toSeq)) withDefaultValue Seq() - - /** All ways to encode a number as a list of words */ - def encode(number: String): Set[Seq[String]] = - if (number.isEmpty) Set(Seq()) - else { - val splits = (1 to number.length).toSet - // for { - // split <- splits - // word <- wordsForNum(number take split) - // rest <- encode(number drop split) - // } yield word :: rest - val r = splits.flatMap(split => { - val wfn = wordsForNum(number take split).flatMap(word => { - val subs = encode(number drop split) - subs.map(rest => word +: rest) - }) - wfn - }) - r - } - - /** Maps a number to a list of all word phrases that can - * represent it */ - def translate(number: String) = encode(number)// map (_ mkString " ") - - def ??? : Nothing = throw new UnsupportedOperationException -} - -class ParCoder(words: List[String]) { - - private val m = Map( - '2' -> "ABC", '3' -> "DEF", '4' -> "GHI", '5' -> "JKL", - '6' -> "MNO", '7' -> "PQRS", '8' -> "TUV", '9' -> "WXYZ") - - /** Invert the mnemonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */ - private val charCode: Map[Char, Char] = - for ((digit, letters) <- m; letter <- letters) yield letter -> digit - - /** Maps a word to the digit string it represents, - * e.g. `Java` -> `5282` */ - private def wordCode(word: String): String = word.toUpperCase map charCode - - /** A map from digit strings to the words that represent - * them e.g. `5282` -> List(`Java`, `Kata`, `Lava`, ...) - */ - val wordsForNum: Map[String, Seq[String]] = - (words groupBy wordCode).map(t => (t._1, t._2)) withDefaultValue Seq() - - /** All ways to encode a number as a list of words */ - def encode(number: String): Set[Seq[String]] = if (number.length > 12) { - if (number.isEmpty) ParSet(ParSeq()) - else { - val splits = (1 to number.length).toParSet - for { - split <- splits - word <- wordsForNum(number take split) - rest <- encode(number drop split) - } yield word +: rest - } - } else { - if (number.isEmpty) Set(Seq()) - else { - val splits = (1 to number.length).toSet - for { - split <- splits - word <- wordsForNum(number take split) - rest <- encode(number drop split) - } yield word +: rest - } - } - - /** Maps a number to a list of all word phrases that can - * represent it */ - def translate(number: String) = { - encode(number)// map (_ mkString " ") - } - - def ??? : Nothing = throw new UnsupportedOperationException -} - - - - - -object Coder extends BenchCompanion { - def benchName = "Coder" - def collectionName = "General" - def apply(sz: Int, p: Int, what: String) = new Coder(sz, p, what) - override def defaultSize = 100 -} - -class Coder(val size: Int, val parallelism: Int, val runWhat: String) extends Bench { - def companion = Coder - - var seqcoder: SeqCoder = null - var parcoder: ParCoder = null - - override def repetitionsPerRun = 1 - - val code = "23284374729473626268379762538" - - reset - - def runseq { - val translations = seqcoder.translate(code) - //println(translations) - } - - def runpar { - val translations = parcoder.translate(code) - //println(translations) - } - - def reset = runWhat match { - case "seq" => - seqcoder = new SeqCoder(Dictionary.wordlist) - val t = seqcoder.translate(code) - println("Translation check: " + t.size) - //println(t) - case "par" => - collection.parallel.tasksupport.environment.asInstanceOf[concurrent.forkjoin.ForkJoinPool].setParallelism(parallelism) - parcoder = new ParCoder(Dictionary.wordlist) - val t = parcoder.translate(code) - println("Translation check: " + t.size) - //println(t) - } - - def comparisonMap = Map() - -} - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/misc/Dictionary.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/misc/Dictionary.scala deleted file mode 100644 index e6ff55d234..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/misc/Dictionary.scala +++ /dev/null @@ -1,13 +0,0 @@ -package scala.collection.parallel.benchmarks.misc - - - - -object Dictionary { - val wordlist = wordlines.split(System.getProperty("line.separator")).filter(_.trim != "").toList - val wordarray = wordlist.toArray - def wordlines = { - val is = getClass.getClassLoader.getResourceAsStream("scala/collection/parallel/benchmarks/misc/dict.txt") - scala.io.Source.fromInputStream(is).mkString - } -} diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/misc/Loader.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/misc/Loader.scala deleted file mode 100644 index c7e4723e64..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/misc/Loader.scala +++ /dev/null @@ -1,66 +0,0 @@ -package scala.collection.parallel.benchmarks -package misc - - - - - - -import collection._ //immutable._ -import collection.parallel._//immutable._ - - - - - - - -object Loader extends BenchCompanion { - def benchName = "Loader" - def collectionName = "General" - def apply(sz: Int, p: Int, what: String) = new Loader(sz, p, what) - override def defaultSize = 100 -} - - -class Loader(val size: Int, val parallelism: Int, val runWhat: String) extends Bench { - def companion = Loader - - override def repetitionsPerRun = 1 - - reset - - val wa = Dictionary.wordarray ++ Dictionary.wordarray ++ Dictionary.wordarray - - def runseq { - val m = Map( - '2' -> "ABC", '3' -> "DEF", '4' -> "GHI", '5' -> "JKL", - '6' -> "MNO", '7' -> "PQRS", '8' -> "TUV", '9' -> "WXYZ" - ) - val charCode: Map[Char, Char] = for ((digit, letters) <- m; letter <- letters) yield letter -> digit - def wordCode(word: String): String = (word.toUpperCase.toList map charCode).toString - - wa groupBy wordCode - } - - def runpar { - val m = Map( - '2' -> "ABC", '3' -> "DEF", '4' -> "GHI", '5' -> "JKL", - '6' -> "MNO", '7' -> "PQRS", '8' -> "TUV", '9' -> "WXYZ" - ) - val charCode: Map[Char, Char] = for ((digit, letters) <- m; letter <- letters) yield letter -> digit - def wordCode(word: String): String = (word.toUpperCase.toList map charCode).toString - - wa.par groupBy wordCode - } - - def reset = runWhat match { - case "seq" => - case "par" => - collection.parallel.tasksupport.environment.asInstanceOf[concurrent.forkjoin.ForkJoinPool].setParallelism(parallelism) - } - - def comparisonMap = Map() - -} - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/misc/dict.txt b/test/benchmarks/src/scala/collection/parallel/benchmarks/misc/dict.txt deleted file mode 100644 index 46e95c907f..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/misc/dict.txt +++ /dev/null @@ -1,58111 +0,0 @@ -aardvark -aardwolf -aaron -aback -abacus -abaft -abalone -abandon -abandoned -abandonment -abandons -abase -abased -abasement -abash -abashed -abate -abated -abatement -abates -abattoir -abattoirs -abbe -abbess -abbey -abbeys -abbot -abbots -abbreviate -abbreviated -abbreviates -abbreviating -abbreviation -abbreviations -abdicate -abdicated -abdicates -abdicating -abdication -abdomen -abdomens -abdominal -abduct -abducted -abducting -abduction -abductions -abductor -abductors -abducts -abe -abeam -abel -abele -aberdeen -aberrant -aberration -aberrations -abet -abets -abetted -abetting -abeyance -abhor -abhorred -abhorrence -abhorrent -abhors -abide -abided -abides -abiding -abidjan -abies -abilities -ability -abject -abjectly -abjure -abjured -ablate -ablates -ablating -ablation -ablative -ablaze -able -ablebodied -abler -ablest -abloom -ablution -ablutions -ably -abnegation -abnormal -abnormalities -abnormality -abnormally -aboard -abode -abodes -abolish -abolished -abolishes -abolishing -abolition -abolitionist -abolitionists -abomb -abominable -abominably -abominate -abominated -abomination -abominations -aboriginal -aborigines -abort -aborted -aborting -abortion -abortionist -abortionists -abortions -abortive -aborts -abound -abounded -abounding -abounds -about -above -abraded -abraham -abrasion -abrasions -abrasive -abrasively -abrasiveness -abrasives -abreast -abridge -abridged -abridgement -abridging -abroad -abrogate -abrogated -abrogating -abrogation -abrogations -abrupt -abruptly -abruptness -abscess -abscesses -abscissa -abscissae -abscissas -abscond -absconded -absconder -absconding -absconds -abseil -abseiled -abseiler -abseiling -abseils -absence -absences -absent -absented -absentee -absenteeism -absentees -absenting -absently -absentminded -absentmindedly -absentmindedness -absolute -absolutely -absoluteness -absolutes -absolution -absolutism -absolutist -absolutists -absolve -absolved -absolves -absolving -absorb -absorbed -absorbency -absorbent -absorber -absorbers -absorbing -absorbingly -absorbs -absorption -absorptions -absorptive -absorptivity -abstain -abstained -abstainer -abstainers -abstaining -abstains -abstemious -abstemiously -abstemiousness -abstention -abstentions -abstinence -abstinent -abstract -abstracted -abstractedly -abstracting -abstraction -abstractions -abstractly -abstracts -abstruse -abstrusely -absurd -absurder -absurdest -absurdist -absurdities -absurdity -absurdly -abundance -abundances -abundant -abundantly -abuse -abused -abuser -abusers -abuses -abusing -abusive -abusively -abusiveness -abut -abutment -abutments -abutted -abutting -abuzz -aby -abysmal -abysmally -abyss -abyssal -abysses -acacia -academe -academia -academic -academical -academically -academician -academicians -academics -academies -academy -acanthus -acapulco -accede -acceded -acceding -accelerate -accelerated -accelerates -accelerating -acceleration -accelerations -accelerator -accelerators -accelerometer -accelerometers -accent -accented -accenting -accents -accentuate -accentuated -accentuates -accentuating -accentuation -accept -acceptability -acceptable -acceptably -acceptance -acceptances -accepted -accepting -acceptor -acceptors -accepts -access -accessed -accesses -accessibility -accessible -accessing -accession -accessions -accessories -accessory -accidence -accident -accidental -accidentally -accidentprone -accidents -acclaim -acclaimed -acclaims -acclamation -acclamations -acclimatisation -acclimatise -acclimatised -acclimatising -accolade -accolades -accommodate -accommodated -accommodates -accommodating -accommodation -accommodations -accompanied -accompanies -accompaniment -accompaniments -accompanist -accompany -accompanying -accomplice -accomplices -accomplish -accomplished -accomplishes -accomplishing -accomplishment -accomplishments -accord -accordance -accorded -according -accordingly -accordion -accordionist -accordions -accords -accost -accosted -accosting -accosts -account -accountability -accountable -accountancy -accountant -accountants -accounted -accounting -accounts -accra -accredit -accreditation -accredited -accrediting -accredits -accreted -accretion -accretions -accrual -accruals -accrue -accrued -accrues -accruing -accumulate -accumulated -accumulates -accumulating -accumulation -accumulations -accumulative -accumulator -accumulators -accuracies -accuracy -accurate -accurately -accursed -accusal -accusals -accusation -accusations -accusative -accusatory -accuse -accused -accuser -accusers -accuses -accusing -accusingly -accustom -accustomed -accustoming -ace -aced -acentric -acerbic -acerbity -acers -aces -acetal -acetate -acetates -acetic -acetone -acetylene -ache -ached -aches -achievable -achieve -achieved -achievement -achievements -achiever -achievers -achieves -achieving -aching -achingly -achings -achromatic -achy -acid -acidic -acidification -acidified -acidify -acidifying -acidity -acidly -acidophiles -acidrain -acids -acknowledge -acknowledged -acknowledgement -acknowledgements -acknowledges -acknowledging -acknowledgment -acknowledgments -acme -acne -acolyte -acolytes -aconite -acorn -acorns -acoustic -acoustical -acoustically -acoustics -acquaint -acquaintance -acquaintances -acquainted -acquainting -acquaints -acquiesce -acquiesced -acquiescence -acquiescent -acquiescing -acquire -acquired -acquirer -acquirers -acquires -acquiring -acquisition -acquisitions -acquisitive -acquisitiveness -acquit -acquited -acquites -acquits -acquittal -acquittals -acquittance -acquitted -acquitting -acre -acreage -acres -acrid -acrimonious -acrimoniously -acrimony -acrobat -acrobatic -acrobatics -acrobats -acronym -acronyms -across -acrostic -acrostics -acrylic -acrylics -act -acted -acting -actings -actinides -action -actionable -actions -activate -activated -activates -activating -activation -activations -activator -activators -active -actively -actives -activism -activist -activists -activities -activity -actor -actors -actress -actresses -acts -actual -actualisation -actualise -actualised -actualities -actuality -actually -actuarial -actuaries -actuary -actuate -actuated -actuates -actuating -actuation -actuator -actuators -acuity -acumen -acupuncture -acupuncturist -acupuncturists -acute -acutely -acuteness -acuter -acutest -acyclic -adage -adages -adagio -adam -adamant -adamantly -adapt -adaptability -adaptable -adaptation -adaptations -adapted -adapter -adapters -adapting -adaptive -adaptively -adaptivity -adaptor -adaptors -adapts -add -added -addenda -addendum -adder -adders -addict -addicted -addiction -addictions -addictive -addictiveness -addicts -adding -addition -additional -additionally -additions -additive -additively -additives -addle -addled -addles -addling -address -addressability -addressable -addressed -addressee -addressees -addresses -addressing -adds -adduce -adduced -adduces -adducing -adelaide -aden -adenine -adenoid -adenoids -adenoma -adenomas -adept -adepts -adequacy -adequate -adequately -adhere -adhered -adherence -adherent -adherents -adherer -adherers -adheres -adhering -adhesion -adhesions -adhesive -adhesiveness -adhesives -adhoc -adiabatic -adiabatically -adieu -adieus -adieux -adios -adipose -adit -adjacency -adjacent -adjacently -adjectival -adjective -adjectives -adjoin -adjoined -adjoining -adjoins -adjourn -adjourned -adjourning -adjournment -adjourns -adjudge -adjudged -adjudges -adjudicate -adjudicated -adjudicates -adjudicating -adjudication -adjudications -adjudicator -adjudicators -adjunct -adjuncts -adjure -adjust -adjustable -adjusted -adjuster -adjusting -adjustment -adjustments -adjusts -adjutant -adlib -adlibs -adman -admen -admin -administer -administered -administering -administers -administrate -administrated -administrating -administration -administrations -administrative -administratively -administrator -administrators -admirable -admirably -admiral -admirals -admiration -admire -admired -admirer -admirers -admires -admiring -admiringly -admissibility -admissible -admission -admissions -admit -admits -admittance -admittances -admitted -admittedly -admitting -admix -admixture -admonish -admonished -admonishes -admonishing -admonishment -admonition -admonitions -admonitory -ado -adobe -adolescence -adolescent -adolescents -adonis -adopt -adopted -adopter -adopting -adoption -adoptions -adoptive -adopts -adorable -adorably -adoration -adore -adored -adorer -adorers -adores -adoring -adoringly -adorn -adorned -adorning -adornment -adornments -adorns -adrenal -adrenalin -adrenaline -adrift -adroit -adroitly -adroitness -adsorb -adsorbed -adsorption -adulation -adulatory -adult -adulterate -adulterated -adulterates -adulterating -adulteration -adulterations -adulterer -adulterers -adulteress -adulteresses -adulterous -adultery -adulthood -adults -adumbrate -adumbrated -adumbrating -advance -advanced -advancement -advancements -advancer -advances -advancing -advantage -advantaged -advantageous -advantageously -advantages -advent -advents -adventure -adventured -adventurer -adventurers -adventures -adventuring -adventurism -adventurous -adventurously -adverb -adverbial -adverbs -adversarial -adversaries -adversary -adverse -adversely -adversities -adversity -advert -adverted -advertise -advertised -advertisement -advertisements -advertiser -advertisers -advertises -advertising -adverts -advice -advices -advisability -advisable -advise -advised -advisedly -adviser -advisers -advises -advising -advisory -advocacy -advocate -advocated -advocates -advocating -adze -aegean -aegina -aegis -aeolian -aeon -aeons -aerate -aerated -aerates -aerating -aeration -aerator -aerial -aerially -aerials -aerify -aerobatic -aerobatics -aerobe -aerobes -aerobic -aerobically -aerobics -aerobraking -aerodrome -aerodromes -aerodynamic -aerodynamically -aerodynamics -aerofoil -aerofoils -aeronaut -aeronautic -aeronautical -aeronautics -aeroplane -aeroplanes -aerosol -aerosols -aerospace -aesop -aesthete -aesthetes -aesthetic -aesthetically -aestheticism -aestheticsy -afar -affability -affable -affably -affair -affairs -affect -affectation -affectations -affected -affectedly -affecting -affection -affectionate -affectionately -affections -affective -affects -afferent -affidavit -affidavits -affiliate -affiliated -affiliates -affiliating -affiliation -affiliations -affine -affinities -affinity -affirm -affirmation -affirmations -affirmative -affirmatively -affirmed -affirming -affirms -affix -affixed -affixes -affixing -afflict -afflicted -afflicting -affliction -afflictions -afflicts -affluence -affluent -afflux -afford -affordability -affordable -afforded -affording -affords -afforestation -afforested -affray -affront -affronted -affronts -afghan -afghani -afghans -afield -afire -aflame -afloat -afoot -aforementioned -aforesaid -aforethought -afraid -afresh -africa -african -africans -afro -afros -aft -after -afterbirth -aftercare -aftereffect -aftereffects -afterglow -afterlife -afterlives -aftermath -afternoon -afternoons -aftershave -aftershocks -aftertaste -afterthought -afterthoughts -afterward -afterwards -aga -again -against -agakhan -agape -agar -agaragar -agave -agaves -age -aged -ageing -ageings -ageism -ageless -agencies -agency -agenda -agendas -agendums -agent -agents -ageold -ages -agglomerated -agglomerating -agglomeration -agglomerations -agglutinative -aggravate -aggravated -aggravates -aggravating -aggravation -aggravations -aggregate -aggregated -aggregates -aggregating -aggregation -aggregations -aggression -aggressions -aggressive -aggressively -aggressiveness -aggressor -aggressors -aggrieved -aggrievedly -aghast -agile -agiler -agility -aging -agings -agio -agitate -agitated -agitatedly -agitates -agitating -agitation -agitations -agitator -agitators -agitprop -agleam -aglow -agnostic -agnosticism -agnostics -ago -agog -agonies -agonise -agonised -agonises -agonising -agonisingly -agonist -agonists -agony -agora -agoraphobia -agoraphobic -agouti -agrarian -agree -agreeable -agreeableness -agreeably -agreed -agreeing -agreement -agreements -agrees -agribusiness -agricultural -agriculturalist -agriculturalists -agriculturally -agriculture -agrimony -agrochemical -agrochemicals -agronomist -agronomists -agronomy -aground -ague -ah -aha -ahead -ahem -ahoy -aid -aide -aided -aidedecamp -aider -aiders -aides -aidesdecamp -aiding -aids -ail -aileron -ailerons -ailing -ailment -ailments -ails -aim -aimed -aimer -aiming -aimless -aimlessly -aimlessness -aims -aint -air -airbase -airborne -airbrush -airbus -airconditioned -airconditioner -airconditioning -aircraft -aircrew -aircrews -aire -aired -airfield -airfields -airflow -airforce -airframe -airframes -airgun -airier -airiest -airily -airiness -airing -airings -airless -airlift -airlifted -airlifting -airlifts -airline -airliner -airliners -airlines -airlock -airlocks -airmail -airman -airmen -airplane -airplay -airport -airports -airraid -airs -airship -airships -airsick -airsickness -airspace -airstream -airstrip -airstrips -airtight -airtime -airwave -airwaves -airway -airways -airworthiness -airworthy -airy -aisle -aisles -aitches -ajar -akimbo -akin -ala -alabama -alabaster -alacarte -alack -alacrity -aladdin -alanine -alarm -alarmed -alarming -alarmingly -alarmism -alarmist -alarms -alas -alaska -alaskan -alb -albania -albany -albatross -albatrosses -albeit -albinism -albino -album -albumen -albumin -albums -alchemical -alchemist -alchemists -alchemy -alcohol -alcoholic -alcoholics -alcoholism -alcohols -alcove -alcoves -aldehyde -aldehydes -alder -alderman -aldermen -aldrin -ale -alehouse -alembic -alert -alerted -alerting -alertly -alertness -alerts -ales -alfalfa -alfatah -alga -algae -algal -algebra -algebraic -algebraical -algebraically -algebraist -algebras -algeria -algerian -algiers -algorithm -algorithmic -algorithmically -algorithms -alias -aliases -alibaba -alibi -alibis -alien -alienate -alienated -alienates -alienating -alienation -aliened -aliening -aliens -alight -alighted -alighting -alights -align -aligned -aligning -alignment -alignments -aligns -alike -alimentary -alimony -aline -alined -alines -alining -aliphatic -aliquot -aliquots -alive -alkali -alkalic -alkaline -alkalinity -alkalis -alkalise -alkaloid -alkaloids -alkanes -alkyl -all -allay -allayed -allaying -allays -allegation -allegations -allege -alleged -allegedly -alleges -allegiance -allegiances -alleging -allegorical -allegorically -allegories -allegory -allegri -allegro -allele -alleles -allelic -allergen -allergens -allergic -allergies -allergy -alleviate -alleviated -alleviates -alleviating -alleviation -alleviations -alley -alleys -alleyway -alleyways -alliance -alliances -allied -allies -alligator -alligators -alliterate -alliterated -alliterating -alliteration -alliterations -alliterative -allocatable -allocate -allocated -allocates -allocating -allocation -allocations -allocator -allocators -allophones -allot -allotment -allotments -allotrope -allotropic -allots -allotted -allotting -allow -allowable -allowance -allowances -allowed -allowing -allows -alloy -alloyed -alloying -alloys -allude -alluded -alludes -alluding -allure -allured -allurement -allurements -allures -alluring -alluringly -allusion -allusions -allusive -alluvia -alluvial -alluvium -ally -allying -almanac -almanacs -almighty -almond -almonds -almost -alms -almshouse -almshouses -aloe -aloes -aloft -aloha -alone -aloneness -along -alongside -aloof -aloofness -aloud -alp -alpaca -alpacas -alpha -alphabet -alphabetic -alphabetical -alphabetically -alphabets -alphanumeric -alphas -alpine -alps -already -alright -also -alt -altar -altarpiece -altarpieces -altars -alter -alterable -alteration -alterations -altercate -altercation -altercations -altered -alterego -altering -alternate -alternated -alternately -alternates -alternating -alternation -alternations -alternative -alternatively -alternatives -alternator -alternators -alters -although -altimeter -altimeters -altitude -altitudes -alto -altogether -altruism -altruist -altruistic -altruistically -alts -alum -aluminium -aluminum -alumni -alumnus -alveolar -alveoli -always -am -amalgam -amalgamate -amalgamated -amalgamates -amalgamating -amalgamation -amalgamations -amalgams -amanuensis -amass -amassed -amasses -amassing -amateur -amateurish -amateurishly -amateurishness -amateurism -amateurs -amatory -amaze -amazed -amazement -amazes -amazing -amazingly -amazon -amazons -ambassador -ambassadorial -ambassadors -amber -ambergris -ambiance -ambidextrous -ambience -ambient -ambiguities -ambiguity -ambiguous -ambiguously -ambit -ambition -ambitions -ambitious -ambitiously -ambivalence -ambivalent -ambivalently -amble -ambled -ambler -ambles -ambling -ambrosia -ambulance -ambulances -ambulant -ambulate -ambulatory -ambuscade -ambuscades -ambush -ambushed -ambushers -ambushes -ambushing -ameliorate -ameliorated -ameliorates -ameliorating -amelioration -amen -amenability -amenable -amend -amendable -amended -amending -amendment -amendments -amends -amenities -amenity -amenorrhoea -amens -america -american -americans -americium -amethyst -amethystine -amethysts -amiability -amiable -amiableness -amiably -amicability -amicable -amicably -amid -amide -amidships -amidst -amigo -amine -amines -amino -amir -amiss -amity -amman -ammeter -ammeters -ammo -ammonia -ammonites -ammonium -ammunition -amnesia -amnesiac -amnesic -amnesties -amnesty -amniotic -amoeba -amoebae -amoebic -amok -among -amongst -amoral -amorality -amorist -amorous -amorously -amorphous -amortisation -amortise -amortised -amount -amounted -amounting -amounts -amour -amours -amp -ampere -amperes -ampersand -ampersands -amphetamine -amphetamines -amphibia -amphibian -amphibians -amphibious -amphitheatre -amphitheatres -amphora -ample -ampler -amplification -amplifications -amplified -amplifier -amplifiers -amplifies -amplify -amplifying -amplitude -amplitudes -amply -ampoules -amps -ampule -ampules -ampuls -amputate -amputated -amputating -amputation -amputations -amputee -amputees -amuck -amulet -amulets -amuse -amused -amusement -amusements -amuses -amusing -amusingly -an -ana -anabolic -anachronism -anachronisms -anachronistic -anachronistically -anaconda -anacondas -anaemia -anaemic -anaerobic -anaerobically -anaesthesia -anaesthetic -anaesthetics -anaesthetise -anaesthetised -anaesthetising -anaesthetist -anaesthetists -anagram -anagrammatic -anagrammatically -anagrams -anal -analgesia -analgesic -analgesics -anally -analogical -analogies -analogise -analogous -analogously -analogue -analogues -analogy -analysable -analyse -analysed -analyser -analysers -analyses -analysing -analysis -analyst -analysts -analytic -analytical -analytically -anamorphic -ananas -anaphora -anaphoric -anarchic -anarchical -anarchism -anarchist -anarchistic -anarchists -anarchy -anathema -anatomic -anatomical -anatomically -anatomies -anatomist -anatomists -anatomy -ancestor -ancestors -ancestral -ancestries -ancestry -anchor -anchorage -anchorages -anchored -anchoring -anchorite -anchors -anchovies -anchovy -ancient -anciently -ancients -ancillary -and -andante -andes -andrew -androgynous -android -androids -anecdotal -anecdotally -anecdote -anecdotes -anechoic -anemia -anemic -anemone -anemones -anergy -aneroid -aneurysm -aneurysms -anew -angel -angelic -angelica -angels -angelus -anger -angered -angering -angers -angina -anginal -angioplasty -angle -angled -anglepoise -angler -anglers -angles -anglian -anglican -angling -angola -angolan -angolans -angora -angoras -angrier -angriest -angrily -angry -angst -angstroms -anguish -anguished -anguishes -angular -angularity -anhydrous -anil -aniline -animal -animals -animate -animated -animatedly -animates -animating -animation -animations -animator -animators -animism -animist -animists -animosities -animosity -animus -anion -anionic -anions -anise -aniseed -aniseeds -anisotropic -anisotropies -anisotropy -ankara -ankle -ankles -anklet -anklets -anna -annal -annals -anneal -annealed -annealer -annealing -annex -annexation -annexations -annexe -annexed -annexes -annexing -annihilate -annihilated -annihilates -annihilating -annihilation -anniversaries -anniversary -annotate -annotated -annotates -annotating -annotation -annotations -announce -announced -announcement -announcements -announcer -announcers -announces -announcing -annoy -annoyance -annoyances -annoyed -annoyer -annoyers -annoying -annoyingly -annoys -annual -annualised -annually -annuals -annuities -annuity -annul -annular -annuli -annulled -annulling -annulment -annuls -annulus -annunciation -anode -anodes -anodised -anodyne -anoint -anointed -anointing -anoints -anomalies -anomalous -anomalously -anomaly -anomic -anon -anonym -anonymity -anonymous -anonymously -anonyms -anorak -anoraks -anorexia -anorexic -another -answer -answerable -answered -answerer -answering -answers -ant -antacid -antacids -antagonise -antagonised -antagonises -antagonising -antagonism -antagonisms -antagonist -antagonistic -antagonists -ante -anteater -anteaters -antecedent -antecedents -antechamber -antedate -antedates -antedating -antediluvian -antelope -antelopes -antenatal -antenna -antennae -antennas -anterior -anteriorly -anteroom -anthem -anthems -anther -anthologies -anthologise -anthologised -anthology -anthracite -anthrax -anthropic -anthropocentric -anthropogenic -anthropogenically -anthropoid -anthropological -anthropologist -anthropologists -anthropology -anthropometric -anthropomorphic -anthropomorphising -anthropomorphism -anti -antiabortionists -antiaircraft -antibiotic -antibiotics -antibodies -antibody -antic -anticipate -anticipated -anticipates -anticipating -anticipation -anticipations -anticipative -anticipatory -anticlimax -anticlockwise -anticoagulants -anticonstitutional -antics -anticyclone -antidepressant -antidepressants -antidote -antidotes -antifreeze -antigen -antigenic -antigens -antihistamines -antilope -antimatter -antimony -antioxidants -antiparticles -antipathetic -antipathies -antipathy -antipodes -antiquarian -antiquarianism -antiquarians -antiquaries -antiquary -antiquated -antique -antiques -antiquities -antiquity -antiseptic -antiseptics -antisocial -antistatic -antisymmetric -antisymmetry -antitheses -antithesis -antithetic -antithetical -antithetically -antitrust -antiviral -antler -antlers -antlion -antlions -antonym -antonyms -antral -antrum -ants -antwerp -anus -anvil -anvils -anxieties -anxiety -anxious -anxiously -any -anybody -anyhow -anymore -anyone -anyplace -anything -anyway -anyways -anywhere -aorist -aorta -aortas -aortic -apace -apache -apaches -apart -apartment -apartments -apartness -apathetic -apathetically -apathy -ape -aped -apeman -aperies -aperiodic -aperiodically -aperitif -aperitifs -aperture -apertures -apery -apes -apex -aphasia -aphelion -aphid -aphids -aphorism -aphorisms -aphorist -aphoristic -aphrodisiac -aphrodisiacs -apian -apiaries -apiarist -apiary -apiece -aping -apis -apish -aplenty -aplomb -apnea -apnoea -apocalypse -apocalyptic -apocryphal -apogee -apolitical -apollo -apologetic -apologetically -apologia -apologies -apologise -apologised -apologises -apologising -apologist -apologists -apology -apoplectic -apoplexy -apostasy -apostate -apostates -apostle -apostles -apostolate -apostolic -apostrophe -apostrophes -apostrophised -apothecaries -apothecary -apotheosis -appal -appalled -appalling -appallingly -appals -apparatchik -apparatchiks -apparatus -apparatuses -apparel -apparelled -apparent -apparently -apparition -apparitions -appeal -appealed -appealing -appealingly -appeals -appear -appearance -appearances -appeared -appearing -appears -appease -appeased -appeasement -appeaser -appeasers -appeases -appeasing -appellant -appellants -appellate -appellation -appellations -append -appendage -appendages -appended -appendices -appendicitis -appending -appendix -appends -appertain -appertained -appertaining -appetiser -appetising -appetite -appetites -applaud -applauded -applauding -applauds -applause -apple -applecart -applepie -apples -applet -appliance -appliances -applicability -applicable -applicant -applicants -application -applications -applicative -applicator -applicators -applied -applier -applies -applique -apply -applying -appoint -appointed -appointee -appointees -appointing -appointment -appointments -appoints -apportion -apportioned -apportioning -apportionment -apportions -apposite -apposition -appraisal -appraisals -appraise -appraised -appraisees -appraiser -appraisers -appraises -appraising -appraisingly -appreciable -appreciably -appreciate -appreciated -appreciates -appreciating -appreciation -appreciations -appreciative -appreciatively -apprehend -apprehended -apprehending -apprehends -apprehension -apprehensions -apprehensive -apprehensively -apprentice -apprenticed -apprentices -apprenticeship -apprenticeships -apprise -apprised -apprising -appro -approach -approachability -approachable -approached -approaches -approaching -approbation -appropriate -appropriated -appropriately -appropriateness -appropriates -appropriating -appropriation -appropriations -approval -approvals -approve -approved -approves -approving -approvingly -approximate -approximated -approximately -approximates -approximating -approximation -approximations -apricot -apricots -april -apriori -apron -aprons -apropos -apse -apses -apsis -apt -aptest -aptitude -aptitudes -aptly -aptness -aqua -aqualung -aquamarine -aquanaut -aquaria -aquarium -aquariums -aquatic -aquatics -aqueduct -aqueducts -aqueous -aquifer -aquifers -aquiline -arab -arabesque -arabesques -arabia -arabian -arabians -arabic -arable -arabs -arachnid -arachnids -arachnoid -arachnophobia -arak -araks -ararat -arbiter -arbiters -arbitrage -arbitrageur -arbitrageurs -arbitral -arbitrarily -arbitrariness -arbitrary -arbitrate -arbitrated -arbitrates -arbitrating -arbitration -arbitrations -arbitrator -arbitrators -arbor -arboreal -arboretum -arbour -arc -arcade -arcades -arcadia -arcading -arcana -arcane -arcanely -arcaneness -arced -arch -archaeological -archaeologically -archaeologist -archaeologists -archaeology -archaeopteryx -archaic -archaism -archaisms -archangel -archangels -archbishop -archbishops -archdeacon -archdeaconry -archdeacons -archdiocese -archduke -archdukes -arched -archenemies -archenemy -archer -archers -archery -arches -archetypal -archetype -archetypes -archetypical -arching -archipelago -architect -architectonic -architects -architectural -architecturally -architecture -architectures -architrave -architraves -archival -archive -archived -archives -archiving -archivist -archivists -archly -archness -archway -archways -arcing -arcs -arctic -ardency -ardent -ardently -ardour -arduous -are -area -areal -areas -arena -arenas -arent -argent -argon -argot -arguable -arguably -argue -argued -arguer -arguers -argues -arguing -argument -argumentation -argumentative -argumentatively -arguments -argus -aria -arias -arid -aridity -aridness -aright -arise -arisen -arises -arising -aristocracies -aristocracy -aristocrat -aristocratic -aristocrats -arithmetic -arithmetical -arithmetically -arizona -ark -arkansas -arks -arm -armada -armadas -armadillo -armament -armaments -armature -armatures -armband -armbands -armchair -armchairs -armed -armenia -armful -armfuls -armhole -armholes -armies -arming -armistice -armless -armlet -armlets -armour -armoured -armourer -armourers -armouries -armourplated -armoury -armpit -armpits -armrest -arms -army -aroma -aromas -aromatherapist -aromatherapy -aromatic -aromaticity -aromatics -arose -around -arousal -arousals -arouse -aroused -arouses -arousing -arrange -arrangeable -arranged -arrangement -arrangements -arranger -arranges -arranging -arrant -arrases -array -arrayed -arraying -arrays -arrears -arrest -arrestable -arrested -arrester -arresting -arrests -arrhythmia -arrival -arrivals -arrive -arrived -arriver -arrives -arriving -arrogance -arrogant -arrogantly -arrow -arrowed -arrowhead -arrowheads -arrowing -arrowroot -arrows -arsenal -arsenals -arsenic -arsenide -arson -arsonist -arsonists -art -artefact -artefacts -artefactual -arterial -arteries -artery -artful -artfully -artfulness -arthritic -arthritis -arthropod -arthropods -arthur -artichoke -artichokes -article -articled -articles -articulacy -articular -articulate -articulated -articulately -articulates -articulating -articulation -articulations -articulatory -artier -artifice -artificial -artificiality -artificially -artillery -artisan -artisans -artist -artiste -artistes -artistic -artistically -artistry -artists -artless -artlessly -artlessness -arts -artwork -artworks -arty -arum -as -asbestos -asbestosis -ascend -ascendancy -ascendant -ascended -ascendency -ascender -ascending -ascends -ascension -ascensions -ascent -ascents -ascertain -ascertainable -ascertained -ascertaining -ascertainment -ascertains -ascetic -asceticism -ascetics -ascorbic -ascribable -ascribe -ascribed -ascribes -ascribing -ascription -ascriptions -aseptic -asexual -ash -ashamed -ashamedly -ashbin -ashbins -ashcans -ashen -ashes -ashore -ashtray -ashtrays -ashy -asia -asian -asians -asiatic -aside -asides -asinine -ask -askance -asked -askers -askew -asking -asks -aslant -asleep -asocial -asp -asparagus -aspect -aspects -asperity -aspersion -aspersions -asphalt -asphyxia -asphyxiate -asphyxiated -asphyxiation -aspic -aspidistra -aspirant -aspirants -aspirate -aspirated -aspirates -aspirating -aspiration -aspirational -aspirations -aspirators -aspire -aspired -aspires -aspirin -aspiring -aspirins -asps -ass -assail -assailable -assailant -assailants -assailed -assailing -assails -assassin -assassinate -assassinated -assassinating -assassination -assassinations -assassins -assault -assaulted -assaulting -assaults -assay -assayed -assayer -assays -assegai -assegais -assemblage -assemblages -assemble -assembled -assembler -assemblers -assembles -assemblies -assembling -assembly -assent -assented -assenting -assents -assert -asserted -asserting -assertion -assertions -assertive -assertively -assertiveness -asserts -asses -assess -assessable -assessed -assesses -assessing -assessment -assessments -assessor -assessors -asset -assets -assiduity -assiduous -assiduously -assign -assignable -assignation -assignations -assigned -assignees -assigner -assigning -assignment -assignments -assigns -assimilable -assimilate -assimilated -assimilates -assimilating -assimilation -assist -assistance -assistant -assistants -assisted -assisting -assists -assizes -associate -associated -associates -associateship -associating -association -associational -associations -associative -associatively -associativity -assonance -assort -assorted -assortment -assortments -assuage -assuaged -assuages -assuaging -assume -assumed -assumes -assuming -assumption -assumptions -assurance -assurances -assure -assured -assuredly -assures -assuring -assyria -assyrian -aster -asterisk -asterisked -asterisks -astern -asteroid -asteroids -asters -asthma -asthmatic -asthmatics -astigmatic -astigmatism -astir -astonish -astonished -astonishes -astonishing -astonishingly -astonishment -astound -astounded -astounding -astoundingly -astounds -astraddle -astral -astrally -astray -astride -astringent -astrolabe -astrolabes -astrologer -astrologers -astrological -astrology -astronaut -astronautical -astronautics -astronauts -astronomer -astronomers -astronomic -astronomical -astronomically -astronomy -astrophysical -astrophysicist -astrophysicists -astrophysics -astute -astutely -astuteness -asunder -aswan -asylum -asylums -asymmetric -asymmetrical -asymmetrically -asymmetries -asymmetry -asymptomatic -asymptote -asymptotes -asymptotic -asymptotically -asynchronous -asynchronously -at -atavism -atavistic -ate -atelier -atheism -atheist -atheistic -atheistically -atheists -athena -athens -atherosclerosis -athlete -athletes -athletic -athletically -athleticism -athletics -atlanta -atlantic -atlantis -atlas -atlases -atmosphere -atmospheres -atmospheric -atmospherically -atmospherics -atoll -atolls -atom -atombomb -atomic -atomically -atomicity -atomisation -atomised -atomistic -atoms -atonal -atonality -atone -atoned -atonement -atones -atonic -atoning -atop -atrial -atrium -atrocious -atrociously -atrocities -atrocity -atrophied -atrophies -atrophy -atrophying -atropine -attach -attachable -attache -attached -attaches -attaching -attachment -attachments -attack -attacked -attacker -attackers -attacking -attacks -attain -attainable -attained -attaining -attainment -attainments -attains -attempt -attempted -attempting -attempts -attend -attendance -attendances -attendant -attendants -attended -attendees -attender -attenders -attending -attends -attention -attentional -attentions -attentive -attentively -attentiveness -attenuate -attenuated -attenuates -attenuating -attenuation -attenuator -attenuators -attest -attestation -attested -attesting -attests -attic -attics -attila -attire -attired -attiring -attitude -attitudes -attitudinal -attorney -attorneys -attract -attracted -attracting -attraction -attractions -attractive -attractively -attractiveness -attractor -attractors -attracts -attributable -attribute -attributed -attributes -attributing -attribution -attributions -attributive -attrition -attritional -attune -attuned -atypical -atypically -aubergine -aubergines -auburn -auction -auctioned -auctioneer -auctioneers -auctioning -auctions -audacious -audaciously -audacity -audibility -audible -audibly -audience -audiences -audio -audiovisual -audit -audited -auditing -audition -auditioned -auditioning -auditions -auditive -auditor -auditorium -auditors -auditory -audits -auger -augers -augite -augment -augmentation -augmentations -augmented -augmenting -augments -augur -augured -augurs -augury -august -augustus -auk -auks -aunt -auntie -aunties -aunts -aupair -aupairs -aura -aural -aurally -auras -aurevoir -auric -auriculas -aurora -aurorae -auroral -auroras -auspice -auspices -auspicious -auspiciously -aussie -aussies -austere -austerely -austerity -austral -australian -austria -autarchy -auteur -authentic -authentically -authenticate -authenticated -authenticates -authenticating -authentication -authenticator -authenticators -authenticity -author -authored -authoress -authorial -authoring -authorisation -authorisations -authorise -authorised -authorises -authorising -authoritarian -authoritarianism -authoritarians -authoritative -authoritatively -authorities -authority -authors -authorship -autism -autistic -auto -autobahn -autobahns -autobiographical -autobiographically -autobiographies -autobiography -autocracies -autocracy -autocrat -autocratic -autocratically -autocrats -autocue -autograph -autographed -autographing -autographs -autoignition -autoimmune -automat -automata -automate -automated -automates -automatic -automatically -automatics -automating -automation -automaton -automats -automobile -automorphism -automorphisms -automotive -autonomic -autonomous -autonomously -autonomy -autopilot -autopsies -autopsy -autosuggestion -autumn -autumnal -autumns -auxiliaries -auxiliary -avail -availabilities -availability -available -availed -availing -avails -avalanche -avalanches -avalanching -avantgarde -avarice -avaricious -avariciousness -ave -avenge -avenged -avenger -avengers -avenges -avenging -avens -avenue -avenues -aver -average -averaged -averagely -averages -averaging -averred -averring -avers -averse -aversion -aversions -aversive -avert -averted -averting -averts -avian -aviaries -aviary -aviate -aviation -aviator -aviators -avid -avidity -avidly -avionics -avocado -avoid -avoidable -avoidance -avoided -avoiding -avoids -avoirdupois -avow -avowal -avowals -avowed -avowedly -avowing -avulsion -avuncular -await -awaited -awaiting -awaits -awake -awaken -awakened -awakening -awakenings -awakens -awakes -awaking -award -awarded -awarding -awards -aware -awareness -awash -away -awe -awed -aweless -awesome -awesomely -awesomeness -awestruck -awful -awfully -awfulness -awhile -awkward -awkwardest -awkwardly -awkwardness -awls -awn -awning -awnings -awoke -awoken -awol -awry -axe -axed -axehead -axeheads -axeman -axes -axial -axially -axillary -axing -axiom -axiomatic -axiomatically -axiomatising -axioms -axis -axle -axles -axolotl -axon -axons -aye -ayurvedic -azalea -azaleas -azimuth -azimuthal -azores -aztec -aztecs -azure -baa -baaing -baal -babas -babble -babbled -babbler -babblers -babbles -babbling -babe -babel -babes -babies -baboon -baboons -baby -babyface -babyhood -babying -babyish -babylon -babysit -babysitter -babysitters -babysitting -baccarat -bacchus -bach -bachelor -bachelors -bacilli -bacillus -back -backache -backbench -backbencher -backbenchers -backbone -backbones -backchat -backdate -backdated -backdrop -backed -backer -backers -backfire -backfired -backfires -backfiring -backgammon -background -backgrounds -backhand -backhanded -backing -backlash -backless -backlight -backlit -backlog -backlogs -backpack -backpacker -backpackers -backpacking -backpacks -backpedal -backpedalled -backpedalling -backrest -backs -backseat -backside -backsides -backslapping -backslash -backsliding -backspace -backspaces -backspacing -backstabbing -backstage -backstairs -backstreet -backstreets -backstroke -backtrack -backtracked -backtracking -backtracks -backup -backups -backward -backwardness -backwards -backwash -backwater -backwaters -backwoods -backwoodsmen -backyard -bacon -bacteria -bacterial -bactericidal -bacteriological -bacteriologist -bacteriologists -bacteriology -bacteriophage -bacterium -bad -baddy -bade -bader -badge -badged -badger -badgered -badgering -badgers -badges -badinage -badlands -badly -badminton -badness -badtempered -baffle -baffled -bafflement -baffler -baffles -baffling -bafflingly -bag -bagatelle -bagdad -bagels -bagful -bagfuls -baggage -baggages -bagged -bagger -baggier -baggiest -bagging -baggy -baghdad -bagman -bagmen -bagpipe -bagpiper -bagpipes -bags -baguette -baguettes -bah -bahamas -bail -bailed -bailiff -bailiffs -bailing -bailiwick -bailout -bails -bait -baited -baiters -baiting -baitings -baits -bake -baked -bakehouse -baker -bakeries -bakers -bakery -bakes -baking -bakings -baklavas -balaclava -balaclavas -balalaika -balance -balanced -balancer -balances -balancing -balconies -balcony -bald -balder -balderdash -baldest -balding -baldly -baldness -baldy -bale -baled -baleen -baleful -balefully -bales -bali -baling -ball -ballad -ballade -ballades -ballads -ballast -ballasts -ballbearing -ballbearings -ballerina -ballerinas -ballet -balletic -ballets -ballistic -ballistics -balloon -ballooned -ballooning -balloonist -balloonists -balloons -ballot -balloted -balloting -ballots -ballpen -ballpens -ballpoint -ballroom -ballrooms -balls -ballyhoo -balm -balmier -balmiest -balmoral -balms -balmy -baloney -balsa -balsam -baltic -baluster -balusters -balustrade -balustraded -balustrades -bambino -bamboo -bamboos -bamboozle -bamboozled -bamboozles -ban -banal -banalities -banality -banana -bananas -band -bandage -bandaged -bandages -bandaging -bandanna -banded -bandied -bandier -bandiest -banding -bandit -banditry -bandits -bandpass -bands -bandstand -bandwagon -bandwagons -bandwidth -bandwidths -bane -bang -banged -banger -bangers -banging -bangkok -bangle -bangles -bangs -banish -banished -banishes -banishing -banishment -banister -banisters -banjo -bank -bankable -banked -banker -bankers -banking -banknote -banknotes -bankrupt -bankruptcies -bankruptcy -bankrupted -bankrupting -bankrupts -banks -banned -banner -banners -banning -bannister -bannisters -banns -banquet -banqueting -banquets -bans -banshee -banshees -bantam -bantams -bantamweight -banter -bantered -bantering -baobab -baobabs -bap -baptise -baptised -baptises -baptising -baptism -baptismal -baptisms -baptist -baptists -bar -barb -barbarian -barbarians -barbaric -barbarically -barbarism -barbarities -barbarity -barbarous -barbarously -barbecue -barbecued -barbecues -barbed -barbell -barbels -barber -barbers -barbie -barbiturate -barbiturates -barbs -barcode -bard -bards -bare -bareback -bared -barefaced -barefoot -barefooted -barely -bareness -barer -bares -barest -bargain -bargained -bargainers -bargaining -bargains -barge -barged -bargepole -barges -barging -baring -baritone -baritones -barium -bark -barked -barker -barkers -barking -barks -barky -barley -barleycorn -barleycorns -barmaid -barmaids -barman -barmen -barn -barnacle -barnacles -barns -barnstorming -barnyard -barometer -barometers -barometric -baron -baronage -baroness -baronesses -baronet -baronets -baronial -baronies -barons -barony -baroque -barrack -barracking -barracks -barracuda -barrage -barrages -barre -barred -barrel -barrelled -barrels -barren -barrenness -barricade -barricaded -barricades -barrier -barriers -barring -barrister -barristers -barrow -barrows -bars -bart -bartender -barter -bartered -barterer -bartering -basal -basalt -basaltic -basalts -base -baseball -baseballs -based -baseless -baseline -baselines -basely -basement -basements -baseness -baser -bases -basest -bash -bashed -bashes -bashful -bashfully -bashfulness -bashing -basic -basically -basics -basify -basil -basilica -basilicas -basilisk -basilisks -basin -basinful -basing -basins -basis -bask -basked -basket -basketball -basketful -basketry -baskets -basking -basks -basque -basrelief -basreliefs -bass -basses -bassist -bassoon -bassoons -bastard -bastardisation -bastardise -bastardised -bastards -bastardy -baste -basted -basting -bastion -bastions -bat -batch -batched -batches -batching -bate -bated -bates -bath -bathe -bathed -bather -bathers -bathes -bathetic -bathhouse -bathing -bathos -bathrobe -bathroom -bathrooms -baths -bathtub -bathtubs -bathurst -bathwater -batik -batiks -bating -batman -batmen -baton -batons -bats -batsman -batsmen -battalion -battalions -batted -batten -battened -battening -battens -batter -battered -batteries -battering -batters -battery -batting -battle -battleaxe -battlecry -battled -battledress -battlefield -battlefields -battleground -battlegrounds -battlement -battlemented -battlements -battler -battlers -battles -battleship -battleships -battling -batty -bauble -baubles -baud -baulk -baulked -baulking -baulks -baulky -bauxite -bavaria -bavarian -bawdier -bawdiest -bawdy -bawl -bawled -bawling -bawls -bay -bayed -baying -bayonet -bayonets -bays -bazaar -bazaars -bazooka -bazookas -be -beach -beachcomber -beached -beaches -beachhead -beaching -beachside -beachy -beacon -beaconed -beacons -bead -beaded -beadier -beadiest -beading -beadings -beadle -beadles -beads -beadwork -beady -beadyeyed -beagle -beagles -beak -beaked -beaker -beakers -beaks -beam -beamed -beaming -beams -beamy -bean -beanbag -beanery -beanie -beanpole -beans -beanstalk -beanstalks -beany -bear -bearable -bearably -beard -bearded -beardless -beards -bearer -bearers -bearing -bearings -bearish -bears -bearskin -bearskins -beast -beastliest -beastliness -beastly -beasts -beat -beaten -beater -beaters -beatific -beatification -beatifications -beatified -beatifies -beatify -beating -beatings -beatitude -beatitudes -beatnik -beatniks -beats -beatup -beau -beaus -beauteous -beautician -beauties -beautified -beautifier -beautifiers -beautifies -beautiful -beautifully -beautify -beauts -beauty -beaux -beaver -beavering -beavers -bebop -becalm -becalmed -became -because -beck -beckon -beckoned -beckoning -beckons -becks -become -becomes -becoming -bed -bedazzle -bedazzled -bedbug -bedbugs -bedchamber -bedclothes -bedcover -bedded -bedder -bedding -beddings -bedecked -bedecks -bedevil -bedevilled -bedevilment -bedevils -bedfellow -bedfellows -bedlam -bedlinen -bedmaker -bedmakers -bedouin -bedouins -bedpan -bedpans -bedpost -bedraggled -bedridden -bedrock -bedroom -bedrooms -beds -bedsheets -bedside -bedsit -bedsitter -bedsitters -bedsore -bedsores -bedspread -bedspreads -bedstead -bedsteads -bedtime -bedtimes -bee -beech -beeches -beechnut -beechwood -beef -beefburger -beefburgers -beefcake -beefeater -beefier -beefiest -beefs -beefy -beehive -beehives -beekeepers -beeline -beelines -been -beep -beeper -beeping -beeps -beer -beermat -beermats -beers -beery -bees -beeswax -beet -beetle -beetles -beetroot -beets -befall -befallen -befalling -befalls -befell -befit -befits -befitted -befitting -befog -before -beforehand -befoul -befriend -befriended -befriending -befriends -befuddle -befuddled -befuddling -beg -began -begat -beget -begets -begetting -beggar -beggared -beggarly -beggars -beggary -begged -begging -beggings -begin -beginner -beginners -beginning -beginnings -begins -begone -begonias -begot -begotten -begrudge -begrudged -begrudgingly -begs -beguile -beguiled -beguilement -beguiling -begun -behalf -behave -behaved -behaves -behaving -behaviour -behavioural -behaviourally -behaviourism -behaviourist -behaviourists -behaviours -behead -beheaded -beheading -beheld -behemoth -behest -behind -behindhand -behinds -behold -beholden -beholder -beholders -beholding -beholds -behoved -behoves -beige -beijing -being -beings -beirut -bejewel -bejewelled -bel -belabour -belated -belatedly -belatedness -belay -belayed -belays -belch -belched -belches -belching -beleaguered -belfast -belfries -belfry -belgian -belgians -belgium -belgrade -belie -belied -belief -beliefs -belies -believability -believable -believably -believe -believed -believer -believers -believes -believing -belike -belittle -belittled -belittles -belittling -bell -belladonna -bellbottoms -belle -belled -belles -bellicose -bellicosity -bellies -belligerence -belligerent -belligerently -belligerents -bellow -bellowed -bellowing -bellows -bells -belly -bellyful -belong -belonged -belonging -belongings -belongs -beloved -below -belt -belted -belting -beltings -belts -belying -bemoan -bemoaned -bemoaning -bemoans -bemuse -bemused -bemusedly -bemusement -ben -bench -benches -benchmark -benchmarking -benchmarks -bend -bendable -bended -bender -benders -bending -bendings -bends -beneath -benediction -benedictions -benefaction -benefactions -benefactor -benefactors -benefactress -benefice -beneficence -beneficent -beneficial -beneficially -beneficiaries -beneficiary -benefit -benefited -benefiting -benefits -benelux -benevolence -benevolent -benevolently -bengal -benighted -benightedly -benign -benignity -benignly -benjamin -bent -benzene -bequeath -bequeathed -bequeathing -bequest -bequests -berate -berated -berating -berber -bereave -bereaved -bereavement -bereavements -bereaving -bereft -beret -berets -bergs -berk -berlin -berliner -bermuda -bern -berries -berry -berserk -berth -berthed -berths -beryl -beryllium -beseech -beseeched -beseeches -beseeching -beseechingly -beset -besets -besetting -beside -besides -besiege -besieged -besieging -besmirch -besot -besotted -bespattered -bespeak -bespeaking -bespeaks -bespectacled -bespoke -best -bestial -bestiality -bestiary -bestir -bestirred -bestirring -bestknown -bestow -bestowal -bestowals -bestowed -bestowing -bestows -bestride -bestrode -bests -bestseller -bestsellers -bestselling -bet -beta -betel -betide -betimes -betoken -betokened -betokens -betray -betrayal -betrayals -betrayed -betrayer -betrayers -betraying -betrays -betroth -betrothal -betrothed -betroths -bets -betted -better -bettered -bettering -betterment -betters -betting -between -betwixt -bevel -bevelled -bevelling -bevels -beverage -beverages -bevvy -bevy -bewail -bewailed -bewailing -bewails -beware -bewhiskered -bewilder -bewildered -bewildering -bewilderingly -bewilderment -bewilders -bewitch -bewitched -bewitching -beyond -biannual -bias -biased -biases -biasing -biassed -biasses -biassing -bib -bible -bibles -biblical -biblically -biblicists -bibliographic -bibliographical -bibliographies -bibliography -bibliophile -bibs -bicameral -bicarb -bicarbonate -bicentenary -bicentennial -biceps -bicker -bickering -bickerings -bicycle -bicycled -bicycles -bicycling -bid -bidden -bidder -bidders -bidding -biddings -bide -bided -bides -bidet -biding -bidirectional -bids -biennial -biennials -bier -bifocal -bifocals -bifurcated -bifurcation -bifurcations -big -bigamist -bigamists -bigamous -bigamy -bigapple -bigben -bigger -biggest -biggish -bigheads -bigness -bigot -bigoted -bigotry -bigots -bijou -bijoux -bike -biker -bikes -biking -bikini -bikinis -bilabial -bilateral -bilaterally -bile -biles -bilge -bilges -bilharzia -biliary -bilingual -bilingualism -bilinguals -bilious -bill -billable -billboard -billboards -billed -billet -billeted -billeting -billets -billiard -billiards -billing -billings -billion -billionaire -billionaires -billions -billionth -billow -billowed -billowing -billows -billowy -billposters -bills -billy -biltong -bimbo -bimodal -bimonthly -bin -binaries -binary -bind -binder -binders -bindery -binding -bindings -binds -bindweed -bing -binge -bingo -binnacle -binocular -binoculars -binodal -binomial -bins -biochemical -biochemically -biochemist -biochemistry -biochemists -biodegradable -biodiversity -bioengineering -biofeedback -biogeographical -biographer -biographers -biographical -biographically -biographies -biography -biological -biologically -biologist -biologists -biology -biomass -biomedical -biometric -biometrics -biometry -biomorph -bionic -bionics -biophysical -biopsies -biopsy -biorhythm -biorhythms -bioscope -biosphere -biospheres -biosynthesis -biota -biotechnological -biotechnologist -biotechnologists -biotechnology -biotic -bipartisan -bipartite -biped -bipedal -bipedalism -bipeds -biplane -biplanes -bipolar -birch -birched -birches -bird -birdbath -birdbaths -birdcage -birdcages -birdie -birdies -birds -birdsong -birdtables -birdwatcher -birdwatchers -birdwatching -birefringence -birefringent -birth -birthday -birthdays -birthmark -birthmarks -birthplace -birthrate -birthright -birthrights -births -biscuit -biscuits -biscuity -bisect -bisected -bisecting -bisects -bisexual -bisexuality -bisexuals -bishop -bishopric -bishoprics -bishops -bismarck -bismuth -bison -bisons -bissau -bistable -bistro -bit -bitch -bitches -bitchiness -bitching -bitchy -bite -biter -biters -bites -biting -bitingly -bitmap -bits -bitten -bitter -bitterest -bitterly -bittern -bitterness -bitters -bittersweet -bittiness -bitts -bitty -bitumen -bituminous -bivalve -bivalves -bivouac -bivouacked -bivouacs -biweekly -biz -bizarre -bizarrely -bizarreness -blab -blabbed -blabber -blabbering -blabs -black -blackball -blackballed -blackballing -blackberries -blackberry -blackbird -blackbirds -blackboard -blackboards -blackcurrant -blackcurrants -blacked -blacken -blackened -blackening -blackens -blacker -blackest -blackfly -blackguard -blackhead -blackheads -blacking -blackish -blackjack -blackleg -blacklist -blacklisted -blacklisting -blacklists -blackly -blackmail -blackmailed -blackmailer -blackmailers -blackmailing -blackmails -blackness -blackout -blackouts -blacks -blacksea -blackshirts -blacksmith -blacksmiths -blackthorn -bladder -bladders -blade -bladed -blades -blah -blame -blameable -blamed -blameful -blameless -blamelessly -blamelessness -blames -blameworthy -blaming -blanch -blanched -blanching -blancmange -bland -blandest -blandishments -blandly -blandness -blank -blanked -blanker -blanket -blanketed -blanketing -blankets -blanking -blankly -blankness -blanks -blare -blared -blares -blaring -blase -blaspheme -blasphemed -blasphemer -blasphemers -blasphemies -blaspheming -blasphemous -blasphemously -blasphemy -blast -blasted -blaster -blasters -blasting -blasts -blat -blatancy -blatant -blatantly -blaze -blazed -blazer -blazers -blazes -blazing -bleach -bleached -bleacher -bleachers -bleaches -bleaching -bleak -bleaker -bleakest -bleakly -bleakness -blearily -bleary -blearyeyed -bleat -bleated -bleating -bleats -bled -bleed -bleeder -bleeders -bleeding -bleeds -bleep -bleeped -bleeper -bleeping -bleeps -blemish -blemished -blemishes -blench -blenched -blend -blended -blender -blenders -blending -blends -blesbok -bless -blessed -blessedness -blesses -blessing -blessings -blew -blight -blighted -blighting -blights -blimp -blimps -blind -blinded -blinder -blindest -blindfold -blindfolded -blindfolds -blinding -blindingly -blindly -blindness -blinds -blink -blinked -blinker -blinkered -blinkering -blinkers -blinking -blinks -blip -blips -bliss -blissful -blissfully -blister -blistered -blistering -blisteringly -blisters -blithe -blithely -blithering -blitz -blitzkrieg -blizzard -blizzards -bloat -bloated -bloating -blob -blobs -bloc -block -blockade -blockaded -blockades -blockading -blockage -blockages -blockbuster -blockbusters -blockbusting -blocked -blockers -blockhead -blockheads -blocking -blockish -blocks -blocky -blocs -bloke -blokes -blond -blonde -blonder -blondes -blondest -blondhaired -blonds -blood -bloodbath -bloodcurdling -blooded -bloodhound -bloodhounds -bloodied -bloodier -bloodies -bloodiest -bloodily -bloodless -bloodlessness -bloodletting -bloodline -bloodlust -bloodred -bloods -bloodshed -bloodshot -bloodsport -bloodsports -bloodstain -bloodstained -bloodstains -bloodstock -bloodstone -bloodstream -bloodsuckers -bloodthirstier -bloodthirstiest -bloodthirsty -bloodworm -bloody -bloodymindedness -bloom -bloomed -bloomer -bloomers -blooming -blooms -bloomy -blossom -blossomed -blossoming -blossoms -blot -blotch -blotched -blotches -blotchy -blots -blotted -blotter -blotting -blouse -blouses -blow -blowdried -blowdrying -blowed -blower -blowers -blowfly -blowing -blowlamp -blown -blowpipe -blowpipes -blows -blowtorch -blowtorches -blowup -blubber -blubbered -blubbering -bludgeon -bludgeoned -bludgeoning -bludgeons -blue -bluebell -bluebells -blueberries -blueberry -bluebird -bluebirds -blueblooded -bluebottle -bluebottles -bluecollar -blueish -bluemoon -blueness -bluenile -blueprint -blueprints -bluer -blues -bluest -bluesy -bluff -bluffed -bluffer -bluffers -bluffing -bluffs -bluish -blunder -blunderbuss -blundered -blundering -blunderings -blunders -blunt -blunted -blunter -bluntest -blunting -bluntly -bluntness -blunts -blur -blurb -blurbs -blurred -blurring -blurry -blurs -blurt -blurted -blurting -blurts -blush -blushed -blusher -blushers -blushes -blushing -blushingly -bluster -blustered -blustering -blusters -blustery -bmus -boa -boar -board -boarded -boarder -boarders -boardgames -boarding -boardings -boardroom -boardrooms -boards -boars -boas -boast -boasted -boaster -boasters -boastful -boastfully -boastfulness -boasting -boasts -boat -boated -boater -boaters -boathouse -boathouses -boating -boatload -boatman -boatmen -boats -boatswain -bob -bobbed -bobbies -bobbin -bobbing -bobbins -bobble -bobbles -bobby -bobcat -bobs -bobsled -bobtail -bobtails -bode -boded -bodes -bodice -bodices -bodied -bodies -bodiless -bodily -boding -bodkin -body -bodybuilding -bodyguard -bodyguards -bodywork -boer -boers -boerwar -boffin -boffins -bog -bogey -bogeyman -bogeymen -bogeys -bogged -boggiest -bogging -boggle -boggled -boggles -boggling -bogglingly -boggy -bogies -bogs -bogus -bogy -bohemian -boil -boiled -boiler -boilermakers -boilers -boiling -boils -boisterous -boisterously -bola -bold -bolder -boldest -boldface -boldly -boldness -bole -bolero -boleyn -bolivia -bollard -bollards -bologna -bolster -bolstered -bolstering -bolsters -bolt -bolted -bolting -bolts -bomb -bombard -bombarded -bombardier -bombarding -bombardment -bombardments -bombards -bombast -bombastic -bombasts -bombay -bombed -bomber -bombers -bombing -bombings -bombs -bombshell -bonanza -bonanzas -bonbon -bonbons -bond -bondage -bonded -bondholders -bonding -bondings -bonds -bone -boned -boneless -bonemeal -bones -boney -bonfire -bonfires -bong -bongs -bonier -boniest -bonn -bonnet -bonneted -bonnets -bonnie -bonniest -bonny -bonobo -bonsai -bonus -bonuses -bony -boo -boobies -booboo -booby -boobytrap -boobytrapped -boobytraps -booed -boohoo -booing -book -bookable -bookbinder -bookbinders -bookbinding -bookcase -bookcases -booked -bookends -bookers -bookie -bookies -booking -bookings -bookish -bookkeeper -bookkeeping -booklet -booklets -bookmaker -bookmakers -bookmaking -bookmark -bookmarks -books -bookseller -booksellers -bookshelf -bookshelves -bookshop -bookshops -bookstall -bookstalls -bookwork -bookworm -bookworms -boom -boomed -boomer -boomerang -boomeranging -boomerangs -booming -booms -boon -boons -boor -boorish -boorishly -boorishness -boors -boos -boost -boosted -booster -boosters -boosting -boosts -boot -booted -bootees -booth -booths -booting -bootlace -bootlaces -bootleg -bootless -bootprints -boots -bootstrap -bootstraps -booty -booze -boozed -boozer -boozers -boozes -bop -bops -boracic -borate -borates -borax -bordeaux -border -bordered -borderer -bordering -borderline -borders -bore -boreal -bored -boredom -borehole -boreholes -borer -borers -bores -boring -boringly -born -bornagain -borne -borneo -boron -borough -boroughs -borrow -borrowable -borrowed -borrower -borrowers -borrowing -borrowings -borrows -borstal -borstals -bosnia -bosom -bosoms -boson -bosons -boss -bossed -bosses -bossier -bossiest -bossiness -bossing -bossy -boston -bosun -botanic -botanical -botanically -botanist -botanists -botany -botch -botched -both -bother -bothered -bothering -bothers -bothersome -bothy -botswana -bottle -bottled -bottlefed -bottlefeed -bottleneck -bottlenecks -bottler -bottles -bottling -bottom -bottomed -bottoming -bottomless -bottommost -bottoms -botulism -boudoir -boudoirs -bouffant -bougainvillea -bough -boughs -bought -boulder -boulders -boulevard -boulevards -bounce -bounced -bouncer -bouncers -bounces -bouncier -bounciest -bouncing -bouncy -bound -boundaries -boundary -bounded -boundedness -bounder -bounders -bounding -boundless -bounds -bounteous -bounties -bountiful -bountifully -bounty -bouquet -bouquets -bourbon -bourbons -bourgeois -bourgeoisie -bout -boutique -boutiques -bouts -bovine -bow -bowdlerisation -bowdlerised -bowdlerising -bowed -bowel -bowels -bower -bowers -bowie -bowing -bowl -bowlder -bowled -bowler -bowlers -bowlines -bowling -bowls -bowman -bowmen -bows -bowsprit -bowstring -box -boxed -boxer -boxers -boxes -boxful -boxing -boxoffice -boxtops -boxwood -boxy -boy -boycott -boycotted -boycotting -boycotts -boyfriend -boyfriends -boyhood -boyish -boyishly -boys -boyscout -bra -brabble -brabbled -brabbles -brace -braced -bracelet -bracelets -bracer -braces -brachiopods -bracing -bracingly -bracken -bracket -bracketed -bracketing -brackets -brackish -bradawl -bradycardia -brag -braggart -braggarts -bragged -bragging -brags -brahman -brahms -braid -braided -braiding -braids -brail -braille -brain -braincell -braincells -brainchild -braindamaged -braindead -brainier -brainless -brainlessly -brainlessness -brainpower -brains -brainstorm -brainstorming -brainstorms -brainteasers -brainteasing -brainwash -brainwashed -brainwashing -brainwave -brainwaves -brainy -braise -braised -brake -brake -braked -brakes -braking -bramble -brambles -bran -branch -branched -branches -branching -branchy -brand -branded -brandies -branding -brandish -brandished -brandishes -brandishing -brands -brandy -brans -bras -brash -brasher -brashly -brashness -brasiers -brasil -brasilia -brass -brasserie -brasses -brassiere -brassy -brat -brats -bratty -bravado -brave -braved -bravely -braver -bravery -braves -bravest -braving -bravo -braw -brawl -brawled -brawler -brawling -brawls -brawn -brawnier -brawniest -brawny -bray -brayed -braying -brays -braze -brazen -brazened -brazenly -brazenness -brazier -braziers -brazil -brazing -breach -breached -breaches -breaching -bread -breadandbutter -breadboard -breadboards -breadcrumbs -breaded -breadfruit -breadline -breads -breadth -breadths -breadwinner -breadwinners -break -breakable -breakage -breakages -breakaway -breakaways -breakdown -breakdowns -breaker -breakers -breakfast -breakfasted -breakfasting -breakfasts -breakin -breaking -breakins -breakneck -breakout -breakpoint -breakpoints -breaks -breakthrough -breakthroughs -breakup -breakups -breakwater -breakwaters -bream -breast -breastbone -breasted -breastfeed -breastfeeding -breasting -breastplate -breasts -breaststroke -breath -breathable -breathalysed -breathalyser -breathalysers -breathe -breathed -breather -breathes -breathing -breathings -breathingspace -breathless -breathlessly -breathlessness -breaths -breathtaking -breathtakingly -breathy -breccias -brecciated -bred -breech -breeches -breed -breeder -breeders -breeding -breeds -breeze -breezed -breezes -breezier -breeziest -breezily -breezing -breezy -brethren -breton -breviary -brevity -brew -brewage -brewed -brewer -breweries -brewers -brewery -brewing -brews -briar -bribe -bribed -briber -bribers -bribery -bribes -bribing -bricabrac -brick -brickbat -brickbats -bricked -bricking -bricklayer -bricklayers -bricklaying -brickred -bricks -brickwork -bridal -bridals -bride -bridegroom -bridegrooms -brides -bridesmaid -bridesmaids -bridge -bridgebuilding -bridged -bridgehead -bridges -bridging -bridle -bridled -bridles -bridleway -bridleways -bridling -brief -briefcase -briefcases -briefed -briefer -briefest -briefing -briefings -briefly -briefs -briers -brig -brigade -brigades -brigadier -brigadiers -brigand -brigands -bright -brighten -brightened -brightening -brightens -brighter -brightest -brighteyed -brightly -brightness -brightnesses -brighton -brilliance -brilliancy -brilliant -brilliantly -brim -brimmed -brimming -brims -brimstone -brindled -brine -brines -bring -bringer -bringing -brings -brink -brinkmanship -brinks -briny -brio -brioche -briquettes -brisbane -brisk -brisker -briskest -briskly -briskness -bristle -bristled -bristles -bristling -bristly -brit -britain -british -britons -brittle -brittleness -broach -broached -broaches -broaching -broad -broadband -broadcast -broadcaster -broadcasters -broadcasting -broadcasts -broaden -broadened -broadening -broadens -broader -broadest -broadleaved -broadloom -broadly -broadminded -broadmindedness -broadness -broadsheet -broadsheets -broadside -broadsides -broadsword -broadswords -broadway -brocade -brocaded -broccoli -brochure -brochures -brogue -brogues -broil -broiled -broiler -broiling -broils -broke -broken -brokenhearted -brokenly -broker -brokerage -brokered -brokers -broking -bromide -bromides -bromine -bronchi -bronchial -bronchitis -bronco -brontosaurus -bronze -bronzed -bronzes -brooch -brooches -brood -brooded -broodiness -brooding -broodingly -broods -broody -brook -brooklyn -brooks -broom -brooms -broomstick -broomsticks -broth -brothel -brothels -brother -brotherhood -brotherinlaw -brotherly -brothers -brothersinlaw -broths -brought -brouhaha -brow -browbeat -browbeaten -browbeating -brown -browned -browner -brownest -brownie -brownies -browning -brownish -brownness -browns -brows -browse -browsed -browser -browsers -browses -browsing -bruise -bruised -bruiser -bruisers -bruises -bruising -brunch -brunches -brunei -brunet -brunets -brunette -brunettes -brunt -brunts -brush -brushed -brushes -brushing -brushoff -brushup -brushwood -brushwork -brushy -brusque -brusquely -brusqueness -brussels -brutal -brutalisation -brutalise -brutalised -brutalising -brutalism -brutalities -brutality -brutally -brute -brutes -brutish -brutishness -brutus -bub -bubble -bubbled -bubblegum -bubbles -bubblier -bubbliest -bubbling -bubbly -bubonic -buccaneer -buccaneering -buccaneers -buck -bucked -bucket -bucketful -bucketfuls -bucketing -buckets -bucking -buckle -buckled -buckler -bucklers -buckles -buckling -buckminsterfullerene -buckpassing -bucks -buckshot -buckskin -bucolic -bud -budapest -budded -buddhism -buddhist -buddies -budding -buddings -buddy -budge -budged -budgerigar -budget -budgetary -budgeted -budgeting -budgets -budgie -budgies -budging -buds -buff -buffalo -buffer -buffered -buffering -buffers -buffet -buffeted -buffeting -buffetings -buffets -buffing -buffoon -buffoonery -buffoons -buffs -bug -bugbear -bugbears -bugeyed -bugged -bugger -buggered -buggering -buggers -buggery -buggies -bugging -buggy -bugle -bugler -buglers -bugles -bugs -build -builder -builders -building -buildings -builds -buildup -buildups -built -builtin -builtup -bulb -bulbous -bulbs -bulgaria -bulge -bulged -bulges -bulging -bulgy -bulimia -bulimic -bulk -bulkhead -bulkheads -bulkier -bulkiest -bulks -bulky -bull -bulldog -bulldogs -bulldoze -bulldozed -bulldozer -bulldozers -bulldozing -bullet -bulletin -bulletins -bulletproof -bullets -bullfight -bullfighting -bullfinch -bullfrog -bullied -bullies -bullion -bullish -bullock -bullocks -bulls -bully -bullying -bulrushes -bulwark -bulwarks -bum -bumble -bumbled -bumbler -bumblers -bumbles -bumbling -bump -bumped -bumper -bumpers -bumpier -bumpiest -bumping -bumpkin -bumpkins -bumps -bumptious -bumpy -bums -bun -bunch -bunched -bunches -bunching -bundle -bundled -bundles -bundling -bung -bungalow -bungalows -bungee -bungle -bungled -bungler -bunglers -bungles -bungling -bunion -bunions -bunk -bunked -bunker -bunkered -bunkers -bunks -bunkum -bunnies -bunny -buns -bunting -bunyan -buoy -buoyancy -buoyant -buoyantly -buoyed -buoys -bur -burble -burbled -burbles -burbling -burden -burdened -burdening -burdens -burdensome -burdock -bureau -bureaucracies -bureaucracy -bureaucrat -bureaucratic -bureaucratically -bureaucratisation -bureaucrats -bureaus -bureaux -burette -burg -burgeon -burgeoned -burgeoning -burgeons -burger -burgers -burghers -burglar -burglaries -burglars -burglary -burgle -burgled -burgles -burgling -burgundy -burial -burials -buried -buries -burlesque -burlesquing -burlier -burliest -burly -burma -burmese -burn -burned -burner -burners -burning -burnings -burnished -burnishing -burns -burnt -burp -burped -burping -burps -burr -burrow -burrowed -burrowing -burrows -burs -bursar -bursaries -bursars -bursary -burst -bursted -bursting -bursts -burundi -bury -burying -bus -buses -bush -bushel -bushels -bushes -bushfire -bushier -bushiest -bushiness -bushing -bushland -bushman -bushmen -bushy -busied -busier -busies -busiest -busily -business -businesses -businesslike -businessman -businessmen -businesswoman -busk -busker -buskers -busking -busman -busmen -bussed -bussing -bust -bustard -bustards -busted -busters -bustier -busting -bustle -bustled -bustles -bustling -busts -busty -busy -busybodies -busybody -busying -but -butane -butcher -butchered -butchering -butchers -butchery -butler -butlers -buts -butt -butted -butter -buttercup -buttercups -buttered -butterfat -butterflies -butterfly -buttering -buttermilk -butters -butterscotch -buttery -butting -buttock -buttocks -button -buttoned -buttonhole -buttonholed -buttonholes -buttoning -buttons -buttress -buttressed -buttresses -buttressing -butts -buxom -buy -buyer -buyers -buying -buyout -buys -buzz -buzzard -buzzards -buzzed -buzzer -buzzers -buzzes -buzzing -buzzwords -by -bye -byebye -byelaw -byelaws -byelection -byelections -byes -bygone -bygones -bylaw -bylaws -byline -bypass -bypassed -bypasses -bypassing -bypath -bypaths -byproduct -byproducts -bystander -bystanders -byte -bytes -byway -byways -byword -cab -cabal -cabals -cabaret -cabarets -cabbage -cabbages -cabby -cabin -cabinet -cabinetmaker -cabinets -cabins -cable -cabled -cables -cableway -cabling -cabman -cabmen -caboodle -caboose -cabriolet -cabs -cacao -cache -cached -caches -cachet -caching -cackle -cackled -cackles -cackling -cacophonous -cacophony -cacti -cactus -cactuses -cad -cadaver -cadaverous -cadavers -caddie -caddied -caddies -caddy -caddying -cade -cadence -cadences -cadenza -cadenzas -cadet -cadets -cadge -cadged -cadger -cadges -cadmium -cads -caesar -cafe -cafes -cafeteria -cafeterias -caftan -caftans -cage -caged -cages -cagey -cagiest -caging -cagoule -cagoules -cagy -cahoots -caiman -caimans -cain -cairn -cairns -cairo -cajole -cajoled -cajoling -cake -caked -cakes -caking -calamities -calamitous -calamitously -calamity -calcareous -calcification -calcified -calcify -calcite -calcium -calculable -calculate -calculated -calculatedly -calculates -calculating -calculation -calculations -calculative -calculator -calculators -calculus -calcutta -caldera -caldron -caldrons -calendar -calendars -calf -calibrate -calibrated -calibrates -calibrating -calibration -calibrations -calibrator -calibrators -calibre -calico -calif -california -caliper -calipers -caliph -call -callable -called -caller -callers -callgirl -callgirls -calligrapher -calligraphic -calligraphy -calling -callings -calliper -callipers -callisthenics -callous -calloused -callously -callousness -callow -callowness -calls -callup -callus -calm -calmed -calmer -calmest -calming -calmly -calmness -calms -calorie -calories -calorific -calorimeter -calorimeters -calorimetry -calory -calumniate -calumnies -calumny -calvary -calve -calves -calvin -calving -calypso -cam -camaraderie -camber -cambodia -camcorder -camcorders -came -camel -camelhair -camelot -camels -cameo -camera -cameraman -cameramen -cameras -camerawork -camisole -camomile -camouflage -camouflaged -camouflages -camouflaging -camp -campaign -campaigned -campaigner -campaigners -campaigning -campaigns -campanile -campanological -campanologist -campanology -camped -camper -campers -campfire -campfires -camphor -camping -camps -campsite -campsites -campus -campuses -cams -camshaft -can -canaan -canada -canadian -canal -canalisation -canals -canape -canapes -canard -canaries -canary -canberra -cancan -cancel -cancellation -cancellations -cancelled -cancelling -cancels -cancer -cancerous -cancers -candelabra -candelas -candid -candidacy -candidate -candidates -candidature -candidatures -candidly -candies -candle -candlelight -candlelit -candlepower -candles -candlestick -candlesticks -candour -candy -cane -caned -canes -canine -canines -caning -canings -canister -canisters -cannabis -canned -cannel -cannery -cannes -cannibal -cannibalise -cannibalised -cannibalising -cannibalism -cannibalistic -cannibals -cannily -canning -cannon -cannonball -cannonballs -cannoned -cannoning -cannons -cannot -cannula -canny -canoe -canoed -canoeing -canoeist -canoeists -canoes -canon -canonic -canonical -canonically -canonisation -canonise -canonised -canonry -canons -canopener -canopied -canopies -canopy -cans -cant -cantaloupe -cantankerous -cantata -cantatas -canted -canteen -canteens -canter -cantered -cantering -canters -canticle -canticles -cantilever -cantilevered -canton -cantons -cantor -canvas -canvased -canvases -canvass -canvassed -canvasser -canvassers -canvasses -canvassing -canyon -canyons -cap -capabilities -capability -capable -capably -capacious -capacitance -capacities -capacitive -capacitor -capacitors -capacity -caparisoned -cape -caped -caper -capered -capering -capers -capes -capetown -capillaries -capillary -capita -capital -capitalisation -capitalise -capitalised -capitalises -capitalising -capitalism -capitalist -capitalistic -capitalists -capitally -capitals -capitate -capitation -capitol -capitulate -capitulated -capitulates -capitulating -capitulation -capped -capping -cappuccino -capri -caprice -caprices -capricious -capriciously -capriciousness -capriole -capris -caps -capsize -capsized -capsizes -capsizing -capstan -capstans -capsule -capsules -captain -captaincy -captained -captaining -captains -caption -captioned -captions -captious -captivate -captivated -captivating -captivation -captive -captives -captivity -captor -captors -capture -captured -captures -capturing -capybara -car -carabinieri -caracal -caracals -carafe -caramel -caramelised -caramels -carapace -carat -carats -caravan -caravanning -caravans -caravel -caraway -carbide -carbine -carbines -carbohydrate -carbohydrates -carbolic -carbon -carbonaceous -carbonate -carbonated -carbonates -carbonic -carboniferous -carbonise -carbons -carbonyl -carborundum -carboxyl -carbuncle -carbuncles -carburettor -carburettors -carcase -carcases -carcass -carcasses -carcinogen -carcinogenesis -carcinogenic -carcinogens -carcinoma -carcinomas -card -cardboard -carded -cardholders -cardiac -cardiff -cardigan -cardigans -cardinal -cardinality -cardinals -carding -cardioid -cardiologist -cardiology -cardiopulmonary -cardiovascular -cards -care -cared -career -careered -careering -careerism -careerist -careerists -careers -carefree -careful -carefully -carefulness -careless -carelessly -carelessness -carer -carers -cares -caress -caressed -caresses -caressing -caressingly -caretaker -caretakers -carets -careworn -cargo -caribou -caricature -caricatured -caricatures -caricaturisation -caries -caring -carmine -carnage -carnages -carnal -carnality -carnally -carnation -carnations -carnival -carnivals -carnivore -carnivores -carnivorous -carnivorousness -carol -carols -carotene -carotid -carotin -carouse -carousel -carousing -carp -carpal -carpenter -carpenters -carpentry -carpet -carpeted -carpeting -carpets -carping -carport -carports -carps -carrel -carriage -carriages -carriageway -carriageways -carried -carrier -carriers -carries -carrion -carrot -carrots -carroty -carry -carrycot -carrying -cars -carsick -cart -carted -cartel -cartels -carter -carthorses -cartilage -carting -cartload -cartloads -cartographer -cartographers -cartographic -cartography -carton -cartons -cartoon -cartoonist -cartoonists -cartoons -cartouche -cartridge -cartridges -carts -cartwheel -cartwheels -carve -carved -carver -carvers -carvery -carves -carving -carvings -caryatids -casanova -cascade -cascaded -cascades -cascading -cascara -case -casebook -cased -caseload -caseloads -casement -casements -cases -casework -cash -cashbox -cashed -cashes -cashew -cashier -cashiers -cashing -cashless -cashmere -casing -casings -casino -cask -casket -caskets -casks -cassava -casserole -casseroles -cassette -cassettes -cassock -cassocks -cassowary -cast -castanet -castanets -castaway -castaways -caste -castellated -caster -casters -castes -castigate -castigated -castigates -castigating -casting -castings -castiron -castle -castled -castles -castling -castoff -castoffs -castor -castors -castrate -castrated -castrating -castration -castrato -casts -casual -casually -casualness -casuals -casualties -casualty -casuistry -cat -cataclysm -cataclysmic -catacomb -catacombs -catalepsy -catalogue -catalogued -cataloguer -cataloguers -catalogues -cataloguing -catalyse -catalysed -catalyses -catalysing -catalysis -catalyst -catalysts -catalytic -catamaran -catamarans -catanddog -catapult -catapulted -catapulting -catapults -cataract -cataracts -catarrh -catastrophe -catastrophes -catastrophic -catastrophically -catatonic -catcalls -catch -catched -catcher -catchers -catches -catchier -catchiest -catching -catchment -catchphrase -catchphrases -catchword -catchwords -catchy -catechism -catechisms -catechist -catechists -categorical -categorically -categories -categorisation -categorisations -categorise -categorised -categorises -categorising -category -cater -catered -caterer -caterers -catering -caterpillar -caterpillars -caters -caterwaul -caterwauls -catfish -catgut -catguts -catharsis -cathartic -cathedral -cathedrals -catheter -catheterisation -catheters -cathode -cathodes -catholic -cation -cationic -cations -catlike -catnap -catnip -cats -catsuit -cattery -cattle -catwalk -catwalks -caucus -caucuses -caudal -caught -cauldron -cauldrons -cauliflower -cauliflowers -caulking -causal -causality -causally -causation -causative -cause -caused -causes -causeway -causeways -causing -caustic -caustically -caustics -cauterise -cauterising -caution -cautionary -cautioned -cautioning -cautions -cautious -cautiously -cautiousness -cavalcade -cavalier -cavalierly -cavaliers -cavalry -cavalryman -cavalrymen -cave -caveat -caveats -caved -cavein -caveman -cavemen -caver -cavern -cavernous -caverns -cavers -caves -caviar -caviare -caviars -caving -cavitation -cavities -cavity -cavort -cavorted -cavorting -cavorts -caw -cawing -cayman -caymans -cease -ceased -ceasefire -ceasefires -ceaseless -ceaselessly -ceases -ceasing -cedar -cedars -cedarwood -cede -ceded -cedilla -ceding -ceilidh -ceilidhs -ceiling -ceilings -celandine -celeb -celebrant -celebrants -celebrate -celebrated -celebrates -celebrating -celebration -celebrations -celebratory -celebrities -celebrity -celeriac -celery -celestial -celestially -celibacy -celibate -cell -cellar -cellars -cellist -cellists -cello -cellophane -cells -cellular -cellulite -celluloid -cellulose -celsius -celtic -cement -cemented -cementing -cements -cemeteries -cemetery -cenotaph -censer -censor -censored -censorial -censoring -censorious -censoriousness -censors -censorship -censure -censured -censures -censuring -census -censuses -cent -centaur -centaurs -centenarians -centenary -centennial -centigrade -centime -centimes -centimetre -centimetres -centipede -centipedes -central -centralisation -centralise -centralised -centraliser -centralisers -centralises -centralising -centralism -centralist -centrality -centrally -centre -centred -centrefold -centrefolds -centreing -centrepiece -centrepieces -centres -centric -centrifugal -centrifugally -centrifugation -centrifuge -centrifuged -centrifuges -centrifuging -centring -centripetal -centrist -centrists -centroid -centroids -cents -centuries -centurion -centurions -century -cephalopods -ceramic -ceramics -ceramist -cereal -cereals -cerebellum -cerebral -cerebrum -ceremonial -ceremonially -ceremonials -ceremonies -ceremonious -ceremoniously -ceremony -ceres -cerise -certain -certainly -certainties -certainty -certifiable -certifiably -certificate -certificated -certificates -certification -certified -certifies -certify -certifying -certitude -certitudes -cervical -cervix -cess -cessation -cessations -cession -cesspit -cesspool -cesspools -cetacean -ceylon -chacha -chad -chafe -chafed -chafes -chaff -chaffed -chaffinch -chaffinches -chaffing -chafing -chagrin -chagrined -chain -chained -chaining -chains -chainsaw -chainsaws -chainsmoke -chainsmoked -chainsmoking -chair -chaired -chairing -chairlift -chairman -chairmanship -chairmanships -chairmen -chairperson -chairpersons -chairs -chairwoman -chairwomen -chaldronxxxxxxxxxxxxxx -chalet -chalets -chalice -chalices -chalk -chalked -chalking -chalks -chalky -challenge -challenged -challenger -challengers -challenges -challenging -challengingly -chamber -chambered -chamberlain -chamberlains -chambermaid -chambermaids -chamberpot -chamberpots -chambers -chameleon -chameleons -chamfer -chamfered -chamois -chamomile -champ -champagne -champagnes -champing -champion -championed -championing -champions -championship -championships -champs -chance -chanced -chancel -chancellery -chancellor -chancellors -chancellorship -chancer -chancery -chances -chancier -chanciest -chancing -chancy -chandelier -chandeliers -chandler -change -changeability -changeable -changed -changeless -changeling -changeover -changeovers -changer -changers -changes -changing -channel -channelled -channelling -channels -chant -chanted -chanter -chanteuse -chanting -chantings -chantries -chantry -chants -chaos -chaotic -chaotically -chap -chapel -chapels -chaperon -chaperone -chaperoned -chaperones -chaplain -chaplaincy -chaplains -chaplainxxxxxxxx -chapman -chapped -chapping -chaps -chapter -chapters -char -charabanc -character -characterful -characterisation -characterisations -characterise -characterised -characterises -characterising -characteristic -characteristically -characteristics -characterless -characters -charade -charades -charcoal -charcuterie -chared -charge -chargeable -charged -charger -chargers -charges -charging -chariot -charioteer -charioteers -chariots -charisma -charismas -charismatic -charismatically -charismatics -charitable -charitably -charities -charity -charlady -charlatan -charlatans -charles -charlie -charm -charmed -charmer -charmers -charming -charmingly -charmless -charms -charon -charred -charring -chars -chart -charted -charter -chartered -chartering -charters -charting -chartists -charts -charwoman -chary -chase -chased -chaser -chasers -chases -chasing -chasm -chasms -chassis -chaste -chastely -chastened -chastening -chastise -chastised -chastisement -chastises -chastising -chastity -chat -chateau -chats -chatted -chattel -chattels -chatter -chatterbox -chattered -chatterer -chattering -chatters -chattily -chatting -chatty -chauffeur -chauffeured -chauffeurs -chauvinism -chauvinist -chauvinistic -chauvinists -cheap -cheapen -cheapened -cheapening -cheapens -cheaper -cheapest -cheapish -cheaply -cheapness -cheapskates -cheat -cheated -cheater -cheaters -cheating -cheats -check -checked -checker -checkered -checkering -checkers -checkin -checking -checklist -checklists -checkmate -checkout -checkouts -checkpoint -checkpoints -checks -checkup -checkups -cheddar -cheek -cheekbone -cheekbones -cheeked -cheekier -cheekiest -cheekily -cheeking -cheeks -cheeky -cheep -cheeping -cheer -cheered -cheerful -cheerfully -cheerfulness -cheerier -cheeriest -cheerily -cheering -cheerio -cheerleader -cheerleaders -cheerless -cheerlessness -cheers -cheery -cheese -cheeseboard -cheeseburger -cheeseburgers -cheesecake -cheesecloth -cheesemaking -cheeses -cheesy -cheetah -cheetahs -chef -chefs -chekov -chemic -chemical -chemically -chemicals -chemiluminescence -chemiluminescent -chemise -chemist -chemistry -chemists -chemosynthesis -chemotherapeutic -chemotherapy -cheque -chequebook -chequebooks -chequer -chequerboard -chequered -chequering -chequers -cheques -cherish -cherished -cherishes -cherishing -cheroot -cheroots -cherries -cherry -cherryred -cherub -cherubic -cherubim -cherubs -chess -chessboard -chessboards -chessmen -chest -chested -chester -chesterfield -chestnut -chestnuts -chests -chesty -chevalier -chevron -chevrons -chew -chewable -chewed -chewer -chewier -chewiest -chewing -chews -chewy -chic -chicago -chicane -chicanery -chick -chicken -chickens -chicks -chicory -chide -chided -chides -chiding -chief -chiefly -chiefs -chieftain -chieftains -chiffon -chihuahua -chihuahuas -chilblain -chilblains -child -childbearing -childbirth -childcare -childhood -childhoods -childish -childishly -childishness -childless -childlessness -childlike -childly -childminders -childproof -children -chilean -chili -chill -chilled -chiller -chillers -chilli -chillier -chillies -chilliest -chilliness -chilling -chillingly -chills -chilly -chimaera -chimaerical -chime -chimed -chimera -chimeras -chimerical -chimes -chiming -chimney -chimneys -chimp -chimpanzee -chimpanzees -chimps -chin -china -chinese -chink -chinked -chinking -chinks -chinless -chinoiserie -chins -chintz -chintzy -chip -chipboard -chipmunk -chipped -chipping -chippings -chips -chiral -chiropodist -chiropody -chiropractic -chiropractor -chiropractors -chirp -chirped -chirping -chirps -chirpy -chirruped -chisel -chiseled -chiselled -chiselling -chisels -chit -chits -chivalric -chivalrous -chivalrously -chivalry -chives -chivvied -chivvy -chivvying -chlamydia -chlorate -chloride -chlorinated -chlorination -chlorine -chlorofluorocarbon -chlorofluorocarbons -chloroform -chloroformed -chloroforming -chlorophyll -chloroquine -chock -chockablock -chockfull -chocks -chocolate -chocolates -choice -choices -choicest -choir -choirboy -choirboys -choirmaster -choirs -choke -choked -choker -chokes -choking -cholera -cholesterol -choline -chomp -chomped -chomping -chomps -choose -chooser -choosers -chooses -choosey -choosier -choosing -choosy -chop -chopin -chopped -chopper -choppers -choppier -choppiest -chopping -choppy -chops -chopsticks -choral -chorale -chorales -chorals -chord -chordal -chords -chore -chorea -choreographed -choreographer -choreographers -choreographic -choreographing -choreography -chores -chorister -choristers -chortle -chortled -chortles -chortling -chorus -chorused -choruses -chose -chosen -choughs -chow -christ -christen -christened -christening -christenings -christian -chroma -chromatic -chromaticism -chromatograph -chromatographic -chromatography -chrome -chromed -chromite -chromium -chromosomal -chromosome -chromosomes -chronic -chronically -chronicle -chronicled -chronicler -chroniclers -chronicles -chronicling -chronograph -chronological -chronologically -chronologies -chronology -chronometer -chronometric -chrysalis -chrysanthemum -chrysanthemums -chubbiness -chubby -chuck -chucked -chucking -chuckle -chuckled -chuckles -chuckling -chucks -chuff -chuffed -chug -chugged -chugging -chugs -chum -chump -chums -chunk -chunkier -chunks -chunky -chunnel -chuntering -church -churches -churchgoer -churchgoers -churchman -churchmen -churchwarden -churchwardens -churchyard -churchyards -churlish -churlishly -churlishness -churn -churned -churning -churns -chute -chutes -chutney -chutzpah -cicada -cicadas -cicero -cider -ciders -cigar -cigaret -cigarette -cigarettes -cigars -cilia -cilium -cinch -cinder -cinders -cine -cinema -cinemas -cinematic -cinematographer -cinematography -cinnamon -cipher -ciphered -ciphers -circa -circadian -circle -circled -circles -circlet -circlets -circling -circuit -circuitous -circuitry -circuits -circulant -circular -circularise -circularised -circularity -circularly -circulars -circulate -circulated -circulates -circulating -circulation -circulations -circulatory -circumcise -circumcised -circumcision -circumference -circumferences -circumferential -circumflex -circumflexes -circumlocution -circumlocutions -circumlocutory -circumnavigate -circumnavigated -circumnavigates -circumnavigation -circumnavigational -circumscribe -circumscribed -circumscribing -circumspect -circumspection -circumspectly -circumstance -circumstances -circumstantial -circumstantially -circumvent -circumventable -circumvented -circumventing -circumvention -circumventions -circumvents -circus -circuses -cirrhosis -cirrhotic -cirrus -cist -cistern -cisterns -citadel -citadels -citation -citations -cite -cited -cites -cithers -cities -citing -citizen -citizenry -citizens -citizenship -citrate -citrates -citric -citron -citrons -citrus -citruses -cittern -city -cityscape -civic -civics -civies -civil -civilian -civilians -civilisation -civilisations -civilise -civilised -civilising -civilities -civility -civilly -clacking -clad -cladding -claim -claimable -claimant -claimants -claimed -claiming -claims -clairvoyance -clairvoyant -clairvoyants -clam -clamber -clambered -clambering -clambers -clammed -clamming -clammy -clamorous -clamorously -clamour -clamoured -clamouring -clamours -clamp -clampdown -clamped -clamping -clamps -clams -clan -clandestine -clandestinely -clang -clanged -clangers -clanging -clank -clanked -clanking -clannish -clans -clansmen -clap -clapped -clapper -clappers -clapping -claps -claptrap -claret -clarets -clarification -clarifications -clarified -clarifies -clarify -clarifying -clarinet -clarinets -clarinettist -clarion -clarity -clash -clashed -clashes -clashing -clasp -clasped -clasper -clasping -clasps -class -classed -classes -classic -classical -classically -classicism -classicist -classicists -classics -classier -classiest -classifiable -classification -classifications -classificatory -classified -classifier -classifiers -classifies -classify -classifying -classing -classless -classlessness -classmate -classmates -classroom -classrooms -classy -clatter -clattered -clattering -clatters -clausal -clause -clauses -claustrophobia -claustrophobic -clavichord -clavicle -claw -clawed -clawing -claws -clay -clayey -claymore -claymores -clays -clean -cleancut -cleaned -cleaner -cleaners -cleanest -cleaning -cleanliness -cleanliving -cleanly -cleanness -cleans -cleanse -cleansed -cleanser -cleanses -cleanshaven -cleansing -cleanup -clear -clearance -clearances -clearcut -cleared -clearer -clearest -clearheaded -clearing -clearings -clearly -clearness -clears -clearsighted -clearup -clearups -clearway -cleat -cleavage -cleavages -cleave -cleaved -cleaver -cleavers -cleaves -cleaving -clef -cleft -clefts -cleg -clematis -clemency -clement -clench -clenched -clenches -clenching -clergies -clergy -clergyman -clergymen -cleric -clerical -clerically -clerics -clerk -clerks -clever -cleverer -cleverest -cleverly -cleverness -cliche -cliches -click -clicked -clicking -clicks -client -clientele -clients -cliff -cliffhanger -cliffs -climactic -climate -climates -climatic -climatically -climatological -climatologists -climatology -climax -climaxed -climaxes -climaxing -climb -climbable -climbdown -climbed -climber -climbers -climbing -climbs -climes -clinch -clinched -clinches -clinching -cling -clingers -clinging -clings -clinic -clinical -clinically -clinician -clinicians -clinics -clink -clinked -clinker -clinking -clip -clipboard -clipboards -clipped -clipper -clippers -clipping -clippings -clips -clique -cliques -cliquey -clitoral -clitoris -cloaca -cloak -cloakanddagger -cloaked -cloaking -cloakroom -cloakrooms -cloaks -clobber -clock -clocked -clocking -clockmaker -clocks -clockwise -clockwork -clod -clods -clog -clogged -clogging -clogs -cloister -cloistered -cloisters -clonal -clone -cloned -clones -cloning -closable -close -closed -closedcircuit -closeknit -closely -closeness -closer -closers -closes -closest -closet -closeted -closets -closeup -closeups -closing -closings -closure -closures -clot -cloth -clothe -clothed -clothes -clothespeg -clothespegs -clothier -clothiers -clothing -cloths -clots -clotted -clotting -cloud -cloudburst -cloudbursts -clouded -cloudier -cloudiest -cloudiness -clouding -cloudless -clouds -cloudscape -cloudscapes -cloudy -clout -clouted -clouts -clove -cloven -clover -cloves -clown -clowned -clowning -clownish -clowns -cloying -cloyingly -club -clubbed -clubbing -clubfooted -clubhouse -clubman -clubroom -clubs -cluck -clucked -clucking -clucks -clue -clued -cluedup -clueless -clues -clumber -clump -clumped -clumping -clumps -clumpy -clumsier -clumsiest -clumsily -clumsiness -clumsy -clung -cluster -clustered -clustering -clusters -clutch -clutched -clutches -clutching -clutter -cluttered -cluttering -clutters -coach -coached -coaches -coaching -coachload -coachloads -coachman -coachmen -coachwork -coacted -coaction -coacts -coagulate -coagulated -coagulation -coal -coalblack -coalesce -coalesced -coalescence -coalesces -coalescing -coalface -coalfield -coalfields -coalition -coalitions -coalminers -coals -coapts -coarse -coarsely -coarseness -coarsens -coarser -coarsest -coast -coastal -coasted -coaster -coasters -coastguard -coastguards -coasting -coastlands -coastline -coastlines -coasts -coat -coated -coathanger -coating -coatings -coats -coauthor -coauthored -coauthoring -coauthors -coax -coaxed -coaxes -coaxial -coaxing -coaxingly -cob -cobalt -cobble -cobbled -cobbler -cobblers -cobbles -cobblestones -cobbling -coble -cobra -cobras -cobs -cobweb -cobwebbed -cobwebby -cobwebs -coca -cocain -cocaine -cochlea -cochlear -cock -cockatoo -cockatoos -cockatrice -cockatrices -cockcrow -cocked -cockerel -cockerels -cockeyed -cockier -cockiest -cockiness -cocking -cockle -cockles -cockney -cockneys -cockpit -cockpits -cockroach -cockroaches -cocks -cockshies -cocksure -cocktail -cocktails -cocky -cocoa -coconut -coconuts -cocoon -cocooned -cocoons -cod -coda -coddle -coddling -code -codebreaker -coded -codeine -codename -codenamed -coder -coders -codes -codeword -codewords -codex -codfish -codices -codicil -codicils -codification -codifications -codified -codifies -codify -codifying -coding -codling -codpiece -cods -coefficient -coefficients -coelenterates -coerce -coerced -coercer -coerces -coercible -coercing -coercion -coercions -coercive -coercively -coeval -coexist -coexisted -coexistence -coexistent -coexisting -coexists -coextensive -coffee -coffees -coffer -cofferdam -cofferdams -coffers -coffin -coffins -cog -cogency -cogent -cogently -cogitate -cogitated -cogitating -cogitation -cogitations -cogitative -cognac -cognacs -cognate -cognates -cognisance -cognisant -cognition -cognitive -cognitively -cognizance -cognizant -cognoscenti -cogs -cohabit -cohabitation -cohabitees -cohabiting -cohere -cohered -coherence -coherency -coherent -coherently -coheres -cohesion -cohesive -cohesively -cohesiveness -cohort -cohorts -coiffure -coil -coiled -coiling -coils -coin -coinage -coinages -coincide -coincided -coincidence -coincidences -coincident -coincidental -coincidentally -coincides -coinciding -coined -coiner -coiners -coining -coins -coital -coitus -coke -col -cola -colander -colas -cold -coldblooded -coldbloodedly -colder -coldest -coldhearted -coldish -coldly -coldness -colds -coldwar -cole -coleslaw -colitis -collaborate -collaborated -collaborates -collaborating -collaboration -collaborationist -collaborations -collaborative -collaboratively -collaborator -collaborators -collage -collagen -collages -collapse -collapsed -collapses -collapsible -collapsing -collar -collarbone -collared -collaring -collarless -collars -collate -collated -collateral -collaterally -collates -collating -collation -colleague -colleagues -collect -collectability -collectable -collectables -collected -collecting -collection -collections -collective -collectively -collectives -collectivisation -collectivism -collectivist -collectivity -collector -collectors -collects -college -colleges -collegial -collegiate -collide -collided -collides -colliding -collie -collier -collieries -colliers -colliery -collies -collimation -collimator -collinear -collins -collision -collisional -collisions -collocated -collocation -collocational -collocations -colloid -colloidal -colloids -colloquia -colloquial -colloquialism -colloquialisms -colloquially -colloquium -collude -colluded -colluding -collusion -colobus -cologne -colon -colonel -colonels -colonial -colonialism -colonialist -colonialists -colonials -colonic -colonies -colonisation -colonisations -colonise -colonised -colonisers -colonising -colonist -colonists -colonnade -colonnaded -colonnades -colons -colony -colossal -colossally -colossus -colostomies -colostomy -colour -colourant -colourants -colouration -colourblind -coloure -colourful -colourfully -colouring -colourings -colourisation -colourise -colourised -colourising -colourless -colours -coloury -cols -colt -colts -columbus -column -columnar -columned -columnist -columnists -columns -coma -comas -comatose -comb -combat -combatant -combatants -combated -combating -combative -combativeness -combats -combed -comber -combination -combinations -combinatorial -combine -combined -combines -combing -combining -combs -combusted -combustible -combustibles -combustion -combusts -come -comeback -comedian -comedians -comedies -comedown -comedy -comeliness -comely -comer -comers -comes -comestible -comestibles -comet -cometary -comets -comfort -comfortable -comfortably -comforted -comforter -comforters -comforting -comfortingly -comforts -comfy -comic -comical -comically -comics -coming -comings -comity -comma -command -commandant -commanded -commandeer -commandeered -commandeering -commander -commanders -commanding -commandingly -commandment -commandments -commando -commands -commas -commemorate -commemorated -commemorates -commemorating -commemoration -commemorations -commemorative -commence -commenced -commencement -commences -commencing -commend -commendable -commendably -commendation -commendations -commended -commending -commends -commensurate -commensurately -comment -commentaries -commentary -commentate -commentating -commentator -commentators -commented -commenter -commenting -comments -commerce -commercial -commercialisation -commercialise -commercialised -commercialism -commercially -commercials -commiserate -commiserated -commiserating -commiseration -commiserations -commissar -commissariat -commissars -commission -commissionaire -commissioned -commissioner -commissioners -commissioning -commissions -commit -commitment -commitments -commits -committal -committed -committee -committees -committing -commode -commodes -commodious -commodities -commodity -commodore -commodores -common -commonalities -commonality -commoner -commoners -commonest -commonlaw -commonly -commonness -commonplace -commonplaces -commons -commonsense -commonsensical -commonwealth -commotion -commotions -communal -communality -communally -commune -communed -communes -communicable -communicant -communicants -communicate -communicated -communicates -communicating -communication -communications -communicative -communicativeness -communicator -communicators -communing -communion -communions -communique -communiques -communism -communist -communists -communitarian -communities -community -commutation -commutative -commutativity -commutator -commute -commuted -commuter -commuters -commutes -commuting -compact -compacted -compacting -compaction -compactions -compactly -compactness -compacts -companies -companion -companionable -companionably -companions -companionship -company -comparability -comparable -comparably -comparative -comparatively -comparatives -comparator -comparators -compare -compared -compares -comparing -comparison -comparisons -compartment -compartmentalisation -compartmentalised -compartmentalising -compartments -compass -compassed -compasses -compassion -compassionate -compassionately -compatibilities -compatibility -compatible -compatibles -compatibly -compatriot -compatriots -compel -compelled -compelling -compellingly -compels -compendia -compendium -compendiums -compensate -compensated -compensates -compensating -compensation -compensations -compensator -compensatory -compere -compete -competed -competence -competences -competencies -competency -competent -competently -competes -competing -competition -competitions -competitive -competitively -competitiveness -competitor -competitors -compilable -compilation -compilations -compile -compiled -compiler -compilers -compiles -compiling -complacency -complacent -complacently -complain -complainant -complainants -complained -complainer -complaining -complainingly -complains -complaint -complaints -complaisant -complement -complementarity -complementary -complemented -complementing -complements -completable -complete -completed -completely -completeness -completes -completing -completion -completions -complex -complexes -complexion -complexioned -complexions -complexities -complexity -complexly -compliance -compliant -complicate -complicated -complicates -complicating -complication -complications -complicit -complicity -complied -complies -compliment -complimentary -complimented -complimenting -compliments -complot -comply -complying -component -components -comport -compose -composed -composedly -composer -composers -composes -composing -composite -composites -composition -compositional -compositions -compositor -compositors -compost -composts -composure -compound -compounded -compounding -compounds -comprehend -comprehended -comprehending -comprehends -comprehensibility -comprehensible -comprehensibly -comprehension -comprehensive -comprehensively -comprehensiveness -comprehensives -compress -compressed -compresses -compressibility -compressible -compressing -compression -compressional -compressions -compressive -compressor -compressors -comprise -comprised -comprises -comprising -compromise -compromised -compromises -compromising -comptroller -compulsion -compulsions -compulsive -compulsively -compulsorily -compulsory -compunction -computability -computable -computably -computation -computational -computationally -computations -compute -computed -computer -computerisation -computerise -computerised -computerising -computerliterate -computers -computes -computing -comrade -comradeinarms -comradely -comrades -comradeship -con -conakry -concatenate -concatenated -concatenates -concatenating -concatenation -concatenations -concave -concavity -conceal -concealed -concealing -concealment -conceals -concede -conceded -concedes -conceding -conceit -conceited -conceits -conceivability -conceivable -conceivably -conceive -conceived -conceives -conceiving -concentrate -concentrated -concentrates -concentrating -concentration -concentrations -concentrator -concentrators -concentric -concept -conception -conceptions -concepts -conceptual -conceptualisation -conceptualisations -conceptualise -conceptualised -conceptualising -conceptually -concern -concerned -concernedly -concerning -concerns -concert -concerted -concertgoers -concerti -concertina -concerto -concerts -concession -concessional -concessionary -concessions -concierge -conciliar -conciliate -conciliating -conciliation -conciliator -conciliatory -concise -concisely -conciseness -conclave -conclaves -conclude -concluded -concludes -concluding -conclusion -conclusions -conclusive -conclusively -concoct -concocted -concocting -concoction -concoctions -concocts -concomitant -concomitantly -concord -concordance -concordances -concordant -concordat -concords -concourse -concourses -concrete -concreted -concretely -concreteness -concretes -concreting -concretions -concubine -concubines -concur -concurred -concurrence -concurrency -concurrent -concurrently -concurring -concurs -concuss -concussed -concussion -condemn -condemnable -condemnation -condemnations -condemnatory -condemned -condemning -condemns -condensate -condensation -condensations -condense -condensed -condenser -condensers -condenses -condensing -condescend -condescended -condescending -condescendingly -condescends -condescension -condiment -condiments -condition -conditional -conditionality -conditionally -conditionals -conditioned -conditioner -conditioners -conditioning -conditions -condole -condoled -condolence -condolences -condoles -condonable -condone -condoned -condones -condoning -condor -condors -conducive -conduct -conductance -conducted -conducting -conduction -conductive -conductivities -conductivity -conductor -conductors -conductress -conducts -conduit -conduits -cone -coned -cones -confabulate -confection -confectioner -confectioners -confectionery -confectionist -confections -confederacy -confederate -confederates -confederation -confederations -confer -conference -conferences -conferencing -conferment -conferred -conferring -confers -confess -confessed -confesses -confessing -confession -confessional -confessionals -confessions -confessor -confessors -confetti -confidant -confidante -confidantes -confidants -confide -confided -confidence -confidences -confident -confidential -confidentiality -confidentially -confidently -confides -confiding -confidingly -configurable -configuration -configurations -configure -configured -configures -configuring -confine -confined -confinement -confinements -confines -confining -confirm -confirmation -confirmations -confirmatory -confirmed -confirming -confirms -confiscate -confiscated -confiscates -confiscating -confiscation -confiscations -confiscatory -conflagration -conflagrations -conflated -conflates -conflating -conflation -conflict -conflicted -conflicting -conflictingly -conflicts -conflictual -confluence -confluent -confocal -conform -conformable -conformal -conformance -conformation -conformational -conformed -conforming -conformism -conformist -conformists -conformity -conforms -confound -confounded -confoundedly -confounding -confounds -confront -confrontation -confrontational -confrontations -confronted -confronting -confronts -confusable -confuse -confused -confusedly -confuser -confuses -confusing -confusingly -confusion -confusions -conga -congeal -congealed -congealing -congeals -congenial -congeniality -congenital -congenitally -conger -congest -congested -congesting -congestion -congestive -conglomerate -conglomerated -conglomerates -conglomeration -congo -congratulate -congratulated -congratulates -congratulating -congratulation -congratulations -congratulatory -congregate -congregated -congregating -congregation -congregational -congregations -congress -congresses -congressional -congressman -congressmen -congruence -congruences -congruency -congruent -congruential -congruity -conic -conical -conics -conifer -coniferous -conifers -conjectural -conjecture -conjectured -conjectures -conjecturing -conjoin -conjoined -conjoining -conjoint -conjugacy -conjugal -conjugate -conjugated -conjugates -conjugating -conjugation -conjugations -conjunct -conjunction -conjunctions -conjunctive -conjunctivitis -conjunctures -conjure -conjured -conjurer -conjurers -conjures -conjuring -conjuror -conjurors -conjury -conk -conker -conkers -conman -conmen -connect -connected -connectedness -connecting -connection -connectionless -connections -connective -connectives -connectivity -connector -connectors -connects -conned -connexion -connexions -connivance -connive -connived -conniving -connoisseur -connoisseurs -connoisseurship -connotation -connotations -connote -connoted -connotes -connoting -conquer -conquerable -conquered -conquering -conqueror -conquerors -conquers -conquest -conquests -conquistador -conquistadores -cons -consanguineous -consanguinity -conscience -consciences -consciencestricken -conscientious -conscientiously -conscientiousness -conscionable -conscious -consciously -consciousness -consciousnesses -conscript -conscripted -conscripting -conscription -conscripts -consecrate -consecrated -consecrating -consecration -consecutive -consecutively -consensual -consensually -consensus -consent -consented -consenting -consents -consequence -consequences -consequent -consequential -consequentially -consequently -conservation -conservationist -conservationists -conservations -conservatism -conservative -conservatively -conservativeness -conservatives -conservatoire -conservator -conservatories -conservators -conservatory -conserve -conserved -conserves -conserving -consider -considerable -considerably -considerate -considerately -consideration -considerations -considered -considering -considers -consign -consigned -consignee -consigning -consignment -consignments -consigns -consist -consisted -consistencies -consistency -consistent -consistently -consisting -consists -consolation -consolations -console -consoled -consoles -consolidate -consolidated -consolidates -consolidating -consolidation -consolidations -consoling -consolingly -consonance -consonant -consonantal -consonants -consort -consorted -consortia -consorting -consortium -consorts -conspecific -conspicuous -conspicuously -conspicuousness -conspiracies -conspiracy -conspirator -conspiratorial -conspiratorially -conspirators -conspire -conspired -conspires -conspiring -constable -constables -constabularies -constabulary -constancy -constant -constantly -constants -constellation -constellations -consternating -consternation -constipated -constipation -constituencies -constituency -constituent -constituents -constitute -constituted -constitutes -constituting -constitution -constitutional -constitutionalism -constitutionalists -constitutionality -constitutionally -constitutions -constitutive -constitutively -constrain -constrained -constraining -constrains -constraint -constraints -constrict -constricted -constricting -constriction -constrictions -constrictive -constrictor -constrictors -constricts -construct -constructable -constructed -constructing -construction -constructional -constructions -constructive -constructively -constructivism -constructivist -constructor -constructors -constructs -construe -construed -construes -construing -consul -consular -consulate -consulates -consuls -consult -consultancies -consultancy -consultant -consultants -consultation -consultations -consultative -consulted -consulting -consults -consumable -consumables -consume -consumed -consumer -consumerism -consumerist -consumers -consumes -consuming -consummate -consummated -consummately -consummation -consumption -consumptions -consumptive -contact -contactable -contacted -contacting -contacts -contagion -contagious -contain -containable -contained -container -containers -containing -containment -contains -contaminant -contaminants -contaminate -contaminated -contaminates -contaminating -contamination -contemplate -contemplated -contemplates -contemplating -contemplation -contemplations -contemplative -contemporaneity -contemporaneous -contemporaneously -contemporaries -contemporary -contempt -contemptible -contemptibly -contemptuous -contemptuously -contend -contended -contender -contenders -contending -contends -content -contented -contentedly -contenting -contention -contentions -contentious -contentiously -contentment -contents -contest -contestable -contestant -contestants -contested -contesting -contests -context -contexts -contextual -contextualisation -contextually -contiguity -contiguous -contiguously -continence -continent -continental -continentals -continents -contingencies -contingency -contingent -contingently -contingents -continua -continuable -continual -continually -continuance -continuation -continuations -continue -continued -continues -continuing -continuities -continuity -continuous -continuously -continuum -contort -contorted -contorting -contortion -contortionist -contortions -contorts -contour -contoured -contouring -contours -contra -contraband -contraception -contraceptive -contraceptives -contract -contracted -contractible -contractile -contracting -contraction -contractions -contractor -contractors -contracts -contractual -contractually -contradict -contradicted -contradicting -contradiction -contradictions -contradictorily -contradictory -contradicts -contradistinction -contraflow -contraflows -contraindication -contraindications -contralto -contraption -contraptions -contrapuntal -contrarily -contrariness -contrariwise -contrary -contras -contrast -contrasted -contrasting -contrastingly -contrastive -contrasts -contrasty -contravene -contravened -contravenes -contravening -contravention -contraventions -contretemps -contribute -contributed -contributes -contributing -contribution -contributions -contributor -contributors -contributory -contrite -contritely -contrition -contrivance -contrivances -contrive -contrived -contrives -contriving -control -controllable -controlled -controller -controllers -controlling -controls -controversial -controversially -controversies -controversy -controvert -controverted -contumely -contuse -contusion -contusions -conundrum -conundrums -conurbation -conurbations -convalesce -convalescence -convalescent -convalescing -convect -convected -convecting -convection -convectional -convective -convector -convects -convene -convened -convener -convenes -convenience -conveniences -convenient -conveniently -convening -convenor -convenors -convent -conventicle -convention -conventional -conventionalism -conventionalist -conventionality -conventionally -conventions -convents -converge -converged -convergence -convergences -convergent -converges -converging -conversant -conversation -conversational -conversationalist -conversationalists -conversationally -conversations -conversazione -converse -conversed -conversely -converses -conversing -conversion -conversions -convert -converted -converter -converters -convertibility -convertible -convertibles -converting -convertor -convertors -converts -convex -convexity -convey -conveyance -conveyancing -conveyed -conveying -conveyor -conveyors -conveys -convict -convicted -convicting -conviction -convictions -convicts -convince -convinced -convinces -convincing -convincingly -convivial -conviviality -convocation -convocations -convoluted -convolution -convolutions -convolve -convolved -convoy -convoys -convulse -convulsed -convulses -convulsing -convulsion -convulsions -convulsive -convulsively -cony -coo -cooed -cooing -cook -cookbook -cookbooks -cooked -cooker -cookers -cookery -cookies -cooking -cooks -cookware -cool -coolant -coolants -cooled -cooler -coolers -coolest -cooling -coolness -cools -coon -coons -coop -cooped -cooper -cooperate -cooperated -cooperates -cooperating -cooperation -cooperative -cooperatively -cooperatives -coopers -coops -coordinate -coordinated -coordinates -coordinating -coordination -coordinator -coordinators -coos -cop -cope -coped -copes -copied -copier -copiers -copies -copilot -coping -copious -copiously -coplanar -copout -copouts -copper -copperplate -coppers -coppery -coppice -coppiced -coppices -coppicing -copra -coprocessor -coprocessors -coproduced -coprolite -coprophagous -cops -copse -copses -copulate -copulating -copulation -copulations -copulatory -copy -copyable -copycat -copycats -copying -copyist -copyists -copyright -copyrightable -copyrighted -copyrighting -copyrights -copywriter -coquette -coquettes -coquettish -coquettishly -cor -coracle -coral -coralline -corals -cord -cordage -cordate -corded -cordial -cordiality -cordially -cordials -cordillera -cordite -cordless -cordon -cordoned -cordons -cords -corduroy -corduroys -core -cores -corespondent -corgi -corgis -coriander -corinth -cork -corkage -corked -corks -corkscrew -corkscrews -corky -cormorant -cormorants -corn -corncrake -cornea -corneal -corneas -corned -corner -cornered -cornering -corners -cornerstone -cornerstones -cornet -cornets -cornfield -cornfields -cornflake -cornflakes -cornflour -cornflower -cornflowers -cornice -cornices -cornish -cornmeal -corns -cornucopia -corny -corollaries -corollary -corona -coronal -coronaries -coronary -coronas -coronation -coronations -coroner -coroners -coronet -coronets -corpora -corporal -corporals -corporate -corporately -corporates -corporation -corporations -corporatism -corporatist -corporeal -corporeally -corps -corpse -corpses -corpulent -corpus -corpuscle -corpuscles -corpuscular -corral -corralled -corrals -correct -correctable -corrected -correcting -correction -correctional -corrections -corrective -correctly -correctness -corrector -correctors -corrects -correlate -correlated -correlates -correlating -correlation -correlations -correlative -correspond -corresponded -correspondence -correspondences -correspondent -correspondents -corresponding -correspondingly -corresponds -corridor -corridors -corrigenda -corroborate -corroborated -corroborates -corroborating -corroboration -corroborative -corroboratory -corrode -corroded -corrodes -corroding -corrosion -corrosive -corrugated -corrugations -corrupt -corrupted -corruptible -corrupting -corruption -corruptions -corruptly -corrupts -corsage -corse -corset -corsets -corsica -corslet -cortege -cortex -cortical -corticosteroid -corticosteroids -cortisol -cortisone -coruscates -corvette -corvettes -cosier -cosiest -cosily -cosine -cosines -cosiness -cosmetic -cosmetically -cosmetics -cosmic -cosmical -cosmically -cosmological -cosmologically -cosmologies -cosmologist -cosmologists -cosmology -cosmonaut -cosmonauts -cosmopolitan -cosmopolitans -cosmos -cossacks -cosset -cosseted -cossets -cost -costar -costarred -costarring -costars -costcutting -costed -costeffective -costeffectiveness -costefficient -costing -costings -costive -costless -costlier -costliest -costliness -costly -costs -costume -costumed -costumes -cosy -cot -coterie -coterminous -cots -cottage -cottages -cotton -cottoned -cottons -couch -couched -couches -couching -cougar -cougars -cough -coughed -coughing -coughs -could -couloir -coulomb -coulombs -council -councillor -councillors -councils -counsel -counselled -counselling -counsellor -counsellors -counsels -count -countability -countable -countably -countdown -counted -countenance -countenanced -countenances -countenancing -counter -counteract -counteracted -counteracting -counteracts -counterattack -counterattacked -counterattacks -counterbalance -counterbalanced -counterbalancing -countered -counterfeit -counterfeited -counterfeiters -counterfeiting -counterfeits -counterfoil -counterfoils -countering -counterintelligence -counterintuitive -countermanded -countermeasures -counteroffensive -counterpane -counterpart -counterparts -counterpoint -counterpointed -counterpoints -counterpoise -counterproductive -counterrevolution -counterrevolutionaries -counterrevolutionary -counters -countersign -countersigned -countersigns -countess -countesses -counties -counting -countless -countries -country -countryman -countrymen -countryside -countrywide -counts -county -coup -coupe -coupes -couple -coupled -coupler -couplers -couples -couplet -couplets -coupling -couplings -coupon -coupons -coups -courage -courageous -courageously -courgette -courgettes -courier -couriers -course -coursebook -coursed -courses -coursework -coursing -court -courted -courteous -courteously -courtesan -courtesans -courtesies -courtesy -courthouse -courtier -courtiers -courting -courtly -courtmartial -courtroom -courtrooms -courts -courtship -courtships -courtyard -courtyards -couscous -cousin -cousinly -cousins -couther -couture -couturier -couturiers -covalent -covalently -covariance -covariances -cove -coven -covenant -covenanted -covenanters -covenants -covens -cover -coverage -coverages -coveralls -covered -covering -coverings -coverlet -coverlets -covers -coversheet -covert -covertly -coverts -coverup -coverups -coves -covet -coveted -coveting -covetous -covetousness -covets -cow -coward -cowardice -cowardly -cowards -cowboy -cowboys -cowed -cower -cowered -cowering -cowers -cowgirl -cowgirls -cowhand -cowherd -cowing -cowl -cowled -cowling -coworker -coworkers -cowriter -cowritten -cows -cowshed -cowsheds -cowslip -cowslips -cox -coxcomb -coxcombs -coxed -coxes -coxing -coxswain -coy -coyly -coyness -coyote -coyotes -cozier -crab -crabby -crabs -crack -crackable -crackdown -crackdowns -cracked -cracker -crackers -cracking -crackle -crackled -crackles -crackling -crackly -crackpot -crackpots -cracks -cradle -cradled -cradles -cradling -craft -crafted -crafter -craftier -craftiest -craftily -crafting -crafts -craftsman -craftsmanship -craftsmen -craftspeople -crafty -crag -craggy -crags -cram -crammed -crammer -cramming -cramp -cramped -cramping -crampon -crampons -cramps -crams -cran -cranberries -cranberry -crane -craned -cranes -cranial -craning -cranium -crank -cranked -cranking -cranks -crankshaft -cranky -crannies -cranny -crap -crash -crashed -crasher -crashers -crashes -crashing -crashingly -crashland -crashlanded -crashlanding -crass -crasser -crassly -crassness -crate -crateful -crater -cratered -craters -crates -cravat -cravats -crave -craved -craven -cravenly -craves -craving -cravings -crawl -crawled -crawler -crawlers -crawling -crawls -craws -crayfish -crayon -crayoned -crayons -craze -crazed -crazes -crazier -craziest -crazily -craziness -crazy -creak -creaked -creakier -creakiest -creaking -creaks -creaky -cream -creamed -creamer -creamery -creamier -creamiest -creaming -creams -creamy -crease -creased -creases -creasing -creatable -create -created -creates -creating -creation -creationism -creationist -creationists -creations -creative -creatively -creativeness -creativity -creator -creators -creature -creatures -creche -creches -credence -credentials -credibility -credible -credibly -credit -creditability -creditable -creditably -credited -crediting -creditor -creditors -credits -creditworthiness -creditworthy -credo -credulity -credulous -creed -creeds -creek -creeks -creel -creep -creeper -creepers -creeping -creeps -creepy -cremate -cremated -cremates -cremation -cremations -crematoria -crematorium -creme -crenellated -crenellation -crenellations -creole -creoles -creosote -crepe -crept -crepuscular -crescendo -crescent -crescents -cress -crest -crested -crestfallen -cresting -crests -cretaceous -cretan -cretans -crete -cretin -cretinous -cretins -crevasse -crevasses -crevice -crevices -crew -crewed -crewing -crewman -crewmen -crews -crib -cribbage -cribbed -cribbing -cribs -crick -cricket -cricketer -cricketers -cricketing -crickets -cried -crier -cries -crim -crime -crimea -crimes -criminal -criminalisation -criminalise -criminalised -criminalising -criminality -criminally -criminals -criminological -criminologist -criminologists -criminology -crimp -crimped -crimping -crimson -cringe -cringed -cringes -cringing -crinkle -crinkled -crinkling -crinkly -crinoline -cripple -crippled -cripples -crippling -cripplingly -crises -crisis -crisp -crisped -crisper -crispier -crispiest -crisply -crispness -crisps -crispy -crisscrossed -crisscrosses -criteria -criterion -critic -critical -critically -criticise -criticised -criticises -criticising -criticism -criticisms -critics -critique -critiques -critter -croak -croaked -croakier -croakiest -croaking -croaks -croatia -croatian -crochet -crocheted -crochets -crock -crockery -crocks -crocodile -crocodiles -crocus -crocuses -croft -crofter -crofters -crofting -crofts -croissant -croissants -crone -crones -cronies -crony -crook -crooked -crookedly -crookedness -crooking -crooks -croon -crooned -crooner -crooners -crooning -croons -crop -cropped -cropper -croppers -cropping -crops -croquet -croqueted -croqueting -croquette -crores -crosier -crosiers -cross -crossbar -crossbars -crossbones -crossbow -crossbows -crossbred -crosscheck -crosschecked -crosschecking -crosschecks -crosscountry -crossed -crosser -crosses -crossexamination -crossexamine -crossexamined -crossexamines -crossexamining -crossfertilisation -crossfire -crossing -crossings -crossly -crossness -crossover -crossovers -crossreference -crossreferenced -crossreferences -crossreferencing -crossroads -crosssection -crosssectional -crosssections -crosstalk -crossways -crosswind -crosswinds -crossword -crosswords -crotch -crotchet -crotchetiness -crotchety -crotchless -crouch -crouched -crouches -crouching -croup -croupier -croutons -crow -crowbar -crowbars -crowd -crowded -crowding -crowds -crowed -crowing -crown -crowned -crowning -crowns -crows -crozier -croziers -crucial -crucially -cruciate -crucible -crucibles -crucifiable -crucified -crucifix -crucifixes -crucifixion -crucifixions -cruciform -crucify -crucifying -crude -crudely -crudeness -cruder -crudest -crudities -crudity -cruel -crueler -cruelest -crueller -cruellest -cruelly -cruelness -cruelties -cruelty -cruise -cruised -cruiser -cruisers -cruises -cruising -cruller -crumb -crumbing -crumble -crumbled -crumbles -crumblier -crumbliest -crumbling -crumbly -crumbs -crumby -crummy -crumpet -crumpets -crumple -crumpled -crumples -crumpling -crunch -crunched -cruncher -crunchers -crunches -crunchier -crunchiest -crunching -crunchy -crusade -crusaded -crusader -crusaders -crusades -crusading -crush -crushed -crusher -crushers -crushes -crushing -crushingly -crust -crustacean -crustaceans -crustal -crusted -crustier -crustiest -crusts -crusty -crutch -crutches -crux -cruxes -cry -crying -cryings -cryogenic -cryogenics -cryostat -crypt -cryptanalysis -cryptanalyst -cryptanalytic -cryptic -cryptically -cryptogram -cryptographer -cryptographers -cryptographic -cryptographically -cryptography -cryptology -crypts -crystal -crystalclear -crystalline -crystallisation -crystallise -crystallised -crystallises -crystallising -crystallographer -crystallographers -crystallographic -crystallography -crystals -cub -cuba -cuban -cubans -cube -cubed -cubes -cubic -cubical -cubically -cubicle -cubicles -cubing -cubism -cubist -cubistic -cubists -cubit -cubits -cuboid -cubs -cuckold -cuckolded -cuckoo -cuckoos -cucumber -cucumbers -cud -cuddle -cuddled -cuddles -cuddlier -cuddliest -cuddliness -cuddling -cuddly -cudgel -cudgels -cuds -cue -cued -cueing -cues -cuff -cuffed -cuffing -cuffs -cuing -cuirass -cuisine -culdesac -culinary -cull -culled -culling -culls -culminate -culminated -culminates -culminating -culmination -culpability -culpable -culpably -culprit -culprits -cult -cultivable -cultivar -cultivate -cultivated -cultivates -cultivating -cultivation -cultivations -cultivator -cultivators -cults -cultural -culturally -culture -cultured -cultures -culturing -cultus -culvert -cumbersome -cumbersomely -cumlaude -cummerbund -cumulative -cumulatively -cumulus -cuneiform -cunnilingus -cunning -cunningly -cup -cupboard -cupboards -cupful -cupid -cupidinously -cupidity -cupola -cupolas -cupped -cupping -cuprous -cups -cur -curable -curare -curate -curated -curates -curative -curator -curatorial -curators -curatorships -curb -curbed -curbing -curbs -curd -curdle -curdled -curdles -curdling -curds -cure -cured -curer -cures -curfew -curfews -curia -curial -curie -curies -curing -curio -curiosities -curiosity -curious -curiously -curl -curled -curlers -curlew -curlews -curlicues -curlier -curliest -curliness -curling -curls -curly -curmudgeons -currant -currants -currencies -currency -current -currently -currents -curricle -curricula -curricular -curriculum -curried -curries -curry -currying -curs -curse -cursed -curses -cursing -cursive -cursor -cursorily -cursors -cursory -curt -curtail -curtailed -curtailing -curtailment -curtailments -curtails -curtain -curtained -curtaining -curtains -curtilage -curtly -curtness -curtsey -curtseyed -curtseying -curtseys -curtsied -curtsies -curtsy -curtsying -curvaceous -curvature -curvatures -curve -curved -curves -curvilinear -curving -curvy -cushion -cushioned -cushioning -cushions -cusp -cusps -cuss -cussedness -custard -custards -custodial -custodian -custodians -custodianship -custody -custom -customarily -customary -customer -customers -customisable -customisation -customisations -customise -customised -customising -customs -cut -cutback -cutbacks -cute -cutely -cuteness -cutest -cuticle -cuticles -cutlass -cutlasses -cutler -cutlery -cutlet -cutlets -cutout -cutouts -cutprice -cutrate -cuts -cutter -cutters -cutthroat -cutting -cuttingly -cuttings -cuttle -cuttlefish -cyan -cyanide -cyanogen -cybernetic -cybernetics -cyberpunk -cyberspace -cyborg -cycad -cycads -cycle -cycled -cycles -cycleway -cycleways -cyclic -cyclical -cyclically -cycling -cyclist -cyclists -cycloid -cyclone -cyclones -cyclops -cyclotron -cyclotrons -cygnet -cygnets -cylinder -cylinders -cylindrical -cylindrically -cymbal -cymbals -cynic -cynical -cynically -cynicism -cynics -cypher -cyphers -cypress -cypresses -cyprian -cyprians -cypriot -cypriots -cyprus -cyst -cysteine -cystic -cystine -cystitis -cysts -cytochrome -cytogenetic -cytological -cytology -cytoplasm -cytoplasmic -cytosine -cytotoxic -czar -czars -czech -czechs -dab -dabbed -dabbing -dabble -dabbled -dabbler -dabbles -dabbling -dabs -dace -dacha -dachau -dachshund -dactyl -dactylic -dactyls -dad -daddies -daddy -daddylonglegs -dado -dads -daemon -daemonic -daemons -daffodil -daffodils -daffy -daft -dafter -daftest -daftness -dagama -dagga -dagger -daggers -dahlia -dahlias -dahomey -dailies -daily -daintier -daintiest -daintily -daintiness -dainty -dairies -dairy -dairying -dairyman -dairymen -dais -daisies -daisy -dakar -dakoits -dale -dales -dallas -dalliance -dallied -dally -dallying -dam -damage -damaged -damages -damaging -damagingly -damascus -damask -dame -dames -dammed -damming -damn -damnable -damnably -damnation -damned -damnify -damning -damningly -damns -damp -damped -dampen -dampened -dampening -dampens -damper -dampers -dampest -damping -dampish -damply -dampness -damps -dams -damsel -damsels -damson -damsons -dan -dance -danceable -danced -dancer -dancers -dances -dancing -dandelion -dandelions -dandies -dandruff -dandy -dane -danes -danger -dangerous -dangerously -dangerousness -dangers -dangle -dangled -dangles -dangling -daniel -danish -dank -dankest -dante -danube -danzig -dapper -dapple -dappled -dapples -dare -dared -daredevil -dares -daring -daringly -dark -darken -darkened -darkening -darkens -darker -darkest -darkish -darkly -darkness -darkroom -darkrooms -darling -darlings -darn -darned -darning -darns -dart -dartboard -dartboards -darted -darter -darters -darting -darts -darwin -dash -dashboard -dashed -dashes -dashing -dassie -dassies -dastardly -data -database -databases -datable -date -dated -dateline -dates -dating -dative -datum -daub -daubed -dauber -daubing -daughter -daughterinlaw -daughters -daughtersinlaw -daunt -daunted -daunting -dauntingly -dauntless -daunts -dauphin -dauphins -david -davinci -dawdle -dawdled -dawdling -dawn -dawned -dawning -dawns -day -daybreak -daycare -daydream -daydreaming -daydreams -daylight -daylights -daylong -dayold -days -daytime -daze -dazed -dazedly -dazing -dazzle -dazzled -dazzler -dazzles -dazzling -dazzlingly -dday -deacon -deaconess -deaconesses -deacons -deactivate -deactivated -deactivates -deactivating -deactivation -dead -deadbeat -deaden -deadend -deadened -deadening -deadens -deader -deadlier -deadliest -deadline -deadlines -deadlock -deadlocked -deadlocking -deadlocks -deadly -deadness -deadon -deadpan -deadsea -deaf -deafanddumb -deafen -deafened -deafening -deafeningly -deafens -deafer -deafest -deafness -deal -dealer -dealers -dealership -dealerships -dealing -dealings -deals -dealt -dean -deanery -deans -dear -dearer -dearest -dearie -dearies -dearly -dearness -dears -dearth -deary -death -deathbed -deathless -deathly -deaths -deb -debacle -debacles -debar -debark -debarred -debars -debase -debased -debasement -debaser -debasing -debatable -debate -debated -debater -debaters -debates -debating -debauch -debauched -debauchery -debenture -debentures -debilitate -debilitated -debilitating -debility -debit -debited -debiting -debits -debonair -debone -deboned -debones -debrief -debriefed -debriefing -debris -debt -debtor -debtors -debts -debug -debugged -debugger -debuggers -debugging -debugs -debunk -debunks -debut -debutant -debutante -debutantes -debutants -debuts -decade -decadence -decadent -decades -decaf -decaffeinate -decaffeinated -decagon -decagons -decamp -decamped -decant -decanted -decanter -decanters -decanting -decants -decapitate -decapitated -decapitates -decapitating -decapitation -decapitations -decapod -decathlon -decay -decayed -decaying -decays -decease -deceased -deceases -deceit -deceitful -deceitfulness -deceits -deceive -deceived -deceiver -deceives -deceiving -decelerate -decelerated -decelerates -decelerating -deceleration -decelerations -december -decency -decent -decently -decentralisation -decentralise -decentralised -decentralising -deception -deceptions -deceptive -deceptively -decibel -decibels -decidability -decidable -decide -decided -decidedly -decider -decides -deciding -deciduous -decile -deciles -decilitre -decimal -decimalisation -decimalise -decimals -decimate -decimated -decimating -decimation -decimetres -decipher -decipherable -deciphered -deciphering -decipherment -decipherments -decision -decisions -decisive -decisively -decisiveness -deck -deckchair -deckchairs -decked -decker -decking -decks -declaim -declaimed -declaiming -declaims -declamation -declamatory -declaration -declarations -declarative -declaratory -declare -declared -declarer -declarers -declares -declaring -declassification -declassified -declension -declensions -declination -declinations -decline -declined -declines -declining -declivity -deco -decode -decoded -decoder -decoders -decodes -decoding -decoke -decolonisation -decommission -decommissioned -decommissioning -decomposable -decompose -decomposed -decomposes -decomposing -decomposition -decompositions -decompress -decompressed -decompressing -decompression -decongestants -deconstruct -deconstructed -deconstructing -deconstruction -deconstructionist -deconstructive -decontaminated -decontaminating -decontamination -deconvolution -deconvolve -decor -decorate -decorated -decorates -decorating -decoration -decorations -decorative -decoratively -decorator -decorators -decorous -decorously -decors -decorum -decouple -decoupled -decoupling -decoy -decoyed -decoying -decoys -decrease -decreased -decreases -decreasing -decreasingly -decree -decreed -decreeing -decrees -decrement -decremental -decremented -decrementing -decrements -decrepit -decrepitude -decried -decries -decriminalisation -decriminalise -decriminalised -decriminalising -decry -decrying -decrypt -decrypted -decrypting -decryption -decrypts -decustomised -dedicate -dedicated -dedicates -dedicating -dedication -dedications -deduce -deduced -deduces -deducible -deducing -deduct -deducted -deductible -deducting -deduction -deductions -deductive -deductively -deducts -dee -deed -deeds -deejay -deem -deemed -deeming -deems -deep -deepen -deepened -deepening -deepens -deeper -deepest -deepfreeze -deepfreezing -deepfried -deepfrozen -deepish -deeply -deepness -deeprooted -deeps -deepsea -deepseated -deer -deerstalker -deerstalkers -deerstalking -deface -defaced -defaces -defacing -defacto -defamation -defamatory -defame -defamed -defamer -defames -defaming -default -defaulted -defaulter -defaulters -defaulting -defaults -defeat -defeated -defeater -defeating -defeatism -defeatist -defeats -defecate -defecating -defect -defected -defecting -defection -defections -defective -defectiveness -defectives -defector -defectors -defects -defence -defenceless -defencelessness -defences -defend -defendant -defendants -defended -defender -defenders -defending -defends -defenestrate -defenestrated -defenestration -defenses -defensibility -defensible -defensive -defensively -defensiveness -defer -deference -deferential -deferentially -deferment -deferral -deferred -deferring -defers -defiance -defiant -defiantly -defibrillator -defibrillators -deficiencies -deficiency -deficient -deficit -deficits -defied -defier -defies -defile -defiled -defilement -defiles -defiling -definable -definably -define -defined -definer -defines -defining -definite -definitely -definiteness -definition -definitional -definitions -definitive -definitively -definitiveness -deflatable -deflate -deflated -deflates -deflating -deflation -deflationary -deflect -deflected -deflecting -deflection -deflections -deflector -deflectors -deflects -deflower -deflowering -defoliants -defoliation -deforestation -deforested -deform -deformable -deformation -deformations -deformed -deforming -deformities -deformity -deforms -defragmentation -defraud -defrauded -defrauding -defrauds -defray -defrayed -defrost -defrosted -defrosting -defrosts -deft -defter -deftly -deftness -defunct -defuse -defused -defuses -defusing -defy -defying -degas -degauss -degaussed -degaussing -degeneracies -degeneracy -degenerate -degenerated -degenerates -degenerating -degeneration -degenerative -degradable -degradation -degradations -degrade -degraded -degrades -degrading -degrease -degree -degrees -dehorn -dehumanised -dehumanises -dehumanising -dehumidifier -dehydrate -dehydrated -dehydrating -dehydration -deification -deified -deifies -deify -deifying -deism -deist -deists -deities -deity -deject -dejected -dejectedly -dejection -dejects -deklerk -delate -delay -delayed -delaying -delays -delectable -delectation -delegate -delegated -delegates -delegating -delegation -delegations -deletable -delete -deleted -deleter -deleterious -deleteriously -deletes -deleting -deletion -deletions -delhi -deli -deliberate -deliberated -deliberately -deliberating -deliberation -deliberations -deliberative -delible -delicacies -delicacy -delicate -delicately -delicatessen -delicatessens -delicious -deliciously -delict -delight -delighted -delightedly -delightful -delightfully -delighting -delights -delilah -delimit -delimited -delimiter -delimiters -delimiting -delimits -delineate -delineated -delineates -delineating -delineation -delinquency -delinquent -delinquents -deliquesced -deliquescent -delirious -deliriously -delirium -deliver -deliverable -deliverance -delivered -deliverer -deliverers -deliveries -delivering -delivers -delivery -dell -dells -delphi -delphiniums -delta -deltas -deltoid -deltoids -delude -deluded -deludes -deluding -deluge -deluged -deluges -deluging -delusion -delusional -delusions -delusive -deluxe -delve -delved -delves -delving -demagnetisation -demagnetise -demagog -demagogic -demagogue -demagoguery -demagogues -demagogy -demand -demanded -demander -demanding -demands -demarcate -demarcated -demarcating -demarcation -demarcations -dematerialise -dematerialised -dematerialises -demean -demeaned -demeaning -demeanour -demeans -dement -demented -dementedly -dementia -demerge -demerit -demigod -demigods -demijohns -demilitarisation -demilitarised -demise -demised -demises -demist -demists -demo -demobilisation -demobilised -demobs -democracies -democracy -democrat -democratic -democratically -democratisation -democratising -democrats -demodulator -demographer -demographers -demographic -demographically -demographics -demography -demolish -demolished -demolisher -demolishes -demolishing -demolition -demolitions -demon -demonic -demonise -demonology -demons -demonstrable -demonstrably -demonstrate -demonstrated -demonstrates -demonstrating -demonstration -demonstrations -demonstrative -demonstratively -demonstratives -demonstrator -demonstrators -demoralisation -demoralise -demoralised -demoralising -demote -demoted -demotes -demotic -demotion -demount -demountable -demounted -demounting -demur -demure -demurely -demurred -demurring -demurs -demystification -demystify -demystifying -den -denationalisation -denatured -denaturing -dendrites -dendritic -dendrochronological -dendrochronology -deniable -denial -denials -denied -denier -deniers -denies -denigrate -denigrated -denigrates -denigrating -denigration -denigrations -denim -denims -denizen -denizens -denmark -denominated -denomination -denominational -denominations -denominator -denominators -denotation -denotational -denotations -denote -denoted -denotes -denoting -denouement -denounce -denounced -denouncements -denounces -denouncing -dens -dense -densely -denseness -denser -densest -densities -densitometry -density -dent -dental -dented -dentin -dentine -denting -dentist -dentistry -dentists -dentition -dents -denture -dentures -denudation -denude -denuded -denudes -denunciation -denunciations -denver -deny -denying -deodorant -deodorants -deodorised -depart -departed -departer -departing -department -departmental -departmentally -departments -departs -departure -departures -depend -dependability -dependable -dependant -dependants -depended -dependence -dependencies -dependency -dependent -depending -depends -depersonalisation -depersonalising -depict -depicted -depicting -depiction -depictions -depicts -deplete -depleted -depleting -depletion -deplorable -deplorably -deplore -deplored -deplores -deploring -deploy -deployed -deploying -deployment -deployments -deploys -depolarisation -depolarisations -depoliticisation -deponent -depopulated -depopulation -deport -deportation -deportations -deported -deportee -deportees -deporting -deportment -deports -depose -deposed -deposing -deposit -depositary -deposited -depositing -deposition -depositional -depositions -depositories -depositors -depository -deposits -depot -depots -deprave -depraved -depraves -depraving -depravity -deprecate -deprecated -deprecates -deprecating -deprecatingly -deprecation -deprecations -deprecatory -depreciate -depreciated -depreciating -depreciation -depredation -depredations -depress -depressant -depressants -depressed -depresses -depressing -depressingly -depression -depressions -depressive -depressives -deprivation -deprivations -deprive -deprived -deprives -depriving -depth -depths -deputation -deputations -depute -deputed -deputes -deputies -deputise -deputised -deputises -deputising -deputy -derail -derailed -derailing -derailment -derails -derange -deranged -derangement -derate -derated -derates -derbies -derby -deregulate -deregulated -deregulating -deregulation -derelict -dereliction -derelictions -deride -derided -deriders -derides -deriding -derision -derisive -derisively -derisory -derivable -derivation -derivations -derivative -derivatively -derivatives -derive -derived -derives -deriving -dermal -dermatitis -dermatological -dermatologist -dermatologists -dermatology -dermic -dermis -derogate -derogation -derogations -derogatory -derrick -dervishes -desalination -desalt -desaturated -descant -descend -descendant -descendants -descended -descendent -descender -descenders -descending -descends -descent -descents -describable -describe -described -describer -describers -describes -describing -description -descriptions -descriptive -descriptively -descriptiveness -descriptivism -descriptor -descriptors -desecrate -desecrated -desecrates -desecrating -desecration -desegregation -deselected -desensitising -desert -deserted -deserter -deserters -desertification -deserting -desertion -desertions -deserts -deserve -deserved -deservedly -deserves -deserving -desiccated -desiccation -desiccator -desiderata -desideratum -design -designable -designate -designated -designates -designating -designation -designational -designations -designator -designators -designed -designedly -designer -designers -designing -designs -desirabilia -desirability -desirable -desirableness -desirably -desire -desired -desires -desiring -desirous -desist -desisted -desisting -desk -deskilling -desks -desktop -desktops -desolate -desolated -desolating -desolation -desorption -despair -despaired -despairing -despairingly -despairs -despatch -despatched -despatches -despatching -desperado -desperate -desperately -desperation -despicable -despicably -despisal -despise -despised -despises -despising -despite -despoil -despoiled -despoiling -despond -despondency -despondent -despondently -despot -despotic -despotism -despots -dessert -desserts -dessicated -dessication -destabilisation -destabilise -destabilised -destabilising -destination -destinations -destine -destined -destinies -destiny -destitute -destitution -destroy -destroyable -destroyed -destroyer -destroyers -destroying -destroys -destruct -destruction -destructive -destructively -destructiveness -desuetude -desultorily -desultoriness -desultory -detach -detachable -detached -detaches -detaching -detachment -detachments -detail -detailed -detailing -details -detain -detained -detainee -detainees -detainer -detaining -detains -detect -detectability -detectable -detectably -detected -detecting -detection -detections -detective -detectives -detector -detectors -detects -detent -detente -detention -detentions -deter -detergent -detergents -deteriorate -deteriorated -deteriorates -deteriorating -deterioration -determinable -determinacy -determinant -determinants -determinate -determinately -determination -determinations -determinative -determine -determined -determinedly -determiner -determines -determining -determinism -determinist -deterministic -deterministically -deterred -deterrence -deterrent -deterrents -deterring -deters -detest -detestable -detestably -detestation -detested -detester -detesters -detesting -detests -dethrone -dethroned -detonate -detonated -detonates -detonating -detonation -detonations -detonator -detonators -detour -detoured -detours -detox -detoxification -detoxify -detract -detracted -detracting -detraction -detractor -detractors -detracts -detriment -detrimental -detrimentally -detrital -detritus -detroit -deuce -deuced -deuces -deuterium -deuteron -devaluation -devaluations -devalue -devalued -devalues -devaluing -devastate -devastated -devastating -devastatingly -devastation -develop -developed -developer -developers -developing -development -developmental -developmentally -developments -develops -deviance -deviancy -deviant -deviants -deviate -deviated -deviates -deviating -deviation -deviations -device -devices -devil -devilish -devilishly -devilled -devilment -devilry -devils -devious -deviously -deviousness -devisal -devise -devised -deviser -devises -devising -devoice -devoid -devoir -devolution -devolve -devolved -devolving -devote -devoted -devotedly -devotedness -devotee -devotees -devotes -devoting -devotion -devotional -devotions -devour -devoured -devourer -devourers -devouring -devours -devout -devoutly -devoutness -dew -dewdrop -dewdrops -dews -dewy -dexterity -dexterous -dexterously -dextral -dextrose -dextrous -dextrously -dhow -diabetes -diabetic -diabetics -diabolic -diabolical -diabolically -diabolism -diachronic -diaconal -diacritical -diacriticals -diacritics -diadem -diadems -diagnosable -diagnose -diagnosed -diagnoses -diagnosing -diagnosis -diagnostic -diagnostically -diagnostician -diagnostics -diagonal -diagonalise -diagonalised -diagonalises -diagonalising -diagonally -diagonals -diagram -diagrammatic -diagrammatically -diagrams -dial -dialect -dialectal -dialectic -dialectical -dialectically -dialectics -dialects -dialing -dialled -dialler -dialling -dialog -dialogue -dialogues -dials -dialysis -diamante -diameter -diameters -diametric -diametrically -diamond -diamonds -diana -diapason -diaper -diapers -diaphanous -diaphragm -diaphragmatic -diaphragms -diaries -diarist -diarrhea -diarrhoea -diarrhoeal -diary -diaspora -diastolic -diathermy -diatom -diatomic -diatoms -diatonic -diatribe -diatribes -dice -diced -dices -dicey -dichloride -dichotomies -dichotomous -dichotomy -diciest -dicing -dickens -dictate -dictated -dictates -dictating -dictation -dictator -dictatorial -dictatorially -dictators -dictatorship -dictatorships -diction -dictionaries -dictionary -dictions -dictum -did -didactic -didnt -die -died -diehard -diehards -dielectric -dielectrics -dies -diesel -dieselelectric -diesels -diet -dietary -dieted -dieter -dietetic -dietician -dieticians -dieting -dietitian -dietitians -diets -differ -differed -difference -differences -differencing -different -differentiability -differentiable -differential -differentially -differentials -differentiate -differentiated -differentiates -differentiating -differentiation -differentiations -differentiators -differently -differing -differs -difficult -difficulties -difficulty -diffidence -diffident -diffidently -diffract -diffracted -diffracting -diffraction -diffracts -diffuse -diffused -diffuser -diffusers -diffuses -diffusing -diffusion -diffusional -diffusive -diffusivity -dig -digest -digested -digester -digestible -digesting -digestion -digestions -digestive -digestives -digests -digger -diggers -digging -diggings -digit -digital -digitalis -digitally -digitisation -digitise -digitised -digitiser -digitisers -digitising -digits -dignified -dignify -dignifying -dignitaries -dignitary -dignities -dignity -digraphs -digress -digressed -digressing -digression -digressions -digs -dihedral -dikes -diktat -diktats -dilapidated -dilapidation -dilatation -dilate -dilated -dilates -dilating -dilation -dilator -dilatory -dildo -dilemma -dilemmas -dilettante -dilettantes -diligence -diligent -diligently -dill -dilly -diluent -dilute -diluted -diluter -dilutes -diluting -dilution -dilutions -dim -dime -dimension -dimensional -dimensionality -dimensionally -dimensioned -dimensioning -dimensionless -dimensions -dimer -dimers -dimes -diminish -diminishable -diminished -diminishes -diminishing -diminuendo -diminution -diminutive -diminutives -dimly -dimmed -dimmer -dimmers -dimmest -dimming -dimness -dimorphic -dimorphism -dimple -dimpled -dimples -dims -dimwit -din -dinar -dinars -dine -dined -diner -diners -dines -ding -dingdong -dinged -dinghies -dinghy -dingier -dingiest -dinginess -dingle -dingo -dingy -dining -dinky -dinner -dinners -dinosaur -dinosaurs -dint -dints -diocesan -diocese -diode -diodes -dioptre -dioptres -dioxide -dioxides -dioxin -dioxins -dip -diphtheria -diphthong -diphthongs -diplexers -diploid -diploma -diplomacy -diplomas -diplomat -diplomatic -diplomatically -diplomats -dipolar -dipole -dipoles -dipped -dipper -dipping -dips -dipsomania -dipsomaniac -dipsomaniacs -dipstick -dipsticks -dire -direct -directed -directing -direction -directional -directionality -directionally -directionless -directions -directive -directives -directly -directness -director -directorate -directorates -directorial -directories -directors -directorship -directorships -directory -directs -direly -direness -direst -dirge -dirges -dirigible -dirigiste -dirt -dirtied -dirtier -dirties -dirtiest -dirtily -dirtiness -dirts -dirty -dirtying -disabilities -disability -disable -disabled -disablement -disables -disabling -disabuse -disabused -disadvantage -disadvantaged -disadvantageous -disadvantageously -disadvantages -disaffected -disaffection -disaffiliate -disaffiliated -disaffiliating -disaffiliation -disaggregate -disaggregated -disaggregation -disagree -disagreeable -disagreeably -disagreed -disagreeing -disagreement -disagreements -disagrees -disallow -disallowed -disallowing -disallows -disambiguate -disambiguated -disambiguating -disambiguation -disappear -disappearance -disappearances -disappeared -disappearing -disappears -disappoint -disappointed -disappointing -disappointingly -disappointment -disappointments -disappoints -disapprobation -disapproval -disapprove -disapproved -disapproves -disapproving -disapprovingly -disarm -disarmament -disarmed -disarmer -disarming -disarmingly -disarms -disarranging -disarray -disarrayed -disassemble -disassembled -disassembler -disassembles -disassembling -disassembly -disassociate -disassociated -disassociating -disassociation -disaster -disasters -disastrous -disastrously -disavow -disavowal -disavowed -disavowing -disband -disbanded -disbanding -disbandment -disbands -disbars -disbelief -disbelieve -disbelieved -disbeliever -disbelievers -disbelieving -disbelievingly -disburse -disbursed -disbursement -disbursements -disc -discant -discard -discarded -discarding -discards -discern -discerned -discernible -discernibly -discerning -discernment -discerns -discharge -discharged -discharges -discharging -disciple -disciples -discipleship -disciplinarian -disciplinarians -disciplinary -discipline -disciplined -disciplines -disciplining -disclaim -disclaimed -disclaimer -disclaimers -disclaiming -disclaims -disclose -disclosed -discloses -disclosing -disclosure -disclosures -disco -discography -discolour -discolouration -discoloured -discolours -discomfit -discomfited -discomfiture -discomfort -discomforting -discomforts -disconcert -disconcerted -disconcerting -disconcertingly -disconnect -disconnected -disconnecting -disconnection -disconnections -disconnects -disconsolate -disconsolately -disconsolation -discontent -discontented -discontentedly -discontents -discontinuance -discontinuation -discontinue -discontinued -discontinues -discontinuing -discontinuities -discontinuity -discontinuous -discontinuously -discord -discordance -discordant -discords -discotheque -discotheques -discount -discountability -discountable -discounted -discounting -discounts -discourage -discouraged -discouragement -discouragements -discourages -discouraging -discouragingly -discourse -discoursed -discourses -discoursing -discourteous -discourteously -discourtesy -discover -discoverable -discovered -discoverer -discoverers -discoveries -discovering -discovers -discovery -discredit -discreditable -discredited -discrediting -discredits -discreet -discreetly -discreetness -discrepancies -discrepancy -discrepant -discrete -discretely -discretion -discretionary -discriminant -discriminants -discriminate -discriminated -discriminates -discriminating -discrimination -discriminative -discriminator -discriminators -discriminatory -discs -discursive -discursively -discus -discuss -discussable -discussed -discusses -discussing -discussion -discussions -disdain -disdained -disdainful -disdainfully -disdaining -disease -diseased -diseases -disembark -disembarkation -disembarked -disembarking -disembodied -disembodiment -disembowel -disembowelled -disembowelment -disembowels -disenchanted -disenchantment -disenfranchise -disenfranchised -disenfranchisement -disenfranchises -disenfranchising -disengage -disengaged -disengagement -disengaging -disentangle -disentangled -disentangles -disentangling -disequilibrium -disestablish -disestablished -disestablishing -disestablishment -disfavour -disfigure -disfigured -disfigurement -disfigurements -disfigures -disfiguring -disfranchise -disgorge -disgorged -disgorging -disgrace -disgraced -disgraceful -disgracefully -disgraces -disgracing -disgruntled -disgruntlement -disguise -disguised -disguises -disguising -disgust -disgusted -disgustedly -disgusting -disgustingly -disgusts -dish -disharmonious -disharmony -dishcloth -disheartened -disheartening -dished -dishes -dishevelled -dishier -dishing -dishonest -dishonestly -dishonesty -dishonour -dishonourable -dishonourably -dishonoured -dishpan -dishwasher -dishwashers -dishwater -dishy -disillusion -disillusioned -disillusioning -disillusionment -disincentive -disincentives -disinclination -disinclined -disinfect -disinfectant -disinfectants -disinfected -disinfecting -disinfection -disinformation -disingenuous -disingenuously -disinherit -disinherited -disintegrate -disintegrated -disintegrates -disintegrating -disintegration -disinter -disinterest -disinterested -disinterestedly -disinterestedness -disinterred -disinvest -disinvestment -disjoin -disjoint -disjointed -disjointedly -disjointness -disjunct -disjunction -disjunctions -disjunctive -diskette -diskettes -dislike -disliked -dislikes -disliking -dislocate -dislocated -dislocates -dislocating -dislocation -dislocations -dislodge -dislodged -dislodges -dislodging -disloyal -disloyalty -dismal -dismally -dismantle -dismantled -dismantles -dismantling -dismay -dismayed -dismaying -dismays -dismember -dismembered -dismembering -dismemberment -dismembers -dismiss -dismissal -dismissals -dismissed -dismisses -dismissible -dismissing -dismissive -dismissively -dismount -dismounted -dismounting -dismounts -disobedience -disobedient -disobey -disobeyed -disobeying -disobeys -disorder -disordered -disorderly -disorders -disorganisation -disorganise -disorganised -disorganising -disorient -disorientated -disorientating -disorientation -disoriented -disown -disowned -disowning -disowns -disparage -disparaged -disparagement -disparaging -disparagingly -disparate -disparities -disparity -dispassionate -dispassionately -dispatch -dispatched -dispatcher -dispatchers -dispatches -dispatching -dispel -dispelled -dispelling -dispels -dispensable -dispensaries -dispensary -dispensation -dispensations -dispense -dispensed -dispenser -dispensers -dispenses -dispensing -dispersal -dispersant -disperse -dispersed -disperser -dispersers -disperses -dispersing -dispersion -dispersions -dispersive -dispersively -dispirited -dispiritedly -dispiriting -displace -displaced -displacement -displacements -displacer -displaces -displacing -display -displayable -displayed -displaying -displays -displease -displeased -displeasing -displeasure -disporting -disposable -disposables -disposal -disposals -dispose -disposed -disposer -disposers -disposes -disposing -disposition -dispositions -dispossess -dispossessed -dispossession -disproof -disproofs -disproportional -disproportionally -disproportionate -disproportionately -disprovable -disprove -disproved -disproves -disproving -disputable -disputant -disputants -disputation -disputatious -dispute -disputed -disputes -disputing -disqualification -disqualifications -disqualified -disqualifies -disqualify -disqualifying -disquiet -disquieting -disquietude -disquisition -disquisitions -disregard -disregarded -disregarding -disregards -disrepair -disreputable -disrepute -disrespect -disrespectful -disrespectfully -disrespects -disrobe -disrobing -disrupt -disrupted -disrupting -disruption -disruptions -disruptive -disruptively -disruptor -disrupts -dissatisfaction -dissatisfactions -dissatisfied -dissatisfies -dissatisfy -dissatisfying -dissect -dissected -dissecting -dissection -dissections -dissector -dissects -dissemble -dissembled -dissembling -disseminate -disseminated -disseminating -dissemination -dissension -dissensions -dissent -dissented -dissenter -dissenters -dissenting -dissertation -dissertations -disservice -dissidence -dissident -dissidents -dissimilar -dissimilarities -dissimilarity -dissimulation -dissipate -dissipated -dissipates -dissipating -dissipation -dissipative -dissociate -dissociated -dissociating -dissociation -dissociative -dissociatively -dissolute -dissolution -dissolve -dissolved -dissolves -dissolving -dissonance -dissonances -dissonant -dissuade -dissuaded -dissuades -dissuading -distaff -distal -distally -distance -distanced -distances -distancing -distant -distantly -distaste -distasteful -distastefully -distemper -distempered -distempers -distended -distension -distil -distillate -distillation -distillations -distilled -distiller -distilleries -distillers -distillery -distilling -distils -distinct -distinction -distinctions -distinctive -distinctively -distinctiveness -distinctly -distinctness -distinguish -distinguishable -distinguishably -distinguished -distinguishes -distinguishing -distort -distorted -distorter -distorting -distortion -distortions -distorts -distract -distracted -distractedly -distractedness -distracting -distractingly -distraction -distractions -distracts -distraught -distress -distressed -distresses -distressing -distressingly -distributable -distribute -distributed -distributes -distributing -distribution -distributional -distributions -distributive -distributivity -distributor -distributors -district -districts -distrust -distrusted -distrustful -distrustfully -distrusting -distrusts -disturb -disturbance -disturbances -disturbed -disturbing -disturbingly -disturbs -disulphide -disunion -disunite -disunity -disuse -disused -disyllabic -disyllable -ditch -ditched -ditches -ditching -dither -dithered -dithering -dithers -ditties -ditto -ditty -diuresis -diuretic -diuretics -diurnal -diva -divan -divans -divas -dive -divebombing -dived -diver -diverge -diverged -divergence -divergences -divergent -diverges -diverging -divers -diverse -diversely -diversification -diversified -diversifies -diversify -diversifying -diversion -diversionary -diversions -diversities -diversity -divert -diverted -diverticular -diverting -diverts -dives -divest -divested -divesting -divide -divided -dividend -dividends -divider -dividers -divides -dividing -divination -divine -divined -divinely -diviner -divines -divinest -diving -divining -divinities -divinity -divisibility -divisible -division -divisional -divisions -divisive -divisiveness -divisor -divisors -divorce -divorced -divorcee -divorcees -divorces -divorcing -divot -divots -divulge -divulged -divulges -divulging -dizzier -dizziest -dizzily -dizziness -dizzy -dizzying -dizzyingly -do -doberman -doc -docile -docilely -docility -dock -dockage -docked -docker -dockers -docket -dockets -docking -dockland -docklands -docks -dockside -dockyard -dockyards -docs -doctor -doctoral -doctorate -doctorates -doctored -doctoring -doctors -doctrinaire -doctrinal -doctrinally -doctrine -doctrines -document -documentaries -documentary -documentation -documented -documenting -documents -dodecahedra -dodecahedral -dodecahedron -dodge -dodged -dodgem -dodgems -dodger -dodgers -dodges -dodgier -dodging -dodgy -dodo -doe -doer -doers -does -doesnt -doffed -doffing -dog -dogdays -doge -dogeared -doges -dogfight -dogfights -dogfish -dogged -doggedly -doggedness -doggerel -dogging -doggy -doglike -dogma -dogmas -dogmatic -dogmatically -dogmatism -dogmatist -dogmatists -dogood -dogooder -dogooders -dogs -dogsbody -dogtag -dogy -doh -dohs -doily -doing -doings -doityourself -doldrums -dole -doled -doleful -dolefully -dolerite -doles -doling -doll -dollar -dollars -dolled -dollies -dollop -dolls -dolly -dolman -dolmen -dolomite -dolorous -dolphin -dolphinarium -dolphins -dolt -domain -domains -dome -domed -domes -domestic -domestically -domesticated -domestication -domesticity -domestics -domicile -domiciled -domiciliary -dominance -dominant -dominantly -dominate -dominated -dominates -dominating -domination -domineer -domineered -domineering -dominion -dominions -domino -don -donate -donated -donates -donating -donation -donations -done -dong -donga -donjuan -donkey -donkeys -donned -donning -donor -donors -dons -dont -donut -doodle -doodled -doodles -doodling -doom -doomed -dooming -dooms -doomsday -door -doorbell -doorbells -doorhandles -doorkeeper -doorkeepers -doorknob -doorknobs -doorman -doormat -doormats -doormen -doornail -doorpost -doors -doorstep -doorsteps -doorstop -doorstops -doorway -doorways -dopamine -dope -doped -dopes -dopey -dopier -doping -dopy -dor -dorado -dormancy -dormant -dormer -dormers -dormice -dormitories -dormitory -dormouse -dorsal -dorsally -dosage -dosages -dose -dosed -doses -dosing -dossier -dossiers -dot -dotage -dote -doted -dotes -doting -dots -dotted -dottiness -dotting -dotty -double -doublebarrelled -doublecross -doublecrossing -doubled -doubledealing -doubledecker -doubledeckers -doubles -doublet -doubletalk -doublets -doubling -doubly -doubt -doubted -doubter -doubters -doubtful -doubtfully -doubting -doubtingly -doubtless -doubtlessly -doubts -douche -douching -dough -doughnut -doughnuts -doughs -doughty -dour -dourly -dourness -douse -doused -dousing -dove -dovecot -dovecote -dover -doves -dovetail -dovetails -dowager -dowagers -dowdier -dowdiest -dowdy -dowel -dowelling -dowels -down -downbeat -downcast -downed -downfall -downgrade -downgraded -downgrades -downgrading -downhearted -downhill -downing -downland -downlands -download -downloaded -downloading -downloads -downpipe -downpipes -downplay -downplayed -downpour -downpours -downright -downs -downside -downsize -downsized -downsizing -downstage -downstairs -downstream -downswing -downtoearth -downtrodden -downturn -downturns -downward -downwardly -downwards -downwind -downy -dowries -dowry -dowse -dowser -dowsers -dowsing -doyen -doyenne -doyens -doze -dozed -dozen -dozens -dozes -dozier -dozing -dozy -dr -drab -drabness -drachm -drachma -drachmas -dracone -draconian -dracula -draft -drafted -draftee -draftees -drafter -drafters -draftier -drafting -drafts -draftsman -drafty -drag -dragged -dragging -dragnet -dragon -dragonflies -dragonfly -dragons -dragoon -dragooned -dragoons -drags -drain -drainage -drained -drainer -draining -drainpipe -drainpipes -drains -drake -drakes -dram -drama -dramas -dramatic -dramatically -dramatics -dramatisation -dramatisations -dramatise -dramatised -dramatising -dramatist -dramatists -dramaturgical -drank -drape -draped -draper -draperies -drapers -drapery -drapes -draping -drastic -drastically -drat -draught -draughtier -draughtiest -draughts -draughtsman -draughtsmanship -draughtsmen -draughty -draw -drawable -drawback -drawbacks -drawbridge -drawbridges -drawcord -drawees -drawer -drawers -drawing -drawings -drawl -drawled -drawling -drawls -drawn -draws -dray -drays -dread -dreaded -dreadful -dreadfully -dreadfulness -dreading -dreadlocks -dreadnought -dreads -dream -dreamed -dreamer -dreamers -dreamier -dreamiest -dreamily -dreaming -dreamland -dreamless -dreamlike -dreams -dreamt -dreamy -drear -drearier -dreariest -drearily -dreariness -dreary -dredge -dredged -dredger -dredges -dredging -dregs -drench -drenched -drenches -drenching -dress -dressage -dressed -dresser -dressers -dresses -dressing -dressings -dressmaker -dressmakers -dressmaking -dressy -drew -dribble -dribbled -dribbler -dribbles -dribbling -dried -drier -driers -dries -driest -drift -drifted -drifter -drifters -drifting -drifts -driftwood -drill -drilled -driller -drilling -drills -drily -drink -drinkable -drinker -drinkers -drinking -drinks -drip -dripdry -dripped -dripping -drippy -drips -drivable -drive -drive -drivein -driveins -drivel -drivelled -drivelling -drivels -driven -driver -driverless -drivers -drives -driveway -driveways -driving -drizzle -drizzled -drizzles -drizzling -drizzly -droll -droller -drollery -drollest -dromedaries -dromedary -drone -droned -drones -droning -drool -drooled -drooling -drools -droop -drooped -droopier -droopiest -drooping -droopingly -droops -droopy -drop -droplet -droplets -dropout -dropouts -dropped -dropper -dropping -droppings -drops -dropsy -dross -drought -droughts -drove -drover -drovers -droves -droving -drown -drowned -drowning -drownings -drowns -drowse -drowsed -drowses -drowsier -drowsiest -drowsily -drowsiness -drowsy -drub -drubbed -drubbing -drudge -drudgery -drudges -drug -drugged -drugging -druggist -drugs -druid -druids -drum -drumbeat -drumbeats -drummed -drummer -drummers -drumming -drums -drumsticks -drunk -drunkard -drunkards -drunken -drunkenly -drunkenness -drunker -drunks -dry -drycleaned -drycleaning -dryer -dryers -dryeyed -drying -dryish -dryly -dryness -drystone -dual -dualism -dualisms -dualist -dualistic -dualities -duality -dually -duals -dub -dubbed -dubbing -dubious -dubiously -dubiousness -dublin -dubs -duce -duchess -duchesses -duchies -duchy -duck -duckbill -duckbilled -duckboards -ducked -ducking -duckings -duckling -ducklings -duckpond -ducks -duct -ducted -ductile -ducting -ducts -dud -dude -dudes -dudgeon -duds -due -duel -duelled -dueller -duellers -duelling -duellist -duels -dues -duet -duets -duff -duffel -dug -dugout -dugouts -duiker -duke -dukedom -dukedoms -dukes -dulcet -dulcimer -dull -dullard -dullards -dulled -duller -dullest -dulling -dullness -dulls -dully -dulness -duly -dumb -dumbbell -dumber -dumbest -dumbfound -dumbfounded -dumbfounding -dumbfounds -dumbly -dumbness -dumbstruck -dumfound -dumfounded -dumfounding -dumfounds -dummied -dummies -dummy -dump -dumped -dumper -dumping -dumpling -dumplings -dumps -dumpy -dun -dunce -dunces -dune -dunes -dung -dungarees -dungbeetle -dungeon -dungeons -dunghill -dunked -dunking -dunkirk -duo -duodenal -duodenum -duologue -duomo -duopoly -dupe -duped -dupes -duplex -duplicability -duplicate -duplicated -duplicates -duplicating -duplication -duplications -duplicator -duplicators -duplicities -duplicitous -duplicity -durability -durable -durables -durance -duration -durations -durban -duress -during -dusk -duskier -dusky -dust -dustbin -dustbins -dustcart -dusted -duster -dusters -dustier -dustily -dusting -dustman -dustmen -dustpan -dusts -dusty -dutch -dutchman -dutchmen -duties -dutiful -dutifully -dutifulness -duty -dutyfree -duvet -duvets -dux -dwarf -dwarfed -dwarfing -dwarfish -dwarfs -dwarves -dwell -dwelled -dweller -dwellers -dwelling -dwellings -dwells -dwelt -dwindle -dwindled -dwindles -dwindling -dyad -dyadic -dye -dyed -dyeing -dyeings -dyer -dyers -dyes -dyestuff -dyestuffs -dying -dyke -dykes -dynamic -dynamical -dynamically -dynamics -dynamism -dynamite -dynamited -dynamo -dynast -dynastic -dynasties -dynasts -dynasty -dyne -dysentery -dysfunction -dysfunctional -dysfunctions -dyslexia -dyslexic -dyslexically -dyslexics -dyspepsia -dyspeptic -dystrophy -each -eager -eagerly -eagerness -eagle -eagles -eaglet -eaglets -ear -earache -earaches -eardrop -eardrops -eardrum -eardrums -eared -earful -earholes -earl -earldom -earldoms -earlier -earliest -earlobe -earlobes -earls -early -earmark -earmarked -earmarking -earn -earned -earner -earners -earnest -earnestly -earnestness -earning -earnings -earns -earphone -earphones -earpiece -earpieces -earplug -earplugs -earring -earrings -ears -earshot -earsplitting -earth -earthbound -earthed -earthen -earthenware -earthiness -earthing -earthling -earthlings -earthly -earthquake -earthquakes -earths -earthshaking -earthshattering -earthwards -earthwork -earthworks -earthworm -earthworms -earthy -earwax -earwig -earwigs -ease -eased -easel -easels -easement -easements -eases -easier -easiest -easily -easiness -easing -east -eastbound -easter -easterly -eastern -easterners -easternmost -easting -eastward -eastwards -easy -easygoing -eat -eatable -eatage -eaten -eater -eaters -eatery -eating -eatings -eats -eaves -eavesdrop -eavesdropped -eavesdropper -eavesdroppers -eavesdropping -eavesdrops -ebb -ebbed -ebbing -ebbs -ebbtide -ebony -ebullience -ebullient -eccentric -eccentrically -eccentricities -eccentricity -eccentrics -ecclesiastic -ecclesiastical -ecclesiastically -echelon -echelons -echidna -echidnas -echinoderm -echinoderms -echo -echoed -echoic -echoing -eclair -eclairs -eclectic -eclecticism -eclipse -eclipsed -eclipses -eclipsing -ecliptic -ecological -ecologically -ecologist -ecologists -ecology -econometric -econometrics -economic -economical -economically -economics -economies -economisation -economise -economised -economises -economising -economist -economists -economy -ecosystem -ecosystems -ecstasies -ecstasy -ecstatic -ecstatically -ectopic -ectoplasm -ecuador -ecumenical -ecumenically -ecumenism -eczema -eddied -eddies -eddy -eddying -edema -eden -edge -edged -edgeless -edges -edgeways -edgewise -edgier -edgily -edginess -edging -edgings -edgy -edibility -edible -edibles -edict -edicts -edification -edifice -edifices -edified -edifies -edify -edifying -edison -edit -editable -edited -editing -edition -editions -editor -editorial -editorialised -editorially -editorials -editors -editorship -editorships -edits -educate -educated -educates -educating -education -educational -educationalist -educationalists -educationally -educationist -educationists -educations -educative -educator -educators -eduction -eel -eels -eelworm -eelworms -eerie -eerier -eeriest -eerily -eeriness -eery -efface -effaced -effacing -effect -effected -effecting -effective -effectively -effectiveness -effector -effectors -effects -effectual -effectually -effeminacy -effeminate -efferent -effervescence -effervescent -effete -efficacious -efficacy -efficiencies -efficiency -efficient -efficiently -effigies -effigy -effluent -effluents -effluvia -effluxion -effort -effortless -effortlessly -efforts -effrontery -effulgence -effulgent -effusion -effusions -effusive -effusively -eg -egalitarian -egalitarianism -egalitarians -egg -egged -eggheads -egging -eggs -eggshell -eggshells -ego -egocentric -egocentricity -egoism -egoist -egoistic -egoists -egomania -egomaniac -egomaniacs -egotism -egotist -egotistic -egotistical -egotistically -egotists -egregious -egress -egret -egrets -egypt -egyptian -eh -eider -eiderdown -eidetic -eigenfunction -eigenfunctions -eigenstate -eigenstates -eigenvalue -eigenvalues -eight -eighteen -eighteenth -eightfold -eighth -eighties -eightieth -eightpence -eights -eighty -einstein -eire -eisteddfod -either -eject -ejected -ejecting -ejection -ejections -ejector -ejectors -ejects -eke -eked -eking -elaborate -elaborated -elaborately -elaborateness -elaborates -elaborating -elaboration -elaborations -elal -elan -eland -elands -elapse -elapsed -elapses -elapsing -elastic -elastically -elasticated -elasticities -elasticity -elastics -elastin -elastodynamics -elate -elated -elates -elation -elbe -elbow -elbowed -elbowing -elbows -elder -elderberries -elderberry -elderflower -elderly -elders -eldest -eldorado -elect -electability -electable -elected -electing -election -electioneering -elections -elective -elector -electoral -electorally -electorate -electorates -electors -electric -electrical -electrically -electrician -electricians -electricity -electrics -electrification -electrified -electrify -electrifying -electro -electrocardiogram -electrocardiographic -electrochemical -electrochemically -electrocute -electrocuted -electrocutes -electrocuting -electrocution -electrode -electrodes -electrodynamic -electrodynamics -electroencephalogram -electroluminescent -electrolyse -electrolysed -electrolysing -electrolysis -electrolyte -electrolytes -electrolytic -electrolytically -electromagnet -electromagnetic -electromagnetically -electromagnetism -electromechanical -electromechanics -electromotive -electron -electronegative -electronic -electronically -electronics -electrons -electrophoresis -electrostatic -electrostatics -electrotechnical -elects -elegance -elegant -elegantly -elegiac -elegies -elegy -element -elemental -elementally -elementarily -elementary -elements -elephant -elephantiasis -elephantine -elephants -elevate -elevated -elevates -elevating -elevation -elevations -elevator -elevators -eleven -eleventh -elf -elfin -elflike -elgreco -elicit -elicitation -elicited -eliciting -elicits -elide -elided -elides -eliding -eligibility -eligible -eligibly -elijah -eliminate -eliminated -eliminates -eliminating -elimination -eliminations -eliminator -elision -elisions -elite -elites -elitism -elitist -elitists -elixir -elixirs -elk -elks -ell -ellipse -ellipses -ellipsis -ellipsoid -ellipsoidal -ellipsoids -elliptic -elliptical -elliptically -ells -elm -elms -elnino -elocution -elongate -elongated -elongates -elongating -elongation -elongations -elope -eloped -elopement -elopes -eloping -eloquence -eloquent -eloquently -els -else -elsewhere -elucidate -elucidated -elucidates -elucidating -elucidation -elude -eluded -eludes -eluding -elusion -elusions -elusive -elusively -elusiveness -eluted -elution -elven -elves -elvish -elysee -em -emaciate -emaciated -emaciation -email -emailed -emanate -emanated -emanates -emanating -emanation -emanations -emancipate -emancipated -emancipates -emancipating -emancipation -emancipator -emancipatory -emasculate -emasculated -emasculating -emasculation -embalm -embalmed -embalmer -embalmers -embalming -embalms -embank -embankment -embankments -embargo -embargoed -embark -embarkation -embarked -embarking -embarks -embarrass -embarrassed -embarrassedly -embarrasses -embarrassing -embarrassingly -embarrassment -embarrassments -embassies -embassy -embattle -embattled -embed -embeddable -embedded -embedding -embeddings -embeds -embellish -embellished -embellishing -embellishment -embellishments -ember -embers -embezzle -embezzled -embezzlement -embezzler -embezzlers -embezzling -embitter -embittered -embittering -embitterment -emblazoned -emblem -emblematic -emblems -embodied -embodies -embodiment -embodiments -embody -embodying -embolden -emboldened -emboldening -emboldens -embolism -embosom -emboss -embossed -embrace -embraced -embraces -embracing -embrasure -embrocation -embroider -embroidered -embroiderers -embroideries -embroidering -embroidery -embroil -embroiled -embroiling -embryo -embryological -embryology -embryonal -embryonic -emendation -emendations -emended -emerald -emeralds -emerge -emerged -emergence -emergencies -emergency -emergent -emerges -emerging -emeritus -emersion -emery -emetic -emigrant -emigrants -emigrate -emigrated -emigrating -emigration -emigre -emigres -eminence -eminences -eminent -eminently -emir -emirate -emirates -emirs -emissaries -emissary -emission -emissions -emissivities -emissivity -emit -emits -emitted -emitter -emitters -emitting -emollient -emolument -emoluments -emotion -emotional -emotionalism -emotionality -emotionally -emotionless -emotions -emotive -emotively -empathetic -empathetical -empathic -empathise -empathising -empathy -emperor -emperors -emphases -emphasis -emphasise -emphasised -emphasises -emphasising -emphatic -emphatically -emphysema -empire -empires -empiric -empirical -empirically -empiricism -empiricist -empiricists -emplacement -emplacements -employ -employability -employable -employed -employee -employees -employer -employers -employing -employment -employments -employs -emporia -emporium -empower -empowered -empowering -empowerment -empowers -empress -emptied -emptier -empties -emptiest -emptily -emptiness -empty -emptyhanded -emptying -ems -emu -emulate -emulated -emulates -emulating -emulation -emulations -emulator -emulators -emulsifies -emulsion -emulsions -emus -enable -enabled -enables -enabling -enact -enacted -enacting -enactment -enactments -enacts -enamel -enamelled -enamels -enamoured -encage -encamp -encamped -encampment -encampments -encapsulate -encapsulated -encapsulates -encapsulating -encapsulation -encapsulations -encase -encased -encases -encashment -encasing -encephalitis -encephalopathy -enchain -enchant -enchanted -enchanter -enchanters -enchanting -enchantingly -enchantment -enchantments -enchantress -enchants -enchiladas -enciphering -encircle -encircled -encirclement -encirclements -encircles -encircling -enclasp -enclave -enclaves -enclose -enclosed -encloses -enclosing -enclosure -enclosures -encode -encoded -encoder -encoders -encodes -encoding -encomium -encompass -encompassed -encompasses -encompassing -encore -encored -encores -encounter -encountered -encountering -encounters -encourage -encouraged -encouragement -encouragements -encourager -encourages -encouraging -encouragingly -encroach -encroached -encroaches -encroaching -encroachment -encroachments -encrust -encrustation -encrusted -encrusting -encrypt -encrypted -encrypting -encryption -encrypts -encumber -encumbered -encumbering -encumbrance -encumbrances -encyclical -encyclopaedia -encyclopaedias -encyclopaedic -encyclopedia -encyclopedias -encyclopedic -end -endanger -endangered -endangering -endangers -endear -endeared -endearing -endearingly -endearment -endearments -endears -endeavour -endeavoured -endeavouring -endeavours -ended -endemic -endemically -endgame -ending -endings -endive -endless -endlessly -endlessness -endocrine -endogenous -endogenously -endometrial -endometriosis -endometrium -endomorphism -endomorphisms -endoplasmic -endorphins -endorse -endorsed -endorsement -endorsements -endorser -endorses -endorsing -endoscope -endoscopic -endoscopy -endothermic -endotoxin -endow -endowed -endowing -endowment -endowments -endows -endpapers -ends -endued -endues -endungeoned -endurable -endurance -endure -endured -endures -enduring -enema -enemas -enemies -enemy -energetic -energetically -energetics -energies -energise -energised -energiser -energisers -energising -energy -enervate -enervated -enervating -enfeeble -enfeebled -enfeeblement -enfold -enfolded -enfolding -enfolds -enforce -enforceability -enforceable -enforced -enforcement -enforcements -enforcer -enforcers -enforces -enforcing -enfranchise -enfranchised -enfranchisement -enfranchiser -enfranchising -engage -engaged -engagement -engagements -engages -engaging -engagingly -engarde -engels -engender -engendered -engendering -engenders -engine -engined -engineer -engineered -engineering -engineers -engines -england -english -engorge -engorged -engrained -engrave -engraved -engraver -engravers -engraves -engraving -engravings -engross -engrossed -engrossing -engulf -engulfed -engulfing -engulfs -enhance -enhanceable -enhanced -enhancement -enhancements -enhancer -enhancers -enhances -enhancing -enharmonic -enigma -enigmas -enigmatic -enigmatically -enjoin -enjoined -enjoining -enjoins -enjoy -enjoyability -enjoyable -enjoyably -enjoyed -enjoyer -enjoying -enjoyment -enjoyments -enjoys -enlace -enlarge -enlarged -enlargement -enlargements -enlarger -enlarges -enlarging -enlighten -enlightened -enlightening -enlightenment -enlightens -enlist -enlisted -enlisting -enlistment -enlists -enliven -enlivened -enlivening -enlivens -enmasse -enmeshed -enmities -enmity -enneads -ennoble -ennobled -ennobles -ennobling -ennui -enormities -enormity -enormous -enormously -enough -enounced -enounces -enquire -enquired -enquirer -enquirers -enquires -enquiries -enquiring -enquiringly -enquiry -enrage -enraged -enrages -enraging -enraptured -enrich -enriched -enriches -enriching -enrichment -enrichments -enrobe -enrobed -enrol -enroll -enrolled -enrolling -enrolls -enrolment -enrolments -enrols -enroute -ensconce -ensconced -ensemble -ensembles -enshrine -enshrined -enshrines -enshrining -enshroud -enshrouded -ensign -ensigns -enslave -enslaved -enslavement -enslaves -enslaving -ensnare -ensnared -ensnaring -ensnarl -ensue -ensued -ensues -ensuing -ensure -ensured -ensures -ensuring -entablature -entail -entailed -entailing -entailment -entails -entangle -entangled -entanglement -entanglements -entangler -entangles -entangling -entente -enter -entered -entering -enteritis -enterprise -enterprises -enterprising -enters -entertain -entertained -entertainer -entertainers -entertaining -entertainingly -entertainment -entertainments -entertains -enthalpies -enthalpy -enthralled -enthralling -enthrone -enthroned -enthronement -enthuse -enthused -enthuses -enthusiasm -enthusiasms -enthusiast -enthusiastic -enthusiastically -enthusiasts -enthusing -entice -enticed -enticement -enticements -entices -enticing -enticingly -entire -entirely -entires -entirety -entities -entitle -entitled -entitlement -entitlements -entitles -entitling -entity -entomb -entombed -entombment -entombs -entomological -entomologist -entomologists -entomology -entourage -entrails -entrain -entrained -entrainment -entrance -entranced -entrances -entrancing -entrant -entrants -entrap -entrapment -entrapped -entrapping -entreat -entreated -entreaties -entreating -entreatingly -entreats -entreaty -entree -entrench -entrenched -entrenching -entrenchment -entrepreneur -entrepreneurial -entrepreneurs -entrepreneurship -entries -entropic -entropy -entrust -entrusted -entrusting -entrusts -entry -entwine -entwined -entwines -entwining -enumerable -enumerate -enumerated -enumerates -enumerating -enumeration -enumerations -enumerator -enumerators -enunciate -enunciated -enunciating -enunciation -envelop -envelope -enveloped -enveloper -envelopers -envelopes -enveloping -envelops -enviable -enviably -envied -envies -envious -enviously -environ -environment -environmental -environmentalism -environmentalist -environmentalists -environmentally -environments -environs -envisage -envisaged -envisages -envisaging -envision -envisioned -envoy -envoys -envy -envying -enwrap -enzymatic -enzyme -enzymes -eon -eons -eosin -epaulettes -ephemera -ephemeral -ephemeris -ephor -epic -epically -epicarp -epicentre -epics -epicure -epicurean -epicycles -epicycloid -epidemic -epidemics -epidemiological -epidemiologist -epidemiologists -epidemiology -epidermal -epidermis -epidural -epigenetic -epigon -epigones -epigram -epigrammatic -epigrams -epigraph -epigraphical -epigraphy -epilepsy -epileptic -epileptics -epilogue -epinephrine -epiphanies -epiphenomena -epiphenomenon -episcopacy -episcopal -episcopalian -episcopate -episode -episodes -episodic -episodically -epistemic -epistemological -epistemology -epistle -epistles -epistolary -epitap -epitaph -epitaphs -epitaxial -epitaxy -epithelial -epithelium -epithet -epithetic -epithets -epitome -epitomise -epitomised -epitomises -epoch -epochal -epochs -epoxies -epoxy -epsilon -equable -equably -equal -equalisation -equalise -equalised -equaliser -equalisers -equalising -equalities -equality -equalled -equalling -equally -equals -equanimity -equate -equated -equates -equating -equation -equations -equator -equatorial -equerry -equestrian -equestrianism -equiangular -equidistant -equilateral -equilibrating -equilibration -equilibria -equilibrium -equine -equinoctial -equinox -equinoxes -equip -equipartition -equipment -equipments -equipped -equipping -equips -equitable -equitably -equities -equity -equivalence -equivalences -equivalent -equivalently -equivalents -equivocal -equivocated -equivocating -equivocation -equivocations -era -eradicate -eradicated -eradicating -eradication -eras -erasable -erase -erased -eraser -erasers -erases -erasing -erasure -erasures -erbium -ere -erect -erected -erecter -erectile -erecting -erection -erections -erectly -erects -erg -ergo -ergodic -ergonomic -ergonomically -ergonomics -ergophobia -ergot -ergs -erica -ericas -eritrea -ermine -erode -eroded -erodes -eroding -erogenous -eros -erose -erosion -erosional -erosions -erosive -erotic -erotica -erotically -eroticism -err -errand -errands -errant -errata -erratic -erratically -erratum -erred -erring -erroneous -erroneously -error -errors -errs -ersatz -erst -erstwhile -erudite -erudition -erupt -erupted -erupting -eruption -eruptions -eruptive -erupts -erysipelas -esau -escalade -escalate -escalated -escalates -escalating -escalation -escalator -escalators -escapade -escapades -escape -escaped -escapee -escapees -escapement -escapes -escaping -escapism -escapist -escapology -escarp -escarpment -escarpments -escarps -eschatological -eschatology -eschew -eschewed -eschewing -eschews -escort -escorted -escorting -escorts -escudo -eskimo -esoteric -esoterica -esoterically -espadrilles -especial -especially -espied -espionage -esplanade -espousal -espouse -espoused -espouses -espousing -espresso -esprit -espy -espying -esquire -esquires -essay -essayed -essayist -essayists -essays -essen -essence -essences -essential -essentialism -essentialist -essentially -essentials -est -establish -established -establishes -establishing -establishment -establishments -estate -estates -esteem -esteemed -esteems -ester -esters -esthete -esthetic -estimable -estimate -estimated -estimates -estimating -estimation -estimations -estimator -estimators -estonia -estranged -estrangement -estrangements -estuaries -estuarine -estuary -eta -etal -etcetera -etch -etched -etcher -etchers -etches -etching -etchings -eternal -eternally -eternity -ethane -ethanol -ether -ethereal -ethereally -etherised -ethic -ethical -ethically -ethicist -ethics -ethiopia -ethnic -ethnical -ethnically -ethnicity -ethnocentric -ethnographer -ethnographers -ethnographic -ethnography -ethnological -ethnology -ethological -ethologist -ethologists -ethology -ethos -ethyl -ethylene -etiquette -etna -etudes -etui -etymological -etymologically -etymologies -etymologist -etymologists -etymology -eucalyptus -eugenic -eugenics -eukaryote -eukaryotes -eukaryotic -eulogies -eulogise -eulogises -eulogising -eulogistic -eulogy -eunuch -eunuchs -euphemism -euphemisms -euphemistic -euphemistically -euphonious -euphonium -euphoniums -euphony -euphoria -euphoric -eurasia -eurasian -eureka -eurekas -euro -europe -european -eurydice -eutectic -euthanasia -evacuate -evacuated -evacuating -evacuation -evacuations -evacuee -evacuees -evadable -evade -evaded -evader -evaders -evades -evading -evaluable -evaluate -evaluated -evaluates -evaluating -evaluation -evaluational -evaluations -evaluative -evaluator -evaluators -evanescent -evangelical -evangelicalism -evangelicals -evangelisation -evangelise -evangelising -evangelism -evangelist -evangelistic -evangelists -evaporate -evaporated -evaporates -evaporating -evaporation -evaporator -evasion -evasions -evasive -evasively -evasiveness -eve -even -evened -evener -evenhanded -evening -evenings -evenly -evenness -evens -evensong -event -eventful -eventide -eventing -events -eventual -eventualities -eventuality -eventually -ever -everchanging -everest -evergreen -evergreens -everincreasing -everlasting -everlastingly -everliving -evermore -everpresent -eversion -everting -every -everybody -everyday -everyone -everything -everywhere -eves -evict -evicted -evicting -eviction -evictions -evicts -evidence -evidenced -evidences -evident -evidential -evidently -evil -evildoer -evilly -evilness -evils -evince -evinced -evinces -evincing -eviscerate -evocation -evocations -evocative -evocatively -evoke -evoked -evokes -evoking -evolute -evolution -evolutionarily -evolutionary -evolutionism -evolutionist -evolutionists -evolutions -evolve -evolved -evolves -evolving -ewe -ewes -exacerbate -exacerbated -exacerbates -exacerbating -exacerbation -exact -exacted -exacting -exaction -exactitude -exactly -exactness -exacts -exaggerate -exaggerated -exaggeratedly -exaggerates -exaggerating -exaggeration -exaggerations -exalt -exaltation -exalted -exalting -exalts -exam -examinable -examination -examinations -examine -examined -examinees -examiner -examiners -examines -examining -example -examples -exams -exasperate -exasperated -exasperatedly -exasperating -exasperation -excavate -excavated -excavating -excavation -excavations -excavator -excavators -exceed -exceeded -exceeding -exceedingly -exceeds -excel -excelled -excellence -excellencies -excellency -excellent -excellently -excelling -excels -excelsior -except -excepted -excepting -exception -exceptionable -exceptional -exceptionally -exceptions -excepts -excerpt -excerpted -excerpts -excess -excesses -excessive -excessively -exchange -exchangeable -exchanged -exchanger -exchangers -exchanges -exchanging -exchequer -excise -excised -excising -excision -excitability -excitable -excitation -excitations -excite -excited -excitedly -excitement -excitements -excites -exciting -excitingly -exciton -exclaim -exclaimed -exclaiming -exclaims -exclamation -exclamations -exclamatory -exclude -excluded -excludes -excluding -exclusion -exclusionary -exclusions -exclusive -exclusively -exclusiveness -exclusivist -exclusivity -excommunicate -excommunicated -excommunicating -excommunication -excrete -excruciating -excruciatingly -excruciation -excursion -excursionists -excursions -excursus -excusable -excuse -excused -excuses -excusing -executable -execute -executed -executes -executing -execution -executioner -executioners -executions -executive -executives -executor -executors -exegesis -exegetical -exemplar -exemplars -exemplary -exemplification -exemplified -exemplifies -exemplify -exemplifying -exempt -exempted -exempting -exemption -exemptions -exempts -exercisable -exercise -exercised -exerciser -exercises -exercising -exert -exerted -exerting -exertion -exertions -exerts -exes -exeunt -exfoliation -exhalation -exhalations -exhale -exhaled -exhales -exhaling -exhaust -exhausted -exhaustible -exhausting -exhaustion -exhaustive -exhaustively -exhausts -exhibit -exhibited -exhibiting -exhibition -exhibitioner -exhibitioners -exhibitionism -exhibitionist -exhibitionists -exhibitions -exhibitor -exhibitors -exhibits -exhilarate -exhilarated -exhilarating -exhilaration -exhort -exhortation -exhortations -exhorted -exhorting -exhorts -exhumation -exhume -exhumed -exhumes -exhuming -exhusband -exigencies -exigency -exigent -exiguous -exile -exiled -exiles -exiling -exist -existed -existence -existences -existent -existential -existentialism -existentialist -existentialistic -existentially -existing -exists -exit -exited -exiting -exits -exmember -exmembers -exocrine -exoderm -exodus -exogenous -exogenously -exonerate -exonerated -exonerates -exonerating -exoneration -exorbitant -exorbitantly -exorcise -exorcised -exorcising -exorcism -exorcisms -exorcist -exoskeleton -exothermic -exothermically -exotic -exotica -exotically -exoticism -expand -expandability -expandable -expanded -expander -expanding -expands -expanse -expanses -expansible -expansion -expansionary -expansionism -expansionist -expansions -expansive -expansively -expansiveness -expatriate -expatriated -expatriates -expect -expectancies -expectancy -expectant -expectantly -expectation -expectational -expectations -expected -expecting -expectorate -expectorated -expectoration -expects -expedience -expediency -expedient -expedients -expedite -expedited -expedites -expediting -expedition -expeditionary -expeditions -expeditious -expeditiously -expel -expelled -expelling -expels -expend -expendable -expended -expending -expenditure -expenditures -expends -expense -expenses -expensive -expensively -experience -experienced -experiences -experiencing -experiential -experiment -experimental -experimentalist -experimentalists -experimentally -experimentation -experimented -experimenter -experimenters -experimenting -experiments -expert -expertise -expertly -expertness -experts -expiate -expiation -expiatory -expiration -expiratory -expire -expired -expires -expiring -expiry -explain -explainable -explained -explaining -explains -explanation -explanations -explanatory -expletive -expletives -explicable -explicate -explicated -explication -explicative -explicit -explicitly -explicitness -explode -exploded -exploder -exploders -explodes -exploding -exploit -exploitable -exploitation -exploitations -exploitative -exploited -exploiter -exploiters -exploiting -exploits -explorable -exploration -explorations -exploratory -explore -explored -explorer -explorers -explores -exploring -explosion -explosions -explosive -explosively -explosiveness -explosives -expo -exponent -exponential -exponentially -exponentiation -exponents -export -exportability -exportable -exported -exporter -exporters -exporting -exports -expose -exposed -exposes -exposing -exposition -expositions -expository -expostulate -expostulated -expostulating -expostulation -expostulations -exposure -exposures -expound -expounded -expounding -expounds -express -expressed -expresses -expressible -expressing -expression -expressionism -expressionist -expressionistic -expressionists -expressionless -expressionlessly -expressions -expressive -expressively -expressiveness -expressly -expropriate -expropriated -expropriation -expropriations -expulsion -expulsions -expunge -expunged -expunges -expunging -expurgate -expurgated -expurgating -exquisite -exquisitely -exquisiteness -ext -extend -extendability -extendable -extended -extender -extenders -extendible -extending -extends -extensibility -extensible -extension -extensional -extensionally -extensions -extensive -extensively -extensiveness -extensors -extent -extents -extenuate -extenuated -extenuating -extenuation -exterior -exteriors -exterminate -exterminated -exterminates -exterminating -extermination -exterminations -exterminator -exterminators -extern -external -externalised -externally -externals -externs -extinct -extinction -extinctions -extinguish -extinguished -extinguisher -extinguishers -extinguishes -extinguishing -extinguishment -extirpate -extirpation -extol -extolled -extolling -extols -extort -extorted -extorting -extortion -extortionate -extortionately -extortionists -extorts -extra -extracellular -extract -extractable -extracted -extracting -extraction -extractions -extractive -extractor -extracts -extraditable -extradite -extradited -extraditing -extradition -extragalactic -extrajudicial -extralinguistic -extramarital -extramural -extraneous -extraordinarily -extraordinary -extrapolate -extrapolated -extrapolating -extrapolation -extrapolations -extras -extrasolar -extraterrestrial -extraterrestrials -extraterritorial -extravagance -extravagances -extravagant -extravagantly -extravaganza -extravaganzas -extrema -extremal -extreme -extremely -extremes -extremest -extremism -extremist -extremists -extremities -extremity -extricate -extricated -extricating -extrication -extrinsic -extrinsically -extroversion -extrovert -extroverts -extrude -extruded -extrusion -extrusions -exuberance -exuberant -exuberantly -exudate -exude -exuded -exudes -exuding -exult -exultant -exultantly -exultation -exulted -exulting -exultingly -exults -exwife -exwives -eye -eyeball -eyeballs -eyebrow -eyebrows -eyecatching -eyed -eyeful -eyeglass -eyeglasses -eyeing -eyelash -eyelashes -eyeless -eyelet -eyelets -eyelevel -eyelid -eyelids -eyelike -eyeliner -eyepatch -eyepiece -eyes -eyeshadow -eyesight -eyesore -eyesores -eyeteeth -eyetooth -eyewash -eyewitness -eyewitnesses -fab -fable -fabled -fables -fabric -fabricate -fabricated -fabricates -fabricating -fabrication -fabrications -fabricator -fabrics -fabulists -fabulous -fabulously -facade -facades -face -faced -faceless -facelift -faceplate -facer -facers -faces -facet -faceted -faceting -facetious -facetiously -facetiousness -facets -facia -facial -facials -facile -facilitate -facilitated -facilitates -facilitating -facilitation -facilitative -facilitator -facilitators -facilities -facility -facing -facings -facsimile -facsimiles -fact -faction -factional -factionalism -factions -factious -factitious -factor -factored -factorial -factorials -factories -factoring -factorisable -factorisation -factorisations -factorise -factorised -factorises -factorising -factors -factory -factotum -facts -factual -factually -faculties -faculty -fad -fade -faded -fadeout -fades -fading -fads -faecal -faeces -fag -faggot -faggots -fagot -fags -fail -failed -failing -failings -fails -failure -failures -faint -fainted -fainter -faintest -fainthearted -fainting -faintly -faintness -faints -fair -fairer -fairest -fairground -fairgrounds -fairies -fairing -fairish -fairly -fairness -fairs -fairsex -fairway -fairways -fairy -fairytale -faith -faithful -faithfully -faithfulness -faithless -faithlessness -faiths -fake -faked -fakers -fakery -fakes -faking -falcon -falconer -falconry -falcons -fall -fallacies -fallacious -fallacy -fallen -faller -fallers -fallguy -fallibility -fallible -falling -fallopian -fallout -fallow -falls -false -falsebay -falsehood -falsehoods -falsely -falseness -falser -falsetto -falsifiability -falsifiable -falsification -falsifications -falsified -falsifier -falsifiers -falsifies -falsify -falsifying -falsities -falsity -falter -faltered -faltering -falteringly -falters -fame -famed -familial -familiar -familiarisation -familiarise -familiarised -familiarising -familiarities -familiarity -familiarly -families -family -famine -famines -famish -famished -famous -famously -fan -fanatic -fanatical -fanatically -fanaticism -fanatics -fanbelt -fanciable -fancied -fancier -fanciers -fancies -fanciest -fanciful -fancifully -fancy -fancying -fandango -fanfare -fanfares -fang -fangs -fanlight -fanned -fanning -fanny -fans -fantail -fantails -fantasia -fantastic -far -farad -faraday -faraway -farce -farces -farcical -fare -fared -fares -farewell -farewells -farfetched -farflung -faring -farm -farmed -farmer -farmers -farmhouse -farmhouses -farming -farmings -farmland -farms -farmstead -farmsteads -farmyard -farmyards -faroff -farout -farrago -farreaching -farrier -farriers -farrow -farseeing -farsighted -farther -farthest -farthing -farthings -fascia -fascias -fascinate -fascinated -fascinates -fascinating -fascinatingly -fascination -fascinations -fascism -fascist -fascists -fashion -fashionable -fashionably -fashioned -fashioning -fashions -fast -fasted -fasten -fastened -fastener -fasteners -fastening -fastenings -fastens -faster -fastest -fastidious -fastidiously -fastidiousness -fasting -fastings -fastness -fastnesses -fasts -fat -fatal -fatalism -fatalist -fatalistic -fatalistically -fatalities -fatality -fatally -fatcat -fate -fated -fateful -fates -fatheadedness -father -fathered -fatherhood -fathering -fatherinlaw -fatherland -fatherless -fatherly -fathers -fathersinlaw -fathom -fathomed -fathoming -fathomless -fathoms -fatigue -fatigued -fatigues -fatiguing -fatless -fatness -fats -fatted -fatten -fattened -fattening -fattens -fatter -fattest -fattier -fattiest -fatty -fatuity -fatuous -fatuously -fatwa -faucet -faucets -fault -faulted -faulting -faultless -faultlessly -faults -faulty -faun -fauna -faunal -faunas -fauns -faust -faustus -favour -favourable -favourably -favoured -favouring -favourite -favourites -favouritism -favours -fawn -fawned -fawning -fawningly -fawns -fax -faxed -faxes -faxing -fealty -fear -feared -fearful -fearfully -fearfulness -fearing -fearless -fearlessly -fearlessness -fears -fearsome -fearsomely -fearsomeness -feasibility -feasible -feasibly -feast -feasted -feasting -feasts -feat -feather -feathered -feathering -featherlight -feathers -featherweight -feathery -feats -feature -featured -featureless -features -featuring -febrile -february -feckless -fecklessness -fecund -fecundity -fed -federal -federalism -federalist -federalists -federally -federate -federated -federation -federations -fedora -feds -fedup -fee -feeble -feebleminded -feebleness -feebler -feeblest -feebly -feed -feedback -feeder -feeders -feeding -feedings -feeds -feedstock -feedstuffs -feel -feeler -feelers -feeling -feelingly -feelings -feels -fees -feet -feign -feigned -feigning -feigns -feint -feinted -feinting -feints -feldspar -feldspars -felicia -felicitation -felicitations -felicities -felicitous -felicity -feline -felines -fell -fellatio -felled -feller -felling -fellow -fellows -fellowship -fellowships -fells -felon -felonious -felons -felony -felt -feltpen -female -femaleness -females -feminine -femininely -femininity -feminism -feminist -feminists -femur -femurs -fen -fence -fenced -fencepost -fencer -fencers -fences -fencing -fencings -fend -fended -fender -fenders -fending -fends -fenland -fennel -fens -feral -ferment -fermentation -fermented -fermenting -ferments -fermion -fermions -fern -ferns -ferny -ferocious -ferociously -ferociousness -ferocity -ferret -ferreted -ferreting -ferrets -ferric -ferried -ferries -ferrite -ferromagnetic -ferrous -ferrule -ferry -ferrying -ferryman -fertile -fertilisation -fertilise -fertilised -fertiliser -fertilisers -fertilises -fertilising -fertility -fervent -fervently -fervid -fervidly -fervour -fescue -fest -festal -fester -festered -festering -festers -festival -festivals -festive -festivities -festivity -festoon -festooned -festooning -festoons -fetal -fetch -fetched -fetches -fetching -fete -feted -fetes -fetid -fetish -fetishes -fetishism -fetishist -fetishistic -fetishists -fetlock -fetlocks -fetter -fettered -fetters -fettle -fetus -feud -feudal -feudalism -feuded -feuding -feudist -feuds -fever -fevered -feverish -feverishly -fevers -few -fewer -fewest -fewness -fez -fiance -fiancee -fiasco -fiat -fib -fibbed -fibber -fibbers -fibbing -fibers -fibre -fibreboard -fibred -fibreglass -fibres -fibrillating -fibrillation -fibroblast -fibroblasts -fibrosis -fibrous -fibs -fibula -fiche -fiches -fickle -fickleness -fiction -fictional -fictions -fictitious -fictive -ficus -fiddle -fiddled -fiddler -fiddlers -fiddles -fiddlesticks -fiddling -fiddlings -fiddly -fidelity -fidget -fidgeted -fidgeting -fidgets -fidgety -fiduciary -fief -fiefdom -fiefdoms -fiefs -field -fielded -fielder -fielders -fielding -fields -fieldwork -fieldworker -fieldworkers -fiend -fiendish -fiendishly -fiends -fierce -fiercely -fierceness -fiercer -fiercest -fierier -fieriest -fierily -fiery -fiesta -fiestas -fife -fifes -fifteen -fifteenth -fifth -fifthly -fifths -fifties -fiftieth -fifty -fig -fight -fightback -fighter -fighters -fighting -fights -figleaf -figment -figments -figs -figtree -figural -figuration -figurative -figuratively -figure -figured -figurehead -figureheads -figurer -figures -figurine -figurines -figuring -fiji -fijians -filament -filamentary -filamentous -filaments -filch -filched -file -filed -filer -filers -files -filet -filial -filibuster -filigree -filing -filings -fill -filled -filler -fillers -fillet -fillets -fillies -filling -fillings -fillip -fills -filly -film -filmed -filmic -filming -filmmakers -films -filmset -filmy -filter -filtered -filtering -filters -filth -filthier -filthiest -filthily -filthy -filtrate -filtration -fin -final -finale -finales -finalisation -finalise -finalised -finalising -finalist -finalists -finality -finally -finals -finance -financed -finances -financial -financially -financier -financiers -financing -finch -finches -find -findable -finder -finders -finding -findings -finds -fine -fined -finely -fineness -finer -finery -fines -finesse -finest -finetune -finetuned -finetunes -finetuning -finger -fingerboard -fingered -fingering -fingerings -fingerless -fingermarks -fingernail -fingernails -fingerprint -fingerprinted -fingerprinting -fingerprints -fingers -fingertip -fingertips -finial -finicky -fining -finis -finish -finished -finisher -finishers -finishes -finishing -finite -finitely -finiteness -finland -finn -finned -finnish -fins -fiord -fiords -fir -fire -firearm -firearms -fireball -fireballs -firebomb -firebombed -firebombing -firebombs -firebox -firebrand -firecontrol -fired -firefight -firefighter -firefighters -firefighting -fireflies -firefly -fireguard -firelight -firelighters -fireman -firemen -fireplace -fireplaces -firepower -fireproof -fireproofed -firer -fires -fireside -firesides -firewood -firework -fireworks -firing -firings -firkin -firm -firmament -firmed -firmer -firmest -firming -firmly -firmness -firms -firmware -firs -first -firstaid -firstborn -firstborns -firsthand -firstly -firsts -firth -fiscal -fiscally -fish -fished -fisher -fisheries -fisherman -fishermen -fishers -fishery -fishes -fishhook -fishhooks -fishier -fishiest -fishing -fishings -fishlike -fishmonger -fishmongers -fishnet -fishwife -fishy -fissile -fission -fissions -fissure -fissured -fissures -fist -fisted -fistful -fisticuffs -fists -fistula -fit -fitful -fitfully -fitfulness -fitly -fitment -fitments -fitness -fits -fitted -fitter -fitters -fittest -fitting -fittingly -fittings -five -fivefold -fiver -fivers -fives -fix -fixable -fixate -fixated -fixates -fixation -fixations -fixative -fixed -fixedly -fixer -fixers -fixes -fixing -fixings -fixture -fixtures -fizz -fizzed -fizzes -fizzier -fizziest -fizzing -fizzle -fizzled -fizzles -fizzy -fjord -fjords -flab -flabbergasted -flabbier -flabbiest -flabby -flabs -flaccid -flaccidity -flack -flag -flagella -flagellate -flagellation -flagged -flagging -flagon -flagons -flagpole -flagrant -flagrantly -flags -flagship -flagships -flair -flak -flake -flaked -flakes -flakiest -flaking -flaky -flamboyance -flamboyant -flamboyantly -flame -flamed -flamenco -flameproof -flames -flaming -flamingo -flammability -flammable -flan -flange -flanged -flanges -flank -flanked -flanker -flanking -flanks -flannel -flannelette -flannels -flans -flap -flapjack -flapped -flapper -flappers -flapping -flaps -flare -flared -flares -flareup -flareups -flaring -flash -flashback -flashbacks -flashbulb -flashed -flasher -flashes -flashier -flashiest -flashily -flashing -flashlight -flashlights -flashpoint -flashpoints -flashy -flask -flasks -flat -flatfish -flatly -flatmate -flatmates -flatness -flats -flatten -flattened -flattening -flattens -flatter -flattered -flatterer -flatterers -flattering -flatteringly -flatters -flattery -flattest -flattish -flatulence -flatulent -flatus -flatworms -flaunt -flaunted -flaunting -flaunts -flautist -flavour -flavoured -flavouring -flavourings -flavours -flaw -flawed -flawless -flawlessly -flaws -flax -flaxen -flay -flayed -flayer -flayers -flaying -flea -fleabites -fleas -fleck -flecked -flecks -fled -fledge -fledged -fledgeling -fledges -fledgling -fledglings -flee -fleece -fleeced -fleeces -fleecing -fleecy -fleeing -flees -fleet -fleeted -fleeter -fleeting -fleetingly -fleetly -fleets -flemish -flesh -fleshed -flesher -fleshes -fleshier -fleshiest -fleshing -fleshless -fleshly -fleshpots -fleshy -flew -flex -flexed -flexes -flexibilities -flexibility -flexible -flexibly -flexile -flexing -flexion -flexor -flick -flicked -flicker -flickered -flickering -flickers -flickery -flicking -flicks -flier -fliers -flies -flight -flighted -flightless -flightpath -flights -flighty -flimsier -flimsiest -flimsily -flimsiness -flimsy -flinch -flinched -flinching -fling -flinging -flings -flint -flintlock -flintlocks -flints -flinty -flip -flipflop -flipflops -flippable -flippancy -flippant -flippantly -flipped -flipper -flippers -flipping -flips -flirt -flirtation -flirtations -flirtatious -flirtatiously -flirted -flirting -flirts -flit -fliting -flits -flitted -flitting -float -floated -floater -floaters -floating -floats -floaty -flock -flocked -flocking -flocks -floe -flog -flogged -flogger -floggers -flogging -floggings -flogs -flood -flooded -floodgates -flooding -floodlight -floodlighting -floodlights -floodlit -floods -floor -floorboard -floorboards -floored -flooring -floors -floorspace -floozie -floozies -floozy -flop -flopped -flopper -floppier -floppies -floppiest -flopping -floppy -flops -flora -floral -floras -floreat -florence -floret -florid -florida -floridly -florin -florins -florist -florists -floss -flosses -flossing -flossy -flotation -flotations -flotilla -flotillas -flotsam -flounce -flounced -flounces -flouncing -flounder -floundered -floundering -flounders -flour -floured -flourish -flourished -flourishes -flourishing -flours -floury -flout -flouted -flouting -flouts -flow -flowed -flower -flowered -flowering -flowerless -flowerpot -flowerpots -flowers -flowery -flowing -flown -flows -flub -flubbed -fluctuate -fluctuated -fluctuates -fluctuating -fluctuation -fluctuations -flue -fluency -fluent -fluently -flues -fluff -fluffed -fluffier -fluffiest -fluffing -fluffs -fluffy -fluid -fluidised -fluidity -fluidly -fluids -fluke -flukes -flukey -flukier -flukiest -flumes -flumped -flung -flunked -fluor -fluoresce -fluorescence -fluorescent -fluoresces -fluorescing -fluoridation -fluoride -fluorine -fluorocarbon -fluorocarbons -flurried -flurries -flurry -flush -flushed -flusher -flushes -flushing -fluster -flustered -flute -fluted -flutes -fluting -flutist -flutter -fluttered -fluttering -flutters -fluttery -fluvial -flux -fluxes -fly -flyaway -flyer -flyers -flyhalf -flying -flyover -flyovers -flypaper -flypast -flyway -flyways -flyweight -flywheel -foal -foaled -foaling -foals -foam -foamed -foamier -foamiest -foaming -foams -foamy -fob -fobbed -fobbing -fobs -focal -focally -foci -focus -focused -focuses -focusing -focussed -focusses -focussing -fodder -fodders -foe -foehns -foes -foetal -foetid -foetus -foetuses -fog -fogbank -fogey -fogged -foggier -foggiest -fogging -foggy -foghorn -foghorns -fogs -fogy -foible -foibles -foil -foiled -foiling -foils -foist -foisted -foisting -fold -folded -folder -folders -folding -folds -foliage -foliate -foliated -folio -folk -folkart -folkish -folklore -folklorist -folklorists -folks -folktale -follicle -follicles -follicular -follies -follow -followable -followed -follower -followers -following -followings -follows -folly -foment -fomented -fomenting -fond -fondant -fonder -fondest -fondle -fondled -fondles -fondling -fondly -fondness -fondue -fondues -font -fontanel -fonts -food -foodless -foods -foodstuff -foodstuffs -fool -fooled -foolery -foolhardily -foolhardiness -foolhardy -fooling -foolish -foolishly -foolishness -foolproof -fools -foolscap -foot -footage -footages -football -footballer -footballers -footballing -footballs -footbath -footbridge -footed -footfall -footfalls -footgear -foothill -foothills -foothold -footholds -footing -footings -footless -footlights -footloose -footman -footmarks -footmen -footnote -footnotes -footpads -footpath -footpaths -footplate -footprint -footprints -footrest -foots -footsie -footsore -footstep -footsteps -footstool -footstools -footway -footwear -footwork -fop -fops -for -forage -foraged -foragers -forages -foraging -foramen -foray -forays -forbad -forbade -forbear -forbearance -forbearing -forbears -forbid -forbidden -forbidding -forbiddingly -forbids -forbore -force -forced -forcefeed -forcefeeding -forceful -forcefully -forcefulness -forceps -forces -forcible -forcibly -forcing -ford -forded -fording -fords -fore -forearm -forearmed -forearms -forebear -forebears -foreboded -foreboding -forebodings -forebrain -forecast -forecaster -forecasters -forecasting -forecasts -foreclose -foreclosed -foreclosure -forecourt -forecourts -foredeck -forefather -forefathers -forefinger -forefingers -forefront -foregather -foregathered -forego -foregoing -foregone -foreground -foregrounded -foregrounding -foregrounds -forehand -forehead -foreheads -foreign -foreigner -foreigners -foreignness -foreknowledge -foreland -foreleg -forelegs -forelimbs -forelock -foreman -foremen -foremost -forename -forenames -forensic -forensically -forepaw -forepaws -foreplay -forerunner -forerunners -foresail -foresaw -foresee -foreseeability -foreseeable -foreseeing -foreseen -foresees -foreshadow -foreshadowed -foreshadowing -foreshadows -foreshore -foreshores -foreshortened -foreshortening -foresight -foreskin -foreskins -forest -forestall -forestalled -forestalling -forestalls -forested -forester -foresters -forestry -forests -foretaste -foretastes -foretell -foretelling -forethought -foretold -forever -forewarn -forewarned -forewarning -foreword -forewords -forfeit -forfeited -forfeiting -forfeits -forfeiture -forgave -forge -forged -forger -forgeries -forgers -forgery -forges -forget -forgetful -forgetfulness -forgetmenot -forgetmenots -forgets -forgettable -forgetting -forging -forgings -forgivable -forgive -forgiven -forgiveness -forgives -forgiving -forgo -forgoing -forgone -forgot -forgotten -fork -forked -forking -forks -forlorn -forlornly -forlornness -form -formal -formaldehyde -formalin -formalisation -formalisations -formalise -formalised -formalises -formalising -formalism -formalisms -formalist -formalistic -formalities -formality -formally -formant -format -formated -formation -formations -formative -formats -formatted -formatting -formed -former -formerly -formers -formic -formidable -formidably -forming -formless -formlessness -formosa -forms -formula -formulae -formulaic -formulary -formulas -formulate -formulated -formulates -formulating -formulation -formulations -formulator -fornicate -fornicated -fornicates -fornicating -fornication -fornicator -fornicators -forsake -forsaken -forsakes -forsaking -forsook -forswear -forswearing -forswore -forsworn -forsythia -fort -forte -forth -forthcoming -forthright -forthrightly -forthrightness -forthwith -forties -fortieth -fortification -fortifications -fortified -fortify -fortifying -fortissimo -fortitude -fortknox -fortnight -fortnightly -fortnights -fortress -fortresses -forts -fortuitous -fortuitously -fortunate -fortunately -fortune -fortunes -fortuneteller -fortunetellers -fortunetelling -forty -forum -forums -forward -forwarded -forwarder -forwarding -forwardlooking -forwardly -forwardness -forwards -fossa -fossil -fossiliferous -fossilise -fossilised -fossilising -fossils -foster -fostered -fostering -fosters -fought -foul -fouled -fouler -foulest -fouling -foully -foulmouthed -foulness -fouls -foulup -foulups -found -foundation -foundational -foundations -founded -founder -foundered -foundering -founders -founding -foundling -foundries -foundry -founds -fount -fountain -fountains -founts -four -fourfold -fours -foursome -fourteen -fourteenth -fourth -fourthly -fourths -fowl -fowls -fox -foxed -foxes -foxhole -foxholes -foxhounds -foxhunt -foxhunting -foxhunts -foxier -foxiest -foxily -foxiness -foxing -foxtrot -foxtrots -foxy -foyer -foyers -fracas -fractal -fractals -fraction -fractional -fractionally -fractionate -fractionated -fractionating -fractionation -fractions -fractious -fracture -fractured -fractures -fracturing -fragile -fragility -fragment -fragmentary -fragmentation -fragmented -fragmenting -fragments -fragrance -fragrances -fragrant -frail -frailer -frailest -frailly -frailties -frailty -frame -framed -framer -framers -frames -frameup -framework -frameworks -framing -franc -france -franchise -franchised -franchisee -franchisees -franchises -franchising -franchisor -francophone -francs -frangipani -frank -franked -franker -frankest -frankfurter -frankincense -franking -frankly -frankness -franks -frantic -frantically -fraternal -fraternise -fraternising -fraternities -fraternity -fratricidal -fratricide -fraud -frauds -fraudster -fraudsters -fraudulent -fraudulently -fraught -fray -frayed -fraying -frays -frazzle -frazzled -freak -freaked -freakish -freaks -freaky -freckle -freckled -freckles -free -freebie -freebooters -freed -freedom -freedoms -freefall -freefalling -freeforall -freehand -freehold -freeholder -freeholders -freeholds -freeing -freelance -freelancer -freelancers -freelances -freelancing -freely -freeman -freemasonry -freemen -freer -freerange -frees -freesia -freesias -freestanding -freestyle -freeway -freewheeling -freewheels -freeze -freezer -freezers -freezes -freezing -freight -freighted -freighter -freighters -freights -french -frenetic -frenetically -frenzied -frenziedly -frenzies -frenzy -freon -freons -frequencies -frequency -frequent -frequented -frequenting -frequently -frequents -fresco -fresh -freshen -freshened -freshener -fresheners -freshening -freshens -fresher -freshers -freshest -freshly -freshman -freshmen -freshness -freshwater -fret -fretboard -fretful -fretfully -fretfulness -fretless -frets -fretsaw -fretsaws -fretted -fretting -fretwork -freud -freya -friable -friar -friars -friary -fricative -fricatives -friction -frictional -frictionless -frictions -friday -fridays -fridge -fridges -fried -friend -friendless -friendlessness -friendlier -friendlies -friendliest -friendlily -friendliness -friendly -friends -friendship -friendships -friers -fries -frieze -friezes -frigate -frigates -fright -frighted -frighten -frightened -frighteners -frightening -frighteningly -frightens -frightful -frightfully -frights -frigid -frigidity -frigidly -frijole -frill -frilled -frillier -frilliest -frills -frilly -fringe -fringed -fringes -fringing -fringy -frippery -frisk -frisked -friskier -friskiest -friskily -frisking -frisks -frisky -frisson -fritter -frittered -frittering -fritters -frivol -frivolities -frivolity -frivolous -frivolously -frivols -frizzle -frizzles -frizzy -fro -frock -frocks -frog -froggy -frogman -frogmarched -frogmen -frogs -frolic -frolicked -frolicking -frolics -frolicsome -from -frond -fronds -front -frontage -frontages -frontal -frontally -frontals -fronted -frontier -frontiers -fronting -frontispiece -frontispieces -frontline -frontpage -fronts -frost -frostbite -frostbitten -frosted -frostier -frostiest -frostily -frosting -frosts -frosty -froth -frothed -frothier -frothiest -frothing -froths -frothy -froward -frown -frowned -frowning -frowningly -frowns -froze -frozen -fructose -frugal -frugality -frugally -fruit -fruitcake -fruitcakes -fruited -fruiter -fruitful -fruitfully -fruitfulness -fruitier -fruitiest -fruitiness -fruiting -fruition -fruitless -fruitlessly -fruitlessness -fruits -fruity -frumps -frumpy -frustrate -frustrated -frustratedly -frustrates -frustrating -frustratingly -frustration -frustrations -frustum -fry -fryer -fryers -frying -fryings -fuchsia -fuchsias -fuddle -fuddled -fuddles -fudge -fudged -fudges -fudging -fuel -fuelled -fuelling -fuels -fug -fugal -fugitive -fugitives -fugue -fugues -fuhrer -fulcrum -fulfil -fulfilled -fulfilling -fulfilment -fulfils -full -fullback -fullbacks -fullblooded -fullblown -fullbodied -fullcolour -fuller -fullest -fullgrown -fulling -fullish -fulllength -fullmoon -fullness -fullpage -fullscale -fullstop -fullstops -fulltime -fulltimer -fulltimers -fully -fulminant -fulminate -fulminating -fulmination -fulminations -fulsome -fulsomely -fumarole -fumaroles -fumble -fumbled -fumbles -fumbling -fume -fumed -fumes -fumigate -fumigating -fumigation -fuming -fumingly -fun -function -functional -functionalism -functionalist -functionalities -functionality -functionally -functionaries -functionary -functioned -functioning -functionless -functions -fund -fundamental -fundamentalism -fundamentalist -fundamentalists -fundamentally -fundamentals -funded -fundholders -fundholding -funding -fundings -fundraiser -fundraisers -fundraising -funds -funeral -funerals -funerary -funereal -funfair -fungal -fungi -fungicidal -fungicide -fungicides -fungoid -fungous -fungus -funguses -funicular -funk -funked -funkier -funky -funnel -funnelled -funnelling -funnels -funnier -funnies -funniest -funnily -funny -fur -furbished -furbishing -furies -furious -furiously -furled -furling -furlong -furlongs -furlough -furls -furnace -furnaces -furnish -furnished -furnishers -furnishes -furnishing -furnishings -furniture -furore -furores -furred -furrier -furriers -furriest -furriness -furring -furrow -furrowed -furrows -furry -furs -further -furtherance -furthered -furthering -furthermore -furthers -furthest -furtive -furtively -furtiveness -fury -furze -fuse -fused -fuselage -fuses -fusible -fusilier -fusiliers -fusillade -fusing -fusion -fusions -fuss -fussed -fusses -fussier -fussiest -fussily -fussiness -fussing -fussy -fustian -fusty -futile -futilely -futility -futon -future -futures -futurism -futurist -futuristic -futurists -futurity -futurologists -fuzz -fuzzed -fuzzes -fuzzier -fuzziest -fuzzily -fuzziness -fuzzy -gab -gabble -gabbled -gabbles -gabbling -gaberdine -gable -gabled -gables -gabon -gad -gadded -gadding -gadfly -gadget -gadgetry -gadgets -gaff -gaffe -gaffes -gag -gaga -gage -gagged -gagging -gaggle -gaggled -gaging -gags -gagster -gaiety -gaijin -gaily -gain -gained -gainer -gainers -gainful -gainfully -gaining -gainly -gains -gainsay -gainsaying -gait -gaiter -gaiters -gaits -gal -gala -galactic -galas -galaxies -galaxy -gale -galena -gales -galilean -galileo -gall -gallant -gallantly -gallantries -gallantry -gallants -galled -galleon -galleons -galleried -galleries -gallery -galley -galleys -gallic -galling -gallium -gallivanted -gallivanting -gallon -gallons -gallop -galloped -galloping -gallops -gallows -galls -gallstones -galop -galore -galoshes -gals -galvanic -galvanise -galvanised -galvanising -galvanometer -galvanometric -gambia -gambian -gambit -gambits -gamble -gambled -gambler -gamblers -gambles -gambling -gambol -gambolling -gambols -game -gamed -gamekeeper -gamekeepers -gamely -gamers -games -gamesmanship -gamesmen -gamete -gametes -gaming -gamma -gammon -gamut -gamy -gander -ganders -gandhi -gang -ganged -ganger -gangers -ganges -ganging -gangland -ganglia -gangling -ganglion -ganglionic -gangly -gangplank -gangrene -gangrenous -gangs -gangster -gangsterism -gangsters -gangway -gangways -gannet -gannets -gantries -gantry -gaol -gaoled -gaoler -gaolers -gaols -gap -gape -gaped -gapes -gaping -gapingly -gaps -garage -garaged -garages -garb -garbage -garbed -garble -garbled -garbles -garbling -garbs -garden -gardener -gardeners -gardening -gardens -gargantuan -gargle -gargled -gargles -gargling -gargoyle -gargoyles -garish -garishly -garland -garlanded -garlands -garlic -garment -garments -garner -garnered -garnering -garnet -garnets -garnish -garnished -garnishing -garotte -garotted -garottes -garotting -garret -garrets -garrison -garrisoned -garrisons -garrotte -garrotted -garrottes -garrotting -garrulous -garter -garters -gas -gaseous -gases -gash -gashed -gashes -gashing -gasholder -gasify -gasket -gaskets -gaslight -gasometer -gasp -gasped -gasper -gasping -gasps -gassed -gasses -gassier -gassiest -gassing -gassy -gastrectomy -gastric -gastritis -gastroenteritis -gastrointestinal -gastronomic -gastronomy -gastropod -gastropods -gasworks -gate -gateau -gateaus -gateaux -gatecrash -gatecrashed -gatecrasher -gatecrashers -gatecrashing -gated -gatehouse -gatehouses -gatekeeper -gatekeepers -gatepost -gateposts -gates -gateway -gateways -gather -gathered -gatherer -gatherers -gathering -gatherings -gathers -gating -gauche -gaucheness -gaucherie -gaud -gaudiest -gaudily -gaudiness -gaudy -gauge -gauged -gauges -gauging -gaul -gauls -gaunt -gaunter -gauntlet -gauntlets -gauntly -gauze -gave -gavel -gavial -gavials -gavotte -gawk -gawking -gawky -gawpin -gay -gayest -gays -gaze -gazebo -gazed -gazelle -gazelles -gazes -gazette -gazetteer -gazettes -gazing -gdansk -gear -gearbox -gearboxes -geared -gearing -gears -gearstick -gecko -geek -geeks -geese -geezer -geiger -geisha -geishas -gel -gelatin -gelatine -gelatinous -gelding -geldings -gelignite -gelled -gels -gem -gemini -gemmed -gems -gemsbok -gemstone -gemstones -gen -gender -gendered -genderless -genders -gene -genealogical -genealogies -genealogist -genealogy -genera -general -generalisable -generalisation -generalisations -generalise -generalised -generalises -generalising -generalist -generalists -generalities -generality -generally -generals -generalship -generate -generated -generates -generating -generation -generational -generations -generative -generator -generators -generic -generically -generosities -generosity -generous -generously -genes -genesis -genetic -genetically -geneticist -geneticists -genetics -genets -geneva -genial -geniality -genially -genie -genii -genital -genitalia -genitals -genitive -genitives -genius -geniuses -genoa -genocidal -genocide -genome -genomes -genomic -genotype -genotypes -genre -genres -gent -genteel -genteelest -genteelly -gentians -gentile -gentiles -gentility -gentle -gentlefolk -gentleman -gentlemanly -gentlemen -gentleness -gentler -gentlest -gentling -gently -gentrification -gentrified -gentrifying -gentry -gents -genuflect -genuflections -genuine -genuinely -genuineness -genus -geocentric -geochemical -geochemistry -geodesic -geodesics -geographer -geographers -geographic -geographical -geographically -geography -geologic -geological -geologically -geologist -geologists -geology -geomagnetic -geomagnetically -geomagnetism -geometer -geometers -geometric -geometrical -geometrically -geometries -geometry -geomorphological -geomorphologists -geomorphology -geophysical -geophysicist -geophysicists -geophysics -geopolitical -george -georgia -geoscientific -geostationary -geosynchronous -geothermal -geranium -geraniums -gerbil -gerbils -geriatric -geriatrics -germ -german -germane -germanic -germanium -germans -germany -germicidal -germicides -germinal -germinate -germinated -germinating -germination -germs -gerontocracy -gerontologist -gerontology -gerrymander -gerrymandered -gerund -gerundive -gestalt -gestapo -gestate -gestating -gestation -gestational -gesticulate -gesticulated -gesticulating -gesticulation -gesticulations -gestural -gesture -gestured -gestures -gesturing -get -getable -getaway -getrichquick -gets -gettable -getter -getting -geyser -geysers -ghana -ghanian -ghastlier -ghastliest -ghastliness -ghastly -gherkin -gherkins -ghetto -ghost -ghosted -ghosting -ghostlier -ghostliest -ghostlike -ghostly -ghosts -ghoul -ghoulish -ghouls -giant -giantess -giantism -giantkiller -giantkillers -giants -gibber -gibbered -gibbering -gibberish -gibbet -gibbets -gibbon -gibbons -gibbous -gibed -gibes -giblets -giddier -giddiest -giddily -giddiness -giddy -gift -gifted -gifting -gifts -giftware -gig -gigabytes -gigantic -gigantically -gigavolt -giggle -giggled -giggles -giggling -giggly -gigolo -gilded -gilders -gilding -gilds -gill -gillie -gills -gilt -giltedged -gilts -gimcrack -gimlet -gimlets -gimmick -gimmickry -gimmicks -gimmicky -gin -ginger -gingerbread -gingerly -gingers -gingery -gingham -gingivitis -gins -ginseng -gipsies -gipsy -giraffe -giraffes -gird -girded -girder -girders -girding -girdle -girdled -girdles -girdling -girl -girlfriend -girlfriends -girlhood -girlie -girlish -girlishly -girlishness -girls -giro -girt -girth -girths -gist -give -giveaway -given -giver -givers -gives -giving -givings -gizzard -glace -glacial -glacially -glaciated -glaciation -glaciations -glacier -glaciers -glaciological -glaciologist -glaciologists -glaciology -glad -gladden -gladdened -gladdening -gladdens -gladder -gladdest -glade -glades -gladiator -gladiatorial -gladiators -gladioli -gladiolus -gladly -gladness -glamorous -glamour -glance -glanced -glances -glancing -gland -glands -glandular -glans -glare -glared -glares -glaring -glaringly -glasgow -glasnost -glass -glassed -glasses -glassful -glasshouse -glasshouses -glassier -glassiest -glassless -glassware -glassy -glaucoma -glaucous -glaze -glazed -glazer -glazes -glazier -glaziers -glazing -gleam -gleamed -gleaming -gleams -glean -gleaned -gleaning -gleanings -gleans -glebe -glee -gleeful -gleefully -gleefulness -glen -glenn -glens -glia -glib -glibly -glibness -glide -glided -glider -gliders -glides -gliding -glim -glimmer -glimmered -glimmering -glimmerings -glimmers -glimpse -glimpsed -glimpses -glimpsing -glint -glinted -glinting -glints -glisten -glistened -glistening -glistens -glitter -glittered -glittering -glitters -glittery -glitzy -gloaming -gloat -gloated -gloating -glob -global -globalisation -globally -globe -globed -globes -globetrotters -globetrotting -globose -globular -globule -globules -gloom -gloomful -gloomier -gloomiest -gloomily -gloominess -glooms -gloomy -gloried -glories -glorification -glorified -glorifies -glorify -glorifying -glorious -gloriously -glory -glorying -gloss -glossaries -glossary -glossed -glosses -glossier -glossiest -glossily -glossing -glossy -glottal -glove -gloved -gloves -glow -glowed -glower -glowered -glowering -glowers -glowing -glowingly -glows -glowworm -glowworms -glucose -glue -glued -glueing -glues -gluey -gluing -glum -glumly -gluon -glut -glutamate -gluten -glutinous -glutted -glutton -gluttonous -gluttons -gluttony -glycerine -glycerol -glycine -glycol -glyph -glyphs -gnarl -gnarled -gnarling -gnarls -gnash -gnashed -gnashes -gnashing -gnat -gnats -gnaw -gnawed -gnawer -gnawers -gnawing -gnaws -gneiss -gnome -gnomes -gnomic -gnostic -gnosticism -gnu -gnus -go -goad -goaded -goading -goads -goahead -goal -goalies -goalkeeper -goalkeepers -goalkeeping -goalless -goalmouth -goalpost -goalposts -goals -goalscorer -goalscorers -goalscoring -goat -goatee -goatees -goats -goatskin -gobbet -gobbets -gobble -gobbled -gobbledegook -gobbledygook -gobbler -gobbles -gobbling -gobetween -gobi -gobies -goblet -goblets -goblin -goblins -god -godchild -goddess -goddesses -godfather -godfathers -godforsaken -godhead -godless -godlessness -godlier -godlike -godliness -godly -godmother -godmothers -godparents -gods -godsend -godson -godsons -goer -goers -goes -goethe -gofer -goggled -goggles -goggling -going -goings -goitre -goitres -gold -golden -goldfish -golds -goldsmith -goldsmiths -golf -golfer -golfers -golfing -golgotha -goliath -golliwog -golly -gonad -gonads -gondola -gondolas -gondolier -gondoliers -gone -gong -gongs -gonorrhoea -goo -good -goodbye -goodbyes -goodfornothing -goodfornothings -goodhope -goodhumoured -goodhumouredly -goodies -goodish -goodlooking -goodly -goodnatured -goodnaturedly -goodness -goodnight -goods -goodtempered -goodwill -goody -gooey -goof -goofed -goofing -goofs -goofy -googlies -googly -goon -goons -goose -gooseberries -gooseberry -goosestep -goosestepping -gopher -gophers -gordian -gore -gored -gores -gorge -gorged -gorgeous -gorgeously -gorgeousness -gorges -gorging -gorgon -gorgons -gorier -goriest -gorilla -gorillas -goring -gormless -gorse -gory -gosh -gosling -goslings -goslow -goslows -gospel -gospels -gossamer -gossip -gossiped -gossiping -gossips -gossipy -got -goth -gothic -goths -gotten -gouda -gouge -gouged -gouges -gouging -goulash -gourd -gourds -gourmand -gourmet -gourmets -gout -govern -governance -governed -governess -governesses -governing -government -governmental -governments -governor -governors -governorship -governorships -governs -gown -gowned -gowns -grab -grabbed -grabber -grabbers -grabbing -grabs -grace -graced -graceful -gracefully -gracefulness -graceless -gracelessly -graces -gracing -gracious -graciously -graciousness -gradation -gradations -grade -graded -grader -graders -grades -gradient -gradients -grading -gradings -gradual -gradualism -gradualist -gradually -graduand -graduands -graduate -graduated -graduates -graduating -graduation -graduations -graffiti -graffito -graft -grafted -grafting -grafts -graham -grail -grails -grain -grained -grainier -grainiest -graininess -grains -grainy -gram -grammar -grammarian -grammarians -grammars -grammatical -grammatically -gramme -grammes -gramophone -gramophones -grams -granaries -granary -grand -grandads -grandchild -grandchildren -granddad -granddaughter -granddaughters -grandee -grandees -grander -grandest -grandeur -grandfather -grandfathers -grandiloquent -grandiose -grandiosity -grandly -grandma -grandmas -grandmaster -grandmasters -grandmother -grandmothers -grandpa -grandparent -grandparents -grandpas -grands -grandson -grandsons -grandstand -grange -granite -granites -granitic -grannie -grannies -granny -grant -granted -grantee -granting -grants -granular -granularity -granulated -granulation -granule -granules -granulocyte -grape -grapefruit -grapes -grapeshot -grapevine -graph -graphed -graphic -graphical -graphically -graphics -graphite -graphologist -graphologists -graphology -graphs -grapnel -grapple -grappled -grapples -grappling -graptolites -grasp -grasped -grasper -grasping -grasps -grass -grassed -grasses -grasshopper -grasshoppers -grassier -grassiest -grassland -grasslands -grassroots -grassy -grate -grated -grateful -gratefully -grater -graters -grates -graticule -gratification -gratifications -gratified -gratifies -gratify -gratifying -gratifyingly -grating -gratings -gratis -gratitude -gratuities -gratuitous -gratuitously -gratuitousness -gratuity -grave -gravedigger -gravediggers -gravel -gravelled -gravelly -gravels -gravely -graven -graver -graves -graveside -gravest -gravestone -gravestones -graveyard -graveyards -gravies -gravitas -gravitate -gravitated -gravitating -gravitation -gravitational -gravitationally -gravities -graviton -gravitons -gravity -gravures -gravy -graze -grazed -grazer -grazes -grazing -grease -greased -greasepaint -greaseproof -greasers -greases -greasier -greasiest -greasing -greasy -great -greataunt -greataunts -greatcoat -greatcoats -greater -greatest -greatgrandchildren -greatgranddaughter -greatgrandfather -greatgrandmother -greatgrandmothers -greatgrandson -greatly -greatness -grecian -greece -greed -greedier -greediest -greedily -greediness -greeds -greedy -greek -greeks -green -greened -greener -greenery -greenest -greeneyed -greenfield -greenfly -greengages -greengrocer -greengrocers -greengrocery -greenhorn -greenhorns -greenhouse -greenhouses -greenie -greening -greenish -greenly -greenness -greens -greenstone -greensward -greenwich -greet -greeted -greeting -greetings -greets -gregarious -gregariously -gregariousness -gremlin -gremlins -grenade -grenades -grenadier -grenadiers -grew -grey -greybeard -greyed -greyer -greyest -greyhound -greyhounds -greying -greyish -greyness -greys -grid -gridded -gridiron -gridlock -grids -grief -griefs -grievance -grievances -grieve -grieved -griever -grievers -grieves -grieving -grievous -grievously -griffin -griffins -griffon -grill -grille -grilled -grilles -grilling -grills -grim -grimace -grimaced -grimaces -grimacing -grime -grimiest -grimly -grimm -grimmer -grimmest -grimness -grimy -grin -grind -grinded -grinder -grinders -grinding -grinds -grindstone -grinned -grinner -grinning -grins -grip -gripe -griped -gripes -griping -gripped -gripper -grippers -gripping -grips -grislier -grisliest -grisly -grist -gristle -grit -grits -gritted -grittier -grittiest -gritting -gritty -grizzled -grizzlier -grizzliest -grizzly -groan -groaned -groaner -groaners -groaning -groans -groat -groats -grocer -groceries -grocers -grocery -grog -groggiest -groggily -groggy -groin -groins -grommet -grommets -groom -groomed -groomer -groomers -grooming -grooms -groove -grooved -grooves -groovier -grooving -groovy -grope -groped -groper -gropers -gropes -groping -gropingly -gropings -gross -grossed -grosser -grossest -grossly -grossness -grotesque -grotesquely -grotesqueness -grotto -grouch -grouchy -ground -grounded -grounding -groundless -groundnut -groundnuts -grounds -groundsheet -groundsman -groundswell -groundwater -groundwork -group -grouped -grouper -groupie -groupies -grouping -groupings -groups -grouse -grouses -grout -grouting -grove -grovel -grovelled -groveller -grovelling -grovels -groves -grow -grower -growers -growing -growl -growled -growler -growling -growls -grown -grownup -grownups -grows -growth -growths -grub -grubbed -grubbier -grubbiest -grubbing -grubby -grubs -grudge -grudges -grudging -grudgingly -gruel -grueling -gruelling -gruesome -gruesomely -gruesomeness -gruff -gruffly -gruffness -grumble -grumbled -grumbler -grumbles -grumbling -grumblings -grumpier -grumpiest -grumpily -grumps -grumpy -grunge -grunt -grunted -grunter -grunting -grunts -guacamole -guanaco -guanine -guano -guarantee -guaranteed -guaranteeing -guarantees -guarantor -guarantors -guard -guarded -guardedly -guardedness -guardhouse -guardian -guardians -guardianship -guarding -guardroom -guards -guardsman -guardsmen -guava -guavas -gubernatorial -gudgeon -guerilla -guerillas -guerrilla -guerrillas -guess -guessable -guessed -guesses -guessing -guesswork -guest -guesting -guests -guffaw -guffawed -guffaws -guidance -guide -guidebook -guidebooks -guided -guideline -guidelines -guider -guiders -guides -guiding -guidings -guild -guilder -guilders -guilds -guile -guileless -guilelessness -guillemot -guillemots -guillotine -guillotined -guillotines -guillotining -guilt -guiltier -guiltiest -guiltily -guiltiness -guiltless -guilts -guilty -guinea -guineas -guise -guises -guitar -guitarist -guitarists -guitars -gulf -gulfs -gulfwar -gull -gullet -gullets -gulley -gulleys -gullibility -gullible -gullies -gulls -gully -gulp -gulped -gulping -gulps -gum -gumboil -gumboils -gumboots -gumdrop -gumdrops -gummed -gumming -gums -gumshoe -gumtree -gumtrees -gun -gunboat -gunboats -gunfight -gunfire -gunfires -gunite -gunk -gunman -gunmen -gunmetal -gunned -gunner -gunners -gunnery -gunning -gunpoint -gunpowder -guns -gunship -gunships -gunshot -gunshots -gunsight -gunsmith -gunsmiths -gunwale -gunwales -guppies -guppy -gurgle -gurgled -gurgles -gurgling -guru -gurus -gush -gushed -gusher -gushes -gushing -gusset -gust -gusted -gustier -gustiest -gusting -gusto -gusts -gusty -gut -gutless -guts -gutsier -gutsy -gutted -gutter -guttered -guttering -gutters -guttersnipe -guttersnipes -gutting -guttural -gutturally -guy -guys -guzzle -guzzled -guzzler -guzzlers -guzzling -gym -gymkhana -gymnasia -gymnasium -gymnasiums -gymnast -gymnastic -gymnastics -gymnasts -gyms -gynaecological -gynaecologist -gynaecologists -gynaecology -gypsies -gypsum -gypsy -gyrate -gyrated -gyrates -gyrating -gyration -gyrations -gyro -gyromagnetic -gyroscope -gyroscopes -gyroscopic -ha -haberdasher -haberdashers -haberdashery -habit -habitability -habitable -habitat -habitation -habitations -habitats -habitforming -habits -habitual -habitually -habituate -habituated -habituation -hacienda -hack -hackable -hacked -hacker -hackers -hacking -hackle -hackles -hackling -hackney -hackneyed -hacks -hacksaw -had -haddock -haddocks -hades -hadnt -hadron -hadrons -haematological -haematologist -haematology -haematoma -haematuria -haemoglobin -haemolytic -haemophilia -haemophiliac -haemophiliacs -haemorrhage -haemorrhages -haemorrhagic -haemorrhaging -haemorrhoid -haemorrhoids -haft -hafts -hag -haggard -haggardness -haggis -haggle -haggled -haggler -haggling -hagiography -hags -haha -haiku -hail -hailed -hailing -hails -hailstone -hailstones -hailstorm -hailstorms -hair -hairbrush -haircare -haircut -haircuts -hairdo -hairdresser -hairdressers -hairdressing -haired -hairier -hairiest -hairiness -hairless -hairline -hairnet -hairpiece -hairpin -hairpins -hairraising -hairs -hairsplitting -hairspray -hairsprays -hairstyle -hairstyles -hairstyling -hairy -haiti -haitian -hake -hakea -hale -half -halfhearted -halfheartedly -halfheartedness -halfhour -halfhourly -halfhours -halfsister -halftruth -halftruths -halfway -halibut -halifax -halite -halitosis -hall -hallelujah -hallmark -hallmarks -hallo -hallow -hallowed -hallows -halls -hallucinate -hallucinated -hallucinating -hallucination -hallucinations -hallucinatory -hallway -hallways -halo -haloed -halogen -halogenated -halogens -halon -halons -halt -halted -halter -haltered -halters -halting -haltingly -halts -halve -halved -halves -halving -ham -hamburg -hamburger -hamburgers -hamitic -hamlet -hamlets -hammer -hammered -hammerhead -hammering -hammers -hammock -hammocks -hamper -hampered -hampering -hampers -hams -hamster -hamsters -hamstring -hamstrings -hamstrung -hand -handbag -handbags -handball -handbasin -handbell -handbill -handbills -handbook -handbooks -handbrake -handbrakes -handcar -handcart -handcuff -handcuffed -handcuffing -handcuffs -handed -handedness -handel -handful -handfuls -handgun -handguns -handhold -handholds -handicap -handicapped -handicapping -handicaps -handicraft -handicrafts -handier -handiest -handily -handing -handiwork -handkerchief -handkerchiefs -handle -handlebar -handlebars -handled -handler -handlers -handles -handling -handmade -handmaiden -handmaidens -handout -handouts -handover -handovers -handpicked -handrail -handrails -hands -handset -handsets -handshake -handshakes -handshaking -handsome -handsomely -handsomeness -handsomer -handsomest -handstand -handstands -handwriting -handwritten -handy -handyman -handymen -hang -hangar -hangars -hangdog -hanged -hanger -hangers -hangglide -hangglided -hangglider -hanggliders -hangglides -hanggliding -hanging -hangings -hangman -hangmen -hangouts -hangover -hangovers -hangs -hangup -hanker -hankered -hankering -hankers -hankie -hankies -hanoi -hanover -hansard -hansom -haphazard -haphazardly -hapless -happen -happened -happening -happenings -happens -happier -happiest -happily -happiness -happy -happygolucky -harangue -harangued -harangues -haranguing -harare -harass -harassed -harassers -harasses -harassing -harassment -harbinger -harbingers -harbour -harboured -harbouring -harbours -hard -hardback -hardbacks -hardboard -hardboiled -hardcore -hardearned -harden -hardened -hardener -hardeners -hardening -hardens -harder -hardest -hardheaded -hardhearted -hardheartedness -hardhit -hardhitting -hardier -hardiest -hardily -hardiness -hardline -hardliner -hardliners -hardly -hardness -hardpressed -hardship -hardships -hardup -hardware -hardwood -hardwoods -hardworking -hardy -hare -harebell -harebells -harebrained -hared -harem -harems -hares -hark -harked -harken -harkened -harkens -harking -harks -harlequin -harlequins -harlot -harlots -harm -harmed -harmer -harmful -harmfully -harmfulness -harming -harmless -harmlessly -harmlessness -harmonic -harmonica -harmonically -harmonics -harmonies -harmonious -harmoniously -harmonisation -harmonise -harmonised -harmonising -harmonium -harmony -harms -harness -harnessed -harnesses -harnessing -harp -harped -harping -harpist -harpists -harpoon -harpoons -harps -harpsichord -harpsichords -harridan -harried -harrier -harriers -harrow -harrowed -harrowing -harrows -harry -harrying -harsh -harshen -harshens -harsher -harshest -harshly -harshness -hart -harts -harvard -harvest -harvested -harvester -harvesters -harvesting -harvests -has -hasbeen -hasbeens -hash -hashed -hashes -hashing -hashish -hasnt -hasp -hassle -haste -hasted -hasten -hastened -hastening -hastens -hastes -hastier -hastiest -hastily -hastiness -hasty -hat -hatch -hatchback -hatchbacks -hatched -hatcheries -hatchery -hatches -hatchet -hatchets -hatching -hatchway -hate -hated -hateful -hatefully -hater -haters -hates -hatful -hating -hatless -hatrack -hatracks -hatred -hatreds -hats -hatstands -hatted -hatter -hatters -hattrick -hattricks -haughtier -haughtiest -haughtily -haughtiness -haughty -haul -haulage -haulages -hauled -hauler -haulers -haulier -hauliers -hauling -haulms -hauls -haunch -haunches -haunt -haunted -haunting -hauntingly -haunts -hauteur -havana -have -haven -havenots -havens -havent -havering -haversack -haves -having -havoc -hawaii -hawaiian -hawk -hawked -hawker -hawkers -hawking -hawkish -hawks -hawser -hawsers -hawthorn -hawthorns -hay -haydn -hayfever -hayfield -hayloft -haystack -haystacks -haywain -haywire -hazard -hazarded -hazarding -hazardous -hazards -haze -hazel -hazelnut -hazelnuts -hazier -haziest -hazily -haziness -hazy -he -head -headache -headaches -headband -headbands -headboard -headboards -headcount -headdress -headdresses -headed -header -headers -headfast -headgear -headhunted -headhunters -headier -headiest -heading -headings -headlamp -headlamps -headland -headlands -headless -headlight -headlights -headline -headlined -headlines -headlining -headlock -headlong -headman -headmaster -headmasters -headmastership -headmen -headmistress -headmistresses -headnote -headon -headphone -headphones -headpiece -headquarters -headrest -headroom -heads -headscarf -headscarves -headset -headsets -headship -headstand -headstock -headstone -headstones -headstrong -headwaters -headway -headwind -headwinds -headword -headwords -headwork -heady -heal -healed -healer -healers -healing -heals -health -healthful -healthier -healthiest -healthily -healthiness -healths -healthy -heap -heaped -heaping -heaps -hear -hearable -heard -hearer -hearers -hearing -hearings -hearken -hearkened -hearkening -hearkens -hears -hearsay -hearse -hearses -heart -heartache -heartbeat -heartbeats -heartbreak -heartbreaking -heartbreaks -heartbroken -heartburn -hearten -heartened -heartening -heartfelt -hearth -hearthrug -hearths -hearties -heartiest -heartily -heartiness -heartland -heartlands -heartless -heartlessly -heartlessness -heartrending -hearts -heartsearching -heartstrings -hearttoheart -heartwarming -heartwood -hearty -heat -heated -heatedly -heater -heaters -heath -heathen -heathenish -heathenism -heathens -heather -heathers -heathery -heathland -heaths -heating -heatresistant -heats -heatwave -heave -heaved -heaveho -heaven -heavenly -heavens -heavensent -heavenward -heavenwards -heaves -heavier -heavies -heaviest -heavily -heaviness -heaving -heavings -heavy -heavyduty -heavyweight -heavyweights -hebrew -hebrews -heck -heckle -heckled -heckler -hecklers -heckles -heckling -hectare -hectares -hectic -hectically -hectolitres -hector -hectoring -hedge -hedged -hedgehog -hedgehogs -hedgerow -hedgerows -hedges -hedging -hedonism -hedonist -hedonistic -hedonists -heed -heeded -heedful -heeding -heedless -heedlessly -heedlessness -heeds -heel -heeled -heels -heft -hefted -heftier -hefting -hefty -hegemonic -hegemony -heifer -heifers -height -heighten -heightened -heightening -heightens -heights -heinous -heir -heiress -heiresses -heirloom -heirlooms -heirs -heist -heists -held -helen -helical -helices -helicopter -helicopters -heliocentric -heliography -heliosphere -heliotrope -helipad -helium -helix -helixes -hell -hellenic -hellfire -hellish -hellishly -hello -hellraiser -hells -helm -helmet -helmeted -helmets -helms -helmsman -helots -help -helped -helper -helpers -helpful -helpfully -helpfulness -helping -helpings -helpless -helplessly -helplessness -helpline -helplines -helpmate -helpmates -helps -helsinki -helterskelter -hem -heman -hemen -hemisphere -hemispheres -hemispheric -hemispherical -hemline -hemlines -hemlock -hemmed -hemming -hemp -hems -hen -hence -henceforth -henceforward -henchman -henchmen -henge -henna -henpeck -henry -hens -hepatic -hepatitis -heptagon -heptagonal -heptagons -heptane -her -herald -heralded -heraldic -heralding -heraldry -heralds -herb -herbaceous -herbage -herbal -herbalism -herbalist -herbalists -herbicide -herbicides -herbivore -herbivores -herbivorous -herbs -herd -herded -herding -herds -herdsman -herdsmen -here -hereabouts -hereafter -hereby -hereditary -heredity -herein -hereinafter -hereof -heresies -heresy -heretic -heretical -heretics -hereto -heretofore -hereunder -hereupon -herewith -heritability -heritable -heritage -heritors -herm -hermaphrodite -hermaphrodites -hermaphroditic -hermeneutic -hermeneutics -hermetic -hermetically -hermit -hermitage -hermits -hernia -hernias -hero -herod -heroic -heroical -heroically -heroics -heroin -heroine -heroines -heroism -heron -heronry -herons -herpes -herring -herringbone -herrings -hers -herself -hertz -hesitancy -hesitant -hesitantly -hesitate -hesitated -hesitates -hesitating -hesitatingly -hesitation -hesitations -heterodox -heterodoxy -heterogeneity -heterogeneous -heterologous -heterosexist -heterosexual -heterosexuality -heterosexually -heterosexuals -heterozygous -heuristic -heuristically -heuristics -hew -hewed -hewer -hewing -hewn -hex -hexadecimal -hexagon -hexagonal -hexagons -hexagram -hexagrams -hexameter -hexane -hexed -hey -heyday -heydays -hi -hiatus -hiatuses -hibernal -hibernate -hibernating -hibernation -hibiscus -hic -hiccough -hiccup -hiccups -hickory -hid -hidden -hide -hideandseek -hideaway -hideaways -hidebound -hideous -hideously -hideousness -hideout -hideouts -hider -hides -hiding -hidings -hierarch -hierarchic -hierarchical -hierarchically -hierarchies -hierarchy -hieratic -hieroglyph -hieroglyphic -hieroglyphics -hieroglyphs -higgledypiggledy -high -highbrow -higher -highest -highhandedness -highheeled -highish -highjack -highland -highlander -highlanders -highlands -highlight -highlighted -highlighter -highlighting -highlights -highly -highness -highpitched -highpoint -highranking -highs -highspirited -hight -highway -highwayman -highwaymen -highways -hijack -hijacked -hijacker -hijackers -hijacking -hijackings -hijacks -hike -hiked -hiker -hikers -hikes -hiking -hilarious -hilariously -hilarity -hill -hilled -hillier -hilliest -hillman -hillock -hillocks -hillocky -hills -hillside -hillsides -hilltop -hilltops -hillwalking -hilly -hilt -hilts -him -himself -hind -hindbrain -hinder -hindered -hinderer -hindering -hinders -hindmost -hindquarters -hindrance -hindrances -hindsight -hindu -hinduism -hinge -hinged -hinges -hinnies -hinny -hint -hinted -hinterland -hinterlands -hinting -hints -hip -hipbone -hippie -hippies -hippo -hippocampus -hippodrome -hippopotamus -hippy -hips -hipster -hipsters -hire -hired -hireling -hirer -hires -hiring -hirings -hirsute -hirsuteness -his -hispanic -hiss -hissed -hisses -hissing -hissings -histamine -histogram -histograms -histological -histologically -histologists -histology -historian -historians -historic -historical -historically -historicist -histories -historiographical -historiography -history -histrionic -histrionics -hit -hitandrun -hitch -hitched -hitcher -hitches -hitchhike -hitchhiked -hitchhiker -hitchhikers -hitchhiking -hitching -hither -hitherto -hitler -hits -hittable -hitters -hitting -hive -hived -hives -hiving -hmm -ho -hoar -hoard -hoarded -hoarder -hoarders -hoarding -hoardings -hoards -hoarfrost -hoarse -hoarsely -hoarseness -hoarser -hoary -hoax -hoaxed -hoaxer -hoaxers -hoaxes -hoaxing -hob -hobbies -hobbit -hobble -hobbled -hobbles -hobbling -hobby -hobbyist -hobbyists -hobgoblin -hobgoblins -hobnailed -hobnails -hobo -hobs -hock -hockey -hocks -hocus -hocuspocus -hod -hoe -hoed -hoeing -hoes -hog -hogg -hogged -hogger -hogging -hoggs -hogs -hogwash -hoist -hoisted -hoisting -hoists -hold -holdable -holdall -holdalls -holder -holders -holding -holdings -holdout -holds -holdup -holdups -hole -holed -holeinone -holes -holiday -holidaying -holidaymaker -holidaymakers -holidays -holier -holies -holiest -holily -holiness -holing -holism -holistic -holistically -holland -holler -hollered -hollies -hollow -hollowed -hollowly -hollowness -hollows -holly -hollyhocks -holmes -holocaust -holocausts -hologram -holograms -holographic -holography -holster -holsters -holy -homage -homages -hombre -home -homecoming -homecomings -homed -homeland -homelands -homeless -homelessness -homelier -homeliness -homely -homemade -homeowner -homeowners -homes -homesick -homesickness -homespun -homestead -homesteads -homeward -homewardbound -homewards -homework -homicidal -homicide -homicides -homiest -homilies -homily -homing -hominid -hominids -homoeopathic -homoeopathy -homogenates -homogeneity -homogeneous -homogeneously -homogenisation -homogenise -homogenised -homogenising -homological -homologies -homologous -homologue -homologues -homology -homomorphism -homomorphisms -homonym -homonyms -homophobes -homophobia -homophobic -homophones -homophony -homosexual -homosexuality -homosexually -homosexuals -homotopy -homozygous -homunculus -homy -hone -honed -hones -honest -honestly -honesty -honey -honeybee -honeycomb -honeycombed -honeycombing -honeydew -honeyed -honeymoon -honeymooners -honeymoons -honeysuckle -honeysuckles -honing -honk -honking -honks -honorarium -honorary -honorific -honors -honour -honourable -honourably -honoured -honouring -honours -honshu -hood -hooded -hoodlum -hoodlums -hoods -hoodwink -hoodwinked -hoodwinking -hoof -hoofs -hook -hookah -hooked -hooker -hookers -hooking -hooknosed -hooks -hooky -hooligan -hooliganism -hooligans -hoop -hooped -hoops -hooray -hoot -hooted -hooter -hooters -hooting -hoots -hoover -hoovered -hoovering -hooves -hop -hope -hoped -hopeful -hopefully -hopefulness -hopefuls -hopeless -hopelessly -hopelessness -hopes -hoping -hopped -hopper -hoppers -hopping -hops -horde -hordes -horizon -horizons -horizontal -horizontally -horizontals -hormonal -hormonally -hormone -hormones -horn -hornbeam -hornbills -horned -hornet -hornets -hornpipe -hornpipes -horns -horny -horoscope -horoscopes -horrendous -horrendously -horrible -horribly -horrid -horridly -horrific -horrifically -horrified -horrifies -horrify -horrifying -horrifyingly -horror -horrors -horrorstricken -horse -horseback -horsebox -horseflesh -horsefly -horsehair -horseless -horseman -horsemen -horseplay -horsepower -horseradish -horses -horseshoe -horseshoes -horsewhip -horsewhipped -horsey -horsing -horticultural -horticulture -horticulturist -horticulturists -hosanna -hosannas -hose -hosed -hosepipe -hoses -hosier -hosiery -hosing -hospice -hospices -hospitable -hospitably -hospital -hospitalisation -hospitalised -hospitality -hospitals -host -hosta -hostage -hostages -hosted -hostel -hostelries -hostelry -hostels -hostess -hostesses -hostile -hostilely -hostilities -hostility -hosting -hostler -hosts -hot -hotair -hotbed -hotbeds -hotblooded -hotchpotch -hotdog -hotdogs -hotel -hotelier -hoteliers -hotels -hotheaded -hotheads -hothouse -hothouses -hotline -hotly -hotness -hotplate -hotplates -hotpot -hotrod -hotspot -hotspots -hottempered -hotter -hottest -hotting -hound -hounded -hounding -hounds -hour -hourglass -hourly -hours -house -houseboat -houseboats -housebound -housebreaker -housebreakers -housebreaking -housebuilder -housebuilders -housebuilding -housebuyers -housed -houseflies -houseful -household -householder -householders -households -househunting -housekeeper -housekeepers -housekeeping -housemaid -housemaids -houseroom -houses -housewife -housewives -housework -housing -housings -houston -hove -hovel -hovels -hover -hovercraft -hovered -hoverer -hovering -hovers -how -howdy -however -howitzer -howitzers -howl -howled -howler -howlers -howling -howlings -howls -howsoever -hub -hubbies -hubbub -hubby -hubcap -hubcaps -hubris -hubristic -hubs -huckleberry -huddle -huddled -huddles -huddling -hue -hues -huff -huffed -huffily -huffing -huffy -hug -huge -hugely -hugeness -hugged -hugging -hugs -huguenot -huh -hulk -hulking -hulks -hull -hullabaloo -hulled -hullo -hulls -hum -human -humane -humanely -humaner -humanise -humanised -humanising -humanism -humanist -humanistic -humanists -humanitarian -humanitarianism -humanities -humanity -humankind -humanly -humanness -humanoid -humanoids -humans -humble -humbled -humbleness -humbler -humbles -humblest -humbling -humbly -humbug -humbugs -humdrum -humerus -humid -humidifier -humidifiers -humidity -humify -humiliate -humiliated -humiliates -humiliating -humiliatingly -humiliation -humiliations -humility -hummable -hummed -hummer -humming -hummingbird -hummingbirds -hummock -hummocks -hummocky -humorist -humorous -humorously -humour -humoured -humouring -humourless -humours -hump -humpback -humped -humping -humps -hums -humus -hunch -hunchback -hunchbacked -hunched -hunches -hunching -hundred -hundredfold -hundreds -hundredth -hundredths -hundredweight -hundredweights -hung -hungary -hunger -hungered -hungering -hungers -hungrier -hungriest -hungrily -hungry -hunk -hunkers -hunks -hunt -hunted -hunter -huntergatherer -huntergatherers -hunters -hunting -hunts -huntsman -huntsmen -hurdle -hurdled -hurdler -hurdlers -hurdles -hurl -hurled -hurling -hurls -hurlyburly -hurrah -hurrahs -hurray -hurricane -hurricanes -hurried -hurriedly -hurries -hurry -hurrying -hurt -hurtful -hurting -hurtle -hurtled -hurtles -hurtling -hurts -husband -husbandman -husbandmen -husbandry -husbands -hush -hushed -hushes -hushhush -hushing -husk -husked -huskier -huskies -huskiest -huskily -husks -husky -hussies -hussy -hustings -hustle -hustled -hustler -hustlers -hustles -hustling -hut -hutch -hutches -huts -hyacinth -hyacinths -hyaena -hyaenas -hybrid -hybridisation -hybridised -hybrids -hydra -hydrangea -hydrangeas -hydrant -hydrants -hydrate -hydrated -hydration -hydraulic -hydraulically -hydraulics -hydrazine -hydride -hydro -hydrocarbon -hydrocarbons -hydrochloric -hydrochloride -hydrodynamic -hydrodynamical -hydrodynamics -hydroelectric -hydroelectricity -hydrofluoric -hydrofoil -hydrofoils -hydrogen -hydrogenated -hydrogenation -hydrographer -hydrographic -hydrological -hydrologically -hydrologists -hydrology -hydrolysis -hydromagnetic -hydromechanics -hydrophobia -hydrophobic -hydroponically -hydrosphere -hydrostatic -hydrostatics -hydrothermal -hydrous -hydroxide -hydroxides -hyena -hyenas -hygiene -hygienic -hygienically -hygienist -hygienists -hygroscopic -hymen -hymens -hymn -hymnal -hymnbook -hymns -hype -hyperactive -hyperactivity -hyperbola -hyperbolas -hyperbole -hyperbolic -hyperboloid -hyperboloids -hypercholesterolaemia -hypercube -hypercubes -hyperfine -hyperinflation -hypermarket -hypermarkets -hyperplane -hyperplanes -hypersensitive -hypersensitiveness -hypersensitivity -hypersonic -hyperspace -hypersphere -hypertension -hypertext -hypertonic -hyperventilated -hyperventilating -hyperventilation -hyphen -hyphenate -hyphenated -hyphenates -hyphenating -hyphenation -hyphenations -hyphened -hyphens -hypnosis -hypnotherapists -hypnotherapy -hypnotic -hypnotically -hypnotise -hypnotised -hypnotises -hypnotising -hypnotism -hypnotist -hypochondria -hypochondriac -hypochondriacal -hypochondriacs -hypocrisies -hypocrisy -hypocrite -hypocrites -hypocritical -hypocritically -hypodermic -hypoglycaemia -hypoglycaemic -hypotension -hypothalamus -hypothermia -hypotheses -hypothesis -hypothesise -hypothesised -hypothesiser -hypothesises -hypothesising -hypothetical -hypothetically -hypoxia -hyssop -hysterectomy -hysteresis -hysteria -hysteric -hysterical -hysterically -hysterics -iambic -iambus -iatrogenic -iberia -iberian -ibex -ibexes -ibis -ibises -ibsen -icarus -ice -iceage -iceberg -icebergs -icebox -icecap -icecold -icecream -iced -iceland -iceman -icepack -icepick -icepicks -ices -iceskate -iceskating -ichneumon -icicle -icicles -icier -iciest -icily -iciness -icing -icings -icon -iconic -iconoclasm -iconoclast -iconoclastic -iconoclasts -iconographic -iconographical -iconography -icons -icosahedra -icosahedral -icosahedron -icy -id -idaho -idea -ideal -idealisation -idealisations -idealise -idealised -idealises -idealising -idealism -idealist -idealistic -idealistically -idealists -ideality -ideally -ideals -ideas -idem -identical -identically -identifiable -identifiably -identification -identifications -identified -identifier -identifiers -identifies -identify -identifying -identities -identity -ideograms -ideographic -ideographs -ideological -ideologically -ideologies -ideologist -ideologists -ideologue -ideologues -ideology -ides -idiocies -idiocy -idiolect -idiom -idiomatic -idiomatically -idioms -idiopathic -idiosyncrasies -idiosyncrasy -idiosyncratic -idiosyncratically -idiot -idiotic -idiotically -idiots -idle -idled -idleness -idler -idlers -idles -idlest -idling -idly -idol -idolaters -idolatrous -idolatry -idolisation -idolise -idolised -idols -ids -idyll -idyllic -idyllically -if -ifs -igloo -igloos -iglu -igneous -ignite -ignited -igniter -ignites -igniting -ignition -ignoble -ignobly -ignominious -ignominiously -ignominy -ignorable -ignoramus -ignoramuses -ignorance -ignorant -ignorantly -ignore -ignored -ignores -ignoring -iguana -iguanas -ileum -iliad -ilk -ill -illadvised -illbehaved -illconceived -illdefined -illegal -illegalities -illegality -illegally -illegibility -illegible -illegibly -illegitimacy -illegitimate -illegitimately -illequipped -illfated -illfavoured -illhumoured -illiberal -illicit -illicitly -illimitable -illinformed -illinois -illiquid -illiteracy -illiterate -illiterates -illmannered -illness -illnesses -illogic -illogical -illogicality -illogically -ills -illtempered -illtreated -illuminant -illuminate -illuminated -illuminates -illuminating -illumination -illuminations -illumine -illusion -illusionist -illusionists -illusions -illusive -illusory -illustrate -illustrated -illustrates -illustrating -illustration -illustrations -illustrative -illustrator -illustrators -illustrious -ilmenite -im -image -imaged -imagery -images -imaginable -imaginary -imagination -imaginations -imaginative -imaginatively -imagine -imagined -imagines -imaging -imagining -imaginings -imago -imam -imams -imbalance -imbalanced -imbalances -imbecile -imbeciles -imbecilic -imbecilities -imbecility -imbedded -imbeds -imbibe -imbibed -imbiber -imbibers -imbibing -imbroglio -imbue -imbued -imitate -imitated -imitates -imitating -imitation -imitations -imitative -imitator -imitators -immaculate -immaculately -immanence -immanent -immanently -immaterial -immature -immaturely -immaturity -immeasurable -immeasurably -immediacy -immediate -immediately -immediateness -immemorial -immense -immensely -immenseness -immensities -immensity -immerse -immersed -immerses -immersing -immersion -immigrant -immigrants -immigrate -immigrated -immigrating -immigration -immigrations -imminence -imminent -imminently -immiscible -immobile -immobilisation -immobilise -immobilised -immobiliser -immobilises -immobilising -immobility -immoderate -immoderately -immodest -immolate -immolated -immolation -immoral -immorality -immorally -immortal -immortalised -immortality -immortally -immortals -immovability -immovable -immoveable -immune -immunisation -immunisations -immunise -immunised -immunises -immunities -immunity -immunoassay -immunocompromised -immunodeficiency -immunological -immunologically -immunologist -immunologists -immunology -immunosuppression -immunosuppressive -immured -immutability -immutable -immutably -imp -impact -impacted -impacting -impaction -impacts -impair -impaired -impairing -impairment -impairments -impairs -impala -impalas -impale -impaled -impaler -impales -impaling -impalpable -impart -imparted -impartial -impartiality -impartially -imparting -imparts -impassable -impasse -impassioned -impassive -impassively -impassiveness -impassivity -impatience -impatient -impatiently -impeach -impeached -impeaches -impeachment -impeachments -impeccable -impeccably -impecunious -impedance -impede -impeded -impedes -impediment -impedimenta -impediments -impeding -impel -impelled -impelling -impels -impend -impending -impenetrability -impenetrable -impenetrably -imperative -imperatively -imperatives -imperceptible -imperceptibly -imperfect -imperfection -imperfections -imperfectly -imperial -imperialism -imperialist -imperialistic -imperialists -imperially -imperil -imperilled -imperious -imperiously -imperiousness -imperishable -imperium -impermanence -impermanent -impermeability -impermeable -impermissible -impersonal -impersonality -impersonally -impersonate -impersonated -impersonates -impersonating -impersonation -impersonations -impersonator -impersonators -impertinence -impertinent -impertinently -imperturbability -imperturbable -imperturbably -impervious -impetuosity -impetuous -impetuously -impetus -impi -impiety -impinge -impinged -impingement -impinges -impinging -impious -impish -impishly -impishness -implacable -implacably -implant -implantation -implanted -implanting -implants -implausibility -implausible -implausibly -implement -implementable -implementation -implementations -implemented -implementer -implementers -implementing -implements -implicate -implicated -implicates -implicating -implication -implications -implicit -implicitly -implied -impliedly -implies -implode -imploded -implodes -imploding -implore -implored -implores -imploring -imploringly -implosion -imply -implying -impolite -impoliteness -impolitic -imponderable -imponderables -import -importable -importance -important -importantly -importation -imported -importer -importers -importing -imports -importunate -importunately -importune -importuned -importunity -imposable -impose -imposed -imposes -imposing -imposition -impositions -impossibilities -impossibility -impossible -impossibly -imposter -imposters -impostor -impostors -impotence -impotency -impotent -impotently -impound -impounded -impounding -impoverish -impoverished -impoverishing -impoverishment -impracticability -impracticable -impractical -impracticalities -impracticality -impractically -imprecation -imprecations -imprecise -imprecisely -impreciseness -imprecision -impregnable -impregnably -impregnate -impregnated -impregnating -impregnation -impresario -impress -impressed -impresses -impressing -impression -impressionable -impressionism -impressionist -impressionistic -impressionists -impressions -impressive -impressively -impressiveness -imprimatur -imprint -imprinted -imprinting -imprints -imprison -imprisoned -imprisoning -imprisonment -imprisonments -imprisons -improbabilities -improbability -improbable -improbably -impromptu -improper -improperly -improprieties -impropriety -improvable -improve -improved -improvement -improvements -improver -improves -improvidence -improvident -improving -improvisation -improvisational -improvisations -improvisatory -improvise -improvised -improvises -improvising -imprudence -imprudent -imprudently -imps -impudence -impudent -impudently -impugn -impugnable -impugned -impugning -impulse -impulses -impulsion -impulsive -impulsively -impulsiveness -impunity -impure -impurities -impurity -imputation -imputations -impute -imputed -imputing -in -inabilities -inability -inaccessibility -inaccessible -inaccuracies -inaccuracy -inaccurate -inaccurately -inaction -inactivated -inactivating -inactivation -inactive -inactivity -inadequacies -inadequacy -inadequate -inadequately -inadmissible -inadvertence -inadvertent -inadvertently -inadvisability -inadvisable -inadvisedly -inalienable -inane -inanely -inanimate -inanities -inanity -inapplicability -inapplicable -inappropriate -inappropriately -inappropriateness -inaptly -inarticulacy -inarticulate -inarticulateness -inasmuch -inattention -inattentive -inattentively -inaudibility -inaudible -inaudibly -inaugural -inaugurate -inaugurated -inaugurates -inaugurating -inauguration -inauspicious -inauspiciously -inauthenticity -inboard -inborn -inbound -inbred -inbreeding -inbuilt -inca -incalculable -incalculably -incandescence -incandescent -incandescently -incant -incantation -incantations -incantatory -incapability -incapable -incapacitate -incapacitated -incapacitates -incapacitating -incapacitation -incapacity -incarcerated -incarcerating -incarceration -incarnate -incarnated -incarnation -incarnations -incas -incased -incautious -incautiously -incendiaries -incendiary -incense -incensed -incenses -incensing -incentive -incentives -inception -incessant -incessantly -incest -incests -incestuous -incestuousness -inch -inched -inches -inching -inchoate -incidence -incidences -incident -incidental -incidentally -incidents -incinerate -incinerated -incinerates -incinerating -incineration -incinerator -incinerators -incipient -incised -incision -incisions -incisive -incisively -incisiveness -incisor -incisors -incite -incited -incitement -incitements -inciter -inciters -incites -inciting -inclemency -inclement -inclination -inclinations -incline -inclined -inclines -inclining -include -included -includes -including -inclusion -inclusions -inclusive -inclusively -inclusiveness -incognito -incoherence -incoherency -incoherent -incoherently -incombustible -income -incomer -incomers -incomes -incoming -incommensurable -incommoding -incommunicable -incommunicado -incomparable -incomparably -incompatibilities -incompatibility -incompatible -incompatibly -incompetence -incompetent -incompetently -incompetents -incomplete -incompletely -incompleteness -incomprehensibility -incomprehensible -incomprehensibly -incomprehension -incompressible -inconceivable -inconceivably -inconclusive -inconclusively -incongruities -incongruity -incongruous -incongruously -inconsequential -inconsequentially -inconsiderable -inconsiderate -inconsiderately -inconsiderateness -inconsistencies -inconsistency -inconsistent -inconsistently -inconsolable -inconsolably -inconspicuous -inconspicuously -inconspicuousness -inconstancy -inconstant -incontestable -incontestably -incontinence -incontinent -incontinently -incontrovertible -incontrovertibly -inconvenience -inconvenienced -inconveniences -inconveniencing -inconvenient -inconveniently -incorporable -incorporate -incorporated -incorporates -incorporating -incorporation -incorrect -incorrectly -incorrectness -incorrigible -incorrigibly -incorruptible -increase -increased -increases -increasing -increasingly -incredible -incredibly -incredulity -incredulous -incredulously -increment -incremental -incrementally -incrementation -incremented -incrementing -increments -incriminate -incriminated -incriminates -incriminating -incrimination -incubate -incubated -incubating -incubation -incubations -incubator -incubators -inculcate -inculcated -inculcating -inculcation -incumbency -incumbent -incumbents -incur -incurable -incurably -incuriously -incurred -incurring -incurs -incursion -incursions -indaba -indebted -indebtedness -indecency -indecent -indecently -indecipherable -indecision -indecisive -indecisively -indecisiveness -indeclinable -indecorous -indeed -indefatigable -indefeasible -indefensible -indefinable -indefinably -indefinite -indefinitely -indelible -indelibly -indelicacy -indelicate -indemnified -indemnify -indemnities -indemnity -indent -indentation -indentations -indented -indenting -indents -indentures -independence -independent -independently -independents -indepth -indescribable -indescribably -indestructibility -indestructible -indeterminable -indeterminacy -indeterminate -index -indexation -indexed -indexer -indexers -indexes -indexing -india -indian -indiana -indians -indicant -indicants -indicate -indicated -indicates -indicating -indication -indications -indicative -indicator -indicators -indices -indict -indictable -indicted -indicting -indictment -indictments -indicts -indifference -indifferent -indifferently -indigenous -indigestible -indigestion -indignant -indignantly -indignation -indignities -indignity -indigo -indirect -indirection -indirections -indirectly -indirectness -indiscipline -indiscreet -indiscreetly -indiscretion -indiscretions -indiscriminate -indiscriminately -indispensability -indispensable -indispensably -indispose -indisposed -indisposition -indisputable -indisputably -indissoluble -indissolubly -indistinct -indistinctly -indistinctness -indistinguishable -indistinguishably -indite -individual -individualised -individualism -individualist -individualistic -individualists -individuality -individually -individuals -individuation -indivisibility -indivisible -indivisibly -indoctrinate -indoctrinated -indoctrinates -indoctrinating -indoctrination -indoctrinations -indoctrinator -indoctrinators -indole -indolence -indolent -indolently -indomitable -indoor -indoors -indorsed -indorses -indrawn -indubitable -indubitably -induce -induced -inducement -inducements -induces -inducible -inducing -induct -inductance -inducted -induction -inductions -inductive -inductively -inductor -inductors -inducts -indulge -indulged -indulgence -indulgences -indulgent -indulgently -indulger -indulges -indulging -induna -industrial -industrialisation -industrialise -industrialised -industrialising -industrialism -industrialist -industrialists -industrially -industries -industrious -industriously -industriousness -industry -inebriate -inebriated -inebriation -inedible -ineffable -ineffective -ineffectively -ineffectiveness -ineffectual -ineffectually -ineffectualness -inefficiencies -inefficiency -inefficient -inefficiently -inelastic -inelegance -inelegant -inelegantly -ineligibility -ineligible -ineluctable -ineluctably -inept -ineptitude -ineptly -ineptness -inequalities -inequality -inequitable -inequities -inequity -ineradicable -ineradicably -inert -inertia -inertial -inertness -inescapable -inescapably -inessential -inestimable -inestimably -inevitability -inevitable -inevitably -inexact -inexactitude -inexactitudes -inexcusable -inexcusably -inexhaustible -inexhaustibly -inexorability -inexorable -inexorably -inexpedient -inexpensive -inexpensively -inexperience -inexperienced -inexpert -inexpertly -inexplicable -inexplicably -inexpressibility -inexpressible -inexpressibly -inextensible -inextinguishable -inextricable -inextricably -infallibility -infallible -infallibly -infamous -infamously -infamy -infancy -infant -infanta -infante -infanticide -infantile -infantry -infantryman -infantrymen -infants -infarct -infarction -infarctions -infatuate -infatuated -infatuation -infatuations -infeasibility -infeasible -infect -infected -infecting -infection -infections -infectious -infectiously -infective -infects -infelicities -infelicitous -infelicitously -infelicity -infer -inference -inferences -inferential -inferentially -inferior -inferiority -inferiors -infernal -infernally -inferno -inferred -inferring -infers -infertile -infertility -infest -infestation -infestations -infested -infesting -infests -infidel -infidelities -infidelity -infidels -infield -infighting -infill -infilling -infiltrate -infiltrated -infiltrates -infiltrating -infiltration -infiltrations -infiltrator -infiltrators -infinite -infinitely -infinitesimal -infinitesimally -infinitesimals -infinities -infinitive -infinitives -infinitude -infinity -infirm -infirmaries -infirmary -infirmities -infirmity -infix -inflame -inflamed -inflames -inflaming -inflammable -inflammation -inflammatory -inflatable -inflate -inflated -inflates -inflating -inflation -inflationary -inflect -inflected -inflecting -inflection -inflectional -inflections -inflects -inflexibility -inflexible -inflexibly -inflexion -inflexions -inflict -inflicted -inflicter -inflicting -infliction -inflictions -inflicts -inflow -inflowing -inflows -influence -influenced -influences -influencing -influential -influenza -influx -influxes -info -inform -informal -informality -informally -informant -informants -informatics -information -informational -informative -informatively -informativeness -informatory -informed -informer -informers -informing -informs -infra -infraction -infractions -infrared -infrastructural -infrastructure -infrastructures -infrequency -infrequent -infrequently -infringe -infringed -infringement -infringements -infringes -infringing -infuriate -infuriated -infuriates -infuriating -infuriatingly -infuse -infused -infuses -infusing -infusion -infusions -ingathered -ingenious -ingeniously -ingenuity -ingenuous -ingenuously -ingenuousness -ingest -ingested -ingesting -ingestion -inglorious -ingoing -ingot -ingots -ingrained -ingrate -ingratiate -ingratiated -ingratiating -ingratiatingly -ingratitude -ingredient -ingredients -ingress -ingression -ingrown -inhabit -inhabitable -inhabitant -inhabitants -inhabited -inhabiting -inhabits -inhalant -inhalation -inhalations -inhale -inhaled -inhaler -inhalers -inhales -inhaling -inherent -inherently -inherit -inheritable -inheritance -inheritances -inherited -inheriting -inheritor -inheritors -inherits -inhibit -inhibited -inhibiting -inhibition -inhibitions -inhibitor -inhibitors -inhibitory -inhibits -inhomogeneities -inhomogeneity -inhomogeneous -inhospitable -inhouse -inhuman -inhumane -inhumanely -inhumanities -inhumanity -inhumanly -inimical -inimitable -inimitably -iniquities -iniquitous -iniquitously -iniquity -initial -initialisation -initialisations -initialise -initialised -initialises -initialising -initialled -initially -initials -initiate -initiated -initiates -initiating -initiation -initiations -initiative -initiatives -initiator -initiators -inject -injectable -injected -injecting -injection -injections -injector -injects -injoke -injokes -injudicious -injudiciously -injunction -injunctions -injure -injured -injures -injuries -injuring -injurious -injuriously -injury -injustice -injustices -ink -inked -inkier -inkiest -inking -inkling -inklings -inkpad -inkpot -inkpots -inks -inkstand -inkstands -inkwell -inkwells -inky -inlaid -inland -inlaw -inlaws -inlay -inlays -inlet -inlets -inmate -inmates -inmost -inn -innards -innate -innately -inner -innermost -innervation -innings -innkeeper -innkeepers -innocence -innocent -innocently -innocents -innocuous -innocuousness -innovate -innovated -innovating -innovation -innovations -innovative -innovatively -innovator -innovators -innovatory -inns -innuendo -innumerable -innumerably -innumeracy -innumerate -inoculate -inoculated -inoculates -inoculating -inoculation -inoculations -inoffensive -inoperable -inoperative -inopportune -inordinate -inordinately -inorganic -input -inputs -inputting -inquest -inquests -inquire -inquired -inquirer -inquirers -inquires -inquiries -inquiring -inquiringly -inquiry -inquisition -inquisitional -inquisitions -inquisitive -inquisitively -inquisitiveness -inquisitor -inquisitorial -inquisitorially -inquisitors -inquorate -inroad -inroads -inrush -ins -insalubrious -insane -insanely -insanitary -insanities -insanity -insatiable -insatiably -inscribe -inscribed -inscribing -inscription -inscriptions -inscrutability -inscrutable -inscrutably -insect -insecticidal -insecticide -insecticides -insectivores -insectivorous -insects -insecure -insecurely -insecurities -insecurity -insemination -insensibility -insensible -insensibly -insensitive -insensitively -insensitivity -inseparable -inseparably -insert -inserted -inserting -insertion -insertions -inserts -inset -insets -inshore -inside -insideout -insider -insiders -insides -insidious -insidiously -insight -insightful -insights -insignia -insignificance -insignificant -insignificantly -insincere -insincerely -insincerity -insinuate -insinuated -insinuating -insinuatingly -insinuation -insinuations -insipid -insist -insisted -insistence -insistent -insistently -insisting -insists -insofar -insole -insolence -insolent -insolently -insolubility -insoluble -insolvencies -insolvency -insolvent -insomnia -insomniac -insomniacs -insouciance -insouciant -inspect -inspected -inspecting -inspection -inspections -inspector -inspectorate -inspectorates -inspectors -inspects -inspiration -inspirational -inspirations -inspire -inspired -inspires -inspiring -instabilities -instability -install -installable -installation -installations -installed -installer -installers -installing -installs -instalment -instalments -instance -instanced -instances -instancy -instant -instantaneous -instantaneously -instantiate -instantiated -instantiates -instantiating -instantiation -instantiations -instantly -instants -instated -instead -instep -insteps -instigate -instigated -instigates -instigating -instigation -instigator -instigators -instil -instillation -instilled -instilling -instills -instils -instinct -instinctive -instinctively -instincts -instinctual -institute -instituted -institutes -instituting -institution -institutional -institutionalisation -institutionalise -institutionalised -institutionalising -institutionalism -institutionally -institutions -instruct -instructed -instructing -instruction -instructional -instructions -instructive -instructor -instructors -instructs -instrument -instrumental -instrumentalist -instrumentalists -instrumentality -instrumentally -instrumentals -instrumentation -instrumented -instruments -insubordinate -insubordination -insubstantial -insufferable -insufferably -insufficiency -insufficient -insufficiently -insulant -insular -insularity -insulate -insulated -insulates -insulating -insulation -insulator -insulators -insulin -insult -insulted -insulter -insulting -insultingly -insults -insuperable -insupportable -insurance -insurances -insure -insured -insurer -insurers -insures -insurgency -insurgent -insurgents -insuring -insurmountable -insurmountably -insurrection -insurrectionary -insurrections -intact -intaglio -intake -intakes -intangible -intangibles -integer -integers -integrability -integrable -integral -integrally -integrals -integrand -integrands -integrate -integrated -integrates -integrating -integration -integrationist -integrations -integrative -integrator -integrators -integrity -intellect -intellects -intellectual -intellectualism -intellectuality -intellectually -intellectuals -intelligence -intelligences -intelligent -intelligently -intelligentsia -intelligibility -intelligible -intelligibly -intemperance -intemperate -intend -intended -intending -intends -intense -intensely -intensification -intensified -intensifies -intensify -intensifying -intensities -intensity -intensive -intensively -intent -intention -intentional -intentionality -intentionally -intentioned -intentions -intently -intentness -intents -inter -interact -interacted -interacting -interaction -interactional -interactions -interactive -interactively -interactiveness -interacts -interatomic -interbank -interbred -interbreed -interbreeding -intercede -interceded -interceding -intercept -intercepted -intercepting -interception -interceptions -interceptor -interceptors -intercepts -intercession -intercessions -interchange -interchangeability -interchangeable -interchangeably -interchanged -interchanges -interchanging -intercity -intercollegiate -intercom -intercommunicate -intercommunication -interconnect -interconnected -interconnectedness -interconnecting -interconnection -interconnections -interconnects -intercontinental -interconversion -intercountry -intercourse -intercut -interdenominational -interdepartmental -interdependence -interdependency -interdependent -interdict -interdicted -interdisciplinary -interest -interested -interestedly -interesting -interestingly -interests -interface -interfaced -interfaces -interfacing -interfere -interfered -interference -interferences -interferer -interferes -interfering -interferometer -interferometers -interferometric -interferometry -interferon -intergalactic -interglacial -intergovernmental -interim -interims -interior -interiors -interject -interjected -interjecting -interjection -interjectional -interjections -interjects -interlace -interlaced -interlacing -interlap -interleave -interleaved -interleaves -interleaving -interlingual -interlinked -interlock -interlocked -interlocking -interlocks -interlocutor -interlocutors -interlocutory -interloper -interlopers -interlude -interludes -intermarriage -intermarriages -intermediaries -intermediary -intermediate -intermediates -interment -interments -interminable -interminably -intermingled -intermingling -intermission -intermissions -intermittent -intermittently -intermix -intermixed -intermixing -intermolecular -intern -internal -internalisation -internalise -internalised -internalises -internalising -internally -internals -international -internationalisation -internationalised -internationalism -internationalist -internationalists -internationally -internationals -interned -internees -internet -interning -internment -internments -interns -internuclear -interocular -interoperability -interoperable -interpellation -interpenetration -interpersonal -interplanetary -interplay -interplays -interpolatable -interpolate -interpolated -interpolates -interpolating -interpolation -interpolations -interpose -interposed -interposes -interposing -interposition -interpret -interpretable -interpretation -interpretational -interpretations -interpretative -interpreted -interpreter -interpreters -interpreting -interpretive -interpretively -interprets -interracial -interred -interregnum -interrelate -interrelated -interrelatedness -interrelation -interrelations -interrelationship -interrelationships -interrogate -interrogated -interrogates -interrogating -interrogation -interrogations -interrogative -interrogatively -interrogatives -interrogator -interrogators -interrogatory -interrupt -interrupted -interruptibility -interrupting -interruption -interruptions -interrupts -intersect -intersected -intersecting -intersection -intersections -intersects -intersperse -interspersed -intersperses -interspersing -interstellar -interstices -interstitial -interstitially -intertidal -intertwine -intertwined -intertwining -interval -intervals -intervene -intervened -intervenes -intervening -intervention -interventionism -interventionist -interventions -interview -interviewed -interviewee -interviewees -interviewer -interviewers -interviewing -interviews -interweaving -interwoven -intestacy -intestate -intestinal -intestine -intestines -intifada -intimacies -intimacy -intimate -intimated -intimately -intimates -intimating -intimation -intimations -intimidate -intimidated -intimidates -intimidating -intimidation -intimidatory -into -intolerable -intolerably -intolerance -intolerant -intonation -intonational -intonations -intone -intoned -intones -intoning -intoxicant -intoxicants -intoxicate -intoxicated -intoxicating -intoxication -intracellular -intractability -intractable -intractably -intramural -intramuscular -intransigence -intransigent -intransitive -intrauterine -intravenous -intravenously -intrepid -intrepidly -intricacies -intricacy -intricate -intricately -intrigue -intrigued -intrigues -intriguing -intriguingly -intrinsic -intrinsically -intro -introduce -introduced -introduces -introducing -introduction -introductions -introductory -introspection -introspective -introspectively -introversion -introvert -introverted -introverts -intrude -intruded -intruder -intruders -intrudes -intruding -intrusion -intrusions -intrusive -intrusiveness -intuited -intuition -intuitionist -intuitions -intuitive -intuitively -intuitiveness -inuit -inuits -inundate -inundated -inundation -inure -inured -invade -invaded -invader -invaders -invades -invading -invalid -invalidate -invalidated -invalidates -invalidating -invalidation -invalided -invalidity -invalids -invaluable -invariable -invariably -invariance -invariant -invariants -invasion -invasions -invasive -invective -invectives -inveigh -inveighing -inveigle -inveigled -inveigler -inveiglers -inveigling -invent -invented -inventing -invention -inventions -inventive -inventively -inventiveness -inventor -inventories -inventors -inventory -invents -inverse -inversely -inverses -inversion -inversions -invert -invertebrate -invertebrates -inverted -inverter -inverters -invertible -inverting -inverts -invest -invested -investigate -investigated -investigates -investigating -investigation -investigations -investigative -investigator -investigators -investigatory -investing -investiture -investment -investments -investor -investors -invests -inveterate -invidious -invigilate -invigilated -invigilating -invigilator -invigilators -invigorate -invigorated -invigorating -invigoratingly -invincibility -invincible -inviolability -inviolable -inviolate -inviscid -invisibilities -invisibility -invisible -invisibles -invisibly -invitation -invitations -invite -invited -invites -inviting -invitingly -invocation -invocations -invoice -invoiced -invoices -invoicing -invokable -invoke -invoked -invoker -invokers -invokes -invoking -involuntarily -involuntary -involute -involution -involutions -involve -involved -involvement -involvements -involves -involving -invulnerability -invulnerable -inward -inwardly -inwardness -inwards -iodide -iodine -ion -ionian -ionic -ionisation -ionise -ionised -ionising -ionosphere -ionospheric -ions -iota -iotas -iran -iranian -iranians -iraq -iraqi -iraqis -irascibility -irascible -irascibly -irate -ire -ireland -iridescence -iridescent -iridium -iris -irises -irish -irishman -irishmen -irk -irked -irking -irks -irksome -irksomeness -iron -ironage -ironed -ironic -ironical -ironically -ironies -ironing -ironlady -ironmonger -ironmongers -ironmongery -irons -ironstone -ironwork -ironworks -irony -irradiate -irradiated -irradiating -irradiation -irrational -irrationalities -irrationality -irrationally -irreconcilable -irrecoverable -irrecoverably -irredeemable -irredeemably -irreducibility -irreducible -irreducibly -irrefutable -irregular -irregularities -irregularity -irregularly -irregulars -irrelevance -irrelevances -irrelevancy -irrelevant -irrelevantly -irreligious -irremediable -irremovable -irreparable -irreparably -irreplaceable -irrepressible -irrepressibly -irreproachable -irreproachably -irresistible -irresistibly -irresolute -irresolutely -irresolution -irresolvable -irrespective -irrespectively -irresponsibility -irresponsible -irresponsibly -irretrievable -irretrievably -irreverence -irreverent -irreverently -irreversibility -irreversible -irreversibly -irrevocable -irrevocably -irrigate -irrigated -irrigating -irrigation -irritability -irritable -irritably -irritant -irritants -irritate -irritated -irritatedly -irritates -irritating -irritatingly -irritation -irritations -irrupted -irruption -is -isis -islam -islamic -island -islander -islanders -islands -isle -isles -islet -islets -isms -isnt -isobar -isobars -isogram -isolate -isolated -isolates -isolating -isolation -isolationism -isolationist -isolator -isolators -isomer -isomeric -isomers -isometric -isometrically -isometry -isomorph -isomorphic -isomorphism -isomorphisms -isoperimetrical -isosceles -isostatic -isothermal -isothermally -isotonic -isotope -isotopes -isotopic -isotropic -isotropically -isotropy -israel -israeli -israelis -issuable -issuance -issue -issued -issuer -issuers -issues -issuing -istanbul -isthmus -it -italian -italians -italic -italicisation -italicise -italicised -italics -italy -itch -itched -itches -itchier -itchiest -itching -itchy -item -itemise -itemised -itemises -itemising -items -iterate -iterated -iterates -iterating -iteration -iterations -iterative -iteratively -iterators -itinerant -itinerants -itineraries -itinerary -itll -its -itself -ive -ivies -ivories -ivory -ivy -jab -jabbed -jabber -jabbered -jabbering -jabbers -jabbing -jabs -jack -jackal -jackals -jackass -jackasses -jackboot -jackbooted -jackboots -jackdaw -jackdaws -jacked -jacket -jackets -jacking -jackinthebox -jackpot -jackpots -jacks -jacob -jacuzzi -jade -jaded -jadedly -jadedness -jades -jag -jagged -jaggedly -jaguar -jaguars -jahweh -jail -jailbird -jailed -jailer -jailers -jailing -jails -jakarta -jalopy -jam -jamaica -jamaican -jamb -jamboree -jambs -james -jammed -jamming -jams -jangle -jangled -jangling -jangly -janitor -janitors -january -janus -jap -japan -jape -japes -japonica -jar -jargon -jargons -jarl -jarred -jarring -jars -jasmine -jaundice -jaundiced -jaunt -jaunted -jauntier -jauntiest -jauntily -jaunting -jaunts -jaunty -java -javelin -javelins -jaw -jawbone -jawbones -jawed -jawing -jawline -jaws -jay -jays -jaywalk -jaywalker -jaywalking -jazz -jazzed -jazzier -jazziest -jazzy -jealous -jealousies -jealously -jealousy -jeans -jeep -jeeps -jeer -jeered -jeering -jeeringly -jeerings -jeers -jehad -jejune -jejunum -jell -jellied -jellies -jellify -jelly -jellyfish -jemmy -jennets -jeopardise -jeopardised -jeopardises -jeopardising -jeopardy -jerboas -jeremiah -jericho -jerk -jerked -jerkier -jerkiest -jerkily -jerkin -jerking -jerkings -jerkins -jerks -jerky -jersey -jerseys -jest -jested -jester -jesters -jesting -jestingly -jests -jesuit -jesus -jet -jetlagged -jetplane -jetpropelled -jets -jetsam -jetsetting -jetted -jetties -jetting -jettison -jettisoned -jettisoning -jetty -jew -jewel -jewelled -jeweller -jewellers -jewellery -jewelry -jewels -jewess -jewish -jews -jewsharp -jezebel -jiffy -jiggle -jiggling -jigs -jigsaw -jigsaws -jihad -jilt -jilted -jilting -jilts -jimmy -jingle -jingled -jingles -jingling -jingo -jingoism -jingoistic -jinked -jinks -jinx -jinxed -jinxes -jitter -jitters -jittery -jiujitsu -jive -jived -jives -job -jobbing -jobless -joblessness -jobs -jock -jockey -jockeying -jockeys -jocular -jocularity -jocularly -joey -jog -jogged -jogger -joggers -jogging -jogs -john -join -joined -joiner -joiners -joinery -joining -joins -joint -jointed -jointing -jointly -joints -jointures -joist -joists -joke -joked -joker -jokers -jokes -jokey -jokier -jokily -joking -jokingly -jollier -jolliest -jollify -jollily -jollity -jolly -jolt -jolted -jolting -jolts -jonah -jonathan -joseph -joshua -jostle -jostled -jostles -jostling -jot -jots -jotted -jotter -jotting -jottings -joule -joules -journal -journalese -journalism -journalist -journalistic -journalists -journalled -journalling -journals -journey -journeyed -journeyer -journeying -journeyman -journeys -joust -jouster -jousting -jousts -jovial -joviality -jovially -jovian -jowl -jowls -joy -joyed -joyful -joyfully -joyfulness -joyless -joylessness -joyous -joyously -joyousness -joyride -joyrider -joyriders -joyriding -joys -joystick -joysticks -jubilant -jubilantly -jubilate -jubilation -jubilee -jubilees -judaic -judaism -judas -judder -juddered -juddering -judders -judge -judged -judgement -judgemental -judgements -judges -judging -judgment -judgmental -judgments -judicature -judicial -judicially -judiciaries -judiciary -judicious -judiciously -judo -jug -jugged -juggernaut -juggernauts -juggle -juggled -juggler -jugglers -juggles -juggling -jugs -jugular -juice -juices -juicier -juiciest -juiciness -juicy -jukebox -jukeboxes -julep -juleps -july -jumble -jumbled -jumbles -jumbo -jump -jumped -jumper -jumpers -jumpier -jumpiest -jumpiness -jumping -jumps -jumpstart -jumpstarting -jumpsuit -jumpy -junction -junctions -juncture -june -jungle -jungles -junior -juniority -juniors -juniper -junk -junker -junket -junkie -junkies -junkmail -junks -junkyard -juno -junta -juntas -jupiter -jurassic -juridic -juridical -juries -jurisdiction -jurisdictional -jurisdictions -jurisprudence -jurisprudential -jurist -juristic -jurists -juror -jurors -jury -juryman -jurymen -jussive -just -justice -justices -justifiability -justifiable -justifiably -justification -justifications -justificatory -justified -justifies -justify -justifying -justly -justness -jut -jute -juts -jutted -jutting -juvenile -juveniles -juxtapose -juxtaposed -juxtaposes -juxtaposing -juxtaposition -juxtapositions -kaftan -kaftans -kaiser -kalahari -kale -kaleidoscope -kaleidoscopic -kalif -kamikaze -kampala -kampong -kangaroo -kangaroos -kaolin -karakul -karaoke -karate -karma -karst -katydid -kayak -kayaks -kebab -kebabs -kedgeree -keel -keeled -keelhaul -keeling -keels -keen -keener -keenest -keening -keenly -keenness -keep -keeper -keepers -keeping -keeps -keepsake -keepsakes -keg -kegs -kelp -kelpers -kelt -kelts -kelvin -ken -kennedy -kennel -kennelled -kennels -kent -kentucky -kenya -kenyan -kept -keratin -kerb -kerbs -kerbside -kerchief -kerned -kernel -kernels -kerning -kerosene -kestrel -kestrels -ketch -ketchup -kettle -kettleful -kettles -key -keyboard -keyboardist -keyboards -keyed -keyhole -keyholes -keying -keynote -keynotes -keypad -keypads -keyring -keys -keystone -keystones -keystroke -keystrokes -keyword -keywords -khaki -khalif -khan -khans -khoikhoi -khoisan -kibbutz -kick -kickback -kicked -kicker -kicking -kicks -kickstart -kickstarted -kickstarting -kickstarts -kid -kidded -kiddie -kidding -kidnap -kidnapped -kidnapper -kidnappers -kidnapping -kidnappings -kidnaps -kidney -kidneys -kidneyshaped -kids -kiev -kill -killed -killer -killers -killing -killings -killjoy -killjoys -kills -kiln -kilns -kilo -kilobits -kilobyte -kilobytes -kilohertz -kilojoules -kilometre -kilometres -kiloton -kilotons -kilovolt -kilowatt -kilowatts -kilt -kilted -kilter -kilts -kimono -kin -kina -kinase -kind -kinder -kindergarten -kindergartens -kindest -kindhearted -kindheartedness -kindle -kindled -kindles -kindlier -kindliest -kindliness -kindling -kindly -kindness -kindnesses -kindred -kinds -kinematic -kinematics -kinetic -kinetically -kinetics -kinfolk -king -kingdom -kingdoms -kingfisher -kingfishers -kingly -kingpin -kings -kingship -kingsize -kingsized -kink -kinked -kinks -kinky -kinsfolk -kinshasa -kinship -kinsman -kinsmen -kinswoman -kiosk -kiosks -kipper -kippers -kirk -kismet -kiss -kissed -kisser -kisses -kissing -kit -kitbag -kitbags -kitchen -kitchenette -kitchens -kitchenware -kite -kites -kith -kits -kitsch -kitted -kitten -kittenish -kittens -kitting -kittiwakes -kitty -kiwi -kiwis -klaxon -klaxons -kleptomania -kleptomaniac -kleptomaniacs -klick -kloof -knack -knacker -knackers -knacks -knapsack -knapsacks -knave -knavery -knaves -knavish -knead -kneaded -kneading -kneads -knee -kneecap -kneecaps -kneed -kneedeep -kneel -kneeled -kneeler -kneeling -kneels -knees -knell -knelt -knesset -knew -knickers -knife -knifed -knifepoint -knifes -knifing -knight -knighted -knighthood -knighthoods -knightly -knights -knit -knits -knitted -knitter -knitters -knitting -knitwear -knives -knob -knobbly -knobs -knock -knocked -knocker -knockers -knocking -knockings -knockout -knocks -knoll -knolls -knot -knots -knotted -knottier -knottiest -knotting -knotty -know -knowable -knowhow -knowing -knowingly -knowledge -knowledgeable -knowledgeably -known -knows -knuckle -knuckled -knuckleduster -knuckledusters -knuckles -knuckling -koala -koalas -kongo -kookaburra -koran -korea -korean -koreans -kosher -kraal -kraals -kraft -kremlin -kriegspiel -krill -krypton -kudu -kudus -kungfu -kuwait -kwacha -kwachas -laager -lab -label -labelled -labelling -labellings -labels -labia -labial -labials -labile -labium -laboratories -laboratory -laborious -laboriously -laboriousness -labour -laboured -labourer -labourers -labouring -labourintensive -labours -laboursaving -labs -laburnum -labyrinth -labyrinthine -labyrinths -lace -laced -lacerate -lacerated -lacerating -laceration -lacerations -laces -lacework -laches -lachrymal -lachrymose -lacier -lacing -lacings -lack -lackadaisical -lacked -lackey -lackeys -lacking -lacklustre -lacks -laconic -laconically -lacquer -lacquered -lacquers -lacrosse -lacs -lactate -lactation -lacteal -lactic -lactose -lacuna -lacunae -lacunas -lacy -lad -ladder -laddered -ladders -laddie -laddies -lade -laden -ladies -lading -ladle -ladled -ladles -ladling -lads -lady -ladybird -ladybirds -ladybug -ladylike -ladyship -ladyships -lag -lager -lagers -laggard -laggards -lagged -lagging -lagoon -lagoons -lagos -lags -lagune -laid -lain -lair -laird -lairds -lairs -laissezfaire -laity -lake -lakes -lakeside -lam -lama -lamas -lamb -lambasted -lambasting -lambda -lambent -lambing -lambs -lambskin -lambswool -lame -lamed -lamely -lameness -lament -lamentable -lamentably -lamentation -lamentations -lamented -lamenter -lamenting -laments -lamest -lamina -laminar -laminate -laminated -laminates -lamination -lamp -lamplight -lamplighter -lamplit -lampoon -lampooned -lampoonery -lampooning -lampoons -lamppost -lampposts -lamprey -lampreys -lamps -lampshade -lampshades -lance -lanced -lancelot -lancer -lancers -lances -lancet -lancets -lancing -land -landed -lander -landfall -landfill -landform -landforms -landholders -landholding -landholdings -landing -landings -landladies -landlady -landless -landlines -landlocked -landlord -landlords -landman -landmark -landmarks -landmass -landmine -landowner -landowners -landowning -lands -landscape -landscaped -landscapes -landscaping -landside -landslide -landslides -landslip -landslips -landward -lane -lanes -language -languages -languid -languidly -languish -languished -languishes -languishing -languor -languorous -languorously -lank -lankier -lankiest -lanky -lanolin -lantern -lanterns -lanyard -laos -lap -lapdog -lapdogs -lapel -lapels -lapful -lapidary -lapland -lapp -lapped -lapping -laps -lapse -lapsed -lapses -lapsing -laptop -laptops -lapwing -lapwings -larceny -larch -larches -lard -larder -larders -lards -large -largely -largeness -larger -largest -largish -largo -lark -larking -larks -larva -larvae -larval -laryngeal -laryngitis -larynx -larynxes -las -lasagne -lascivious -lasciviously -lasciviousness -lase -laser -lasers -lash -lashed -lashers -lashes -lashing -lashings -lasing -lass -lasses -lassie -lassies -lassitude -lasso -lassoed -lassoing -last -lasted -lasting -lastly -lasts -latch -latched -latches -latching -late -latecomer -latecomers -lately -latencies -latency -lateness -latent -later -lateral -lateralisation -laterally -laterals -latest -latex -lath -lathe -lather -lathered -lathers -lathes -laths -latices -latin -latino -latitude -latitudes -latitudinal -latrine -latrines -latter -lattice -latticed -lattices -latvia -latvian -laud -laudable -laudatory -lauded -lauders -lauding -lauds -laugh -laughable -laughably -laughed -laugher -laughing -laughingly -laughs -laughter -launch -launched -launcher -launchers -launches -launching -launder -laundered -launderette -launderettes -laundering -laundress -laundrette -laundrettes -laundries -laundry -laureate -laurel -laurels -lava -lavas -lavatorial -lavatories -lavatory -lavender -lavish -lavished -lavishes -lavishing -lavishly -lavishness -law -lawabiding -lawbreaker -lawbreakers -lawbreaking -lawful -lawfully -lawfulness -lawless -lawlessness -lawmaker -lawmakers -lawman -lawmen -lawn -lawnmower -lawnmowers -lawns -laws -lawsuit -lawsuits -lawyer -lawyers -lax -laxative -laxatives -laxer -laxity -laxness -lay -layabout -layabouts -layby -laybys -layer -layered -layering -layers -laying -layman -laymen -layoff -layoffs -layout -layouts -layperson -lays -lazaret -lazarus -laze -lazed -lazier -laziest -lazily -laziness -lazing -lazuli -lazy -lazybones -lea -leach -leached -leaches -leaching -lead -leaded -leaden -leader -leaderless -leaders -leadership -leaderships -leadfree -leading -leads -leaf -leafed -leafier -leafiest -leafiness -leafing -leafless -leaflet -leaflets -leafy -league -leagues -leak -leakage -leakages -leaked -leakier -leakiest -leakiness -leaking -leaks -leaky -lean -leaned -leaner -leanest -leaning -leanings -leanness -leans -leant -leap -leaped -leaper -leapfrog -leapfrogging -leaping -leaps -leapt -leapyear -learn -learnable -learned -learnedly -learner -learners -learning -learns -learnt -lease -leased -leasehold -leaseholder -leaseholders -leases -leash -leashed -leashes -leashing -leasing -least -leat -leather -leathers -leathery -leave -leaved -leaven -leavened -leavening -leaver -leavers -leaves -leaving -leavings -lebanon -lebensraum -lecher -lecherous -lecherousness -lechery -lectern -lector -lectors -lecture -lectured -lecturer -lecturers -lectures -lectureship -lectureships -lecturing -led -ledge -ledger -ledgers -ledges -lee -leech -leeches -leeching -leeds -leek -leeks -leer -leered -leering -leeringly -leers -lees -leeward -leeway -left -lefthanded -lefthandedly -lefthandedness -lefthander -lefthanders -lefties -leftish -leftist -leftists -leftmost -leftover -leftovers -lefts -leftward -leftwards -lefty -leg -legacies -legacy -legal -legalese -legalisation -legalise -legalised -legalising -legalism -legalistic -legalities -legality -legally -legate -legatee -legatees -legates -legation -legato -legator -legend -legendary -legends -legerdemain -legged -legging -leggings -leggy -leghorn -leghorns -legibility -legible -legibly -legion -legionaries -legionary -legionnaires -legions -legislate -legislated -legislating -legislation -legislative -legislatively -legislator -legislators -legislature -legislatures -legitimacy -legitimate -legitimated -legitimately -legitimating -legitimation -legitimisation -legitimise -legitimised -legitimising -legless -legman -legroom -legs -legume -legumes -leguminous -legwork -leipzig -leisure -leisured -leisurely -leisurewear -leitmotif -leitmotifs -leitmotiv -leitmotivs -lemma -lemmas -lemming -lemmings -lemon -lemonade -lemons -lemur -lemurs -lend -lender -lenders -lending -lends -length -lengthen -lengthened -lengthening -lengthens -lengthier -lengthiest -lengthily -lengths -lengthways -lengthwise -lengthy -leniency -lenient -leniently -lenin -lens -lenses -lensing -lent -lentil -lentils -lento -leonardo -leone -leopard -leopards -leopardskin -leotard -leotards -leper -lepers -leprechaun -leprechauns -leprose -leprosy -leprous -lepton -leptons -lesbian -lesbianism -lesbians -lesion -lesions -lesotho -less -lessee -lessees -lessen -lessened -lessening -lessens -lesser -lesson -lessons -lessor -lessors -lest -let -lethal -lethality -lethally -lethargic -lethargically -lethargy -lets -letter -letterbox -letterboxes -lettered -letterhead -letterheads -lettering -letterpress -letters -letterwriter -letting -lettings -lettish -lettuce -lettuces -leucine -leukaemia -leukemia -level -levelheaded -levelled -leveller -levelling -levelly -levels -lever -leverage -leveraged -levered -levering -levers -levi -leviathan -levied -levies -levitate -levitated -levitates -levitating -levitation -levity -levy -levying -lewd -lewdness -lexeme -lexemes -lexical -lexically -lexicographer -lexicographers -lexicographic -lexicographical -lexicographically -lexicography -lexicon -lexicons -leyden -liabilities -liability -liable -liaise -liaised -liaises -liaising -liaison -liaisons -liar -liars -libation -libations -libel -libeled -libeler -libelled -libeller -libelling -libellous -libels -liberal -liberalisation -liberalise -liberalised -liberalising -liberalism -liberality -liberally -liberals -liberate -liberated -liberates -liberating -liberation -liberationists -liberator -liberators -liberia -libero -libertarian -libertarianism -libertarians -liberties -libertine -libertines -liberty -libidinous -libido -librarian -librarians -librarianship -libraries -library -librate -librated -librates -libretti -librettist -librettists -libretto -libya -libyan -libyans -lice -licence -licences -license -licensed -licensee -licensees -licenses -licensing -licentiate -licentious -licentiousness -lichee -lichen -lichened -lichens -lichi -lichis -lick -licked -lickerish -licking -licks -licorice -lid -lidded -lidless -lido -lids -lie -lied -lieder -lien -liens -lies -lieu -lieutenancy -lieutenant -lieutenants -life -lifeanddeath -lifebelt -lifeblood -lifeboat -lifeboatmen -lifeboats -lifeforms -lifegiving -lifeguard -lifeguards -lifeless -lifelessly -lifelessness -lifelike -lifeline -lifelines -lifelong -liferaft -liferafts -lifesaving -lifesize -lifesized -lifespan -lifespans -lifestyle -lifestyles -lifetaking -lifethreatening -lifetime -lifetimes -lifework -lift -lifted -lifter -lifters -lifting -liftman -liftmen -liftoff -lifts -ligament -ligaments -ligand -ligands -ligature -ligatured -ligatures -ligaturing -light -lighted -lighten -lightened -lightening -lightens -lighter -lighters -lightest -lightheaded -lightheadedness -lighthearted -lightheartedly -lightheartedness -lighthouse -lighthouses -lighting -lightless -lightly -lightness -lightning -lights -lightship -lightweight -lightweights -lignite -likable -like -likeability -likeable -liked -likelier -likeliest -likelihood -likely -likeminded -liken -likened -likeness -likenesses -likening -likens -likes -likewise -liking -likings -lilac -lilacs -lilies -lilliput -lilliputian -lilongwe -lilt -lilting -lily -lilylivered -lilywhite -lima -limb -limber -limbering -limbers -limbless -limbo -limbs -lime -limekiln -limelight -limerick -limericks -limes -limestone -limestones -limeys -liminal -liming -limit -limitation -limitations -limited -limiter -limiters -limiting -limitless -limits -limo -limousin -limousine -limousines -limp -limped -limpet -limpets -limpid -limping -limply -limpopo -limps -linage -linchpin -lincoln -linden -line -lineage -lineages -lineally -lineaments -linear -linearised -linearity -linearly -lined -linefeed -lineman -linemen -linen -linens -lineout -lineouts -liner -liners -lines -linesman -linesmen -lineup -lineups -linger -lingered -lingerer -lingerie -lingering -lingeringly -lingers -lingua -lingual -linguist -linguistic -linguistically -linguistics -linguists -liniment -liniments -lining -linings -link -linkable -linkage -linkages -linked -linker -linkers -linking -links -linkup -linkups -linnet -linnets -lino -linoleum -linseed -lint -lintel -lintels -liny -lion -lioness -lionesses -lionise -lionised -lions -lip -lipase -lipid -lipids -lipped -lipread -lipreading -lips -lipservice -lipstick -lipsticks -liquefaction -liquefied -liquefy -liqueur -liqueurs -liquid -liquidate -liquidated -liquidating -liquidation -liquidations -liquidator -liquidators -liquidise -liquidised -liquidiser -liquidising -liquidity -liquids -liquify -liquor -liquorice -liquorish -liquors -lira -lire -lisbon -lisp -lisped -lisping -lisps -lissom -lissome -lissomeness -lissomness -list -listed -listen -listened -listener -listeners -listening -listens -listeria -listing -listings -listless -listlessly -listlessness -lists -lit -litanies -litany -litchi -literacy -literal -literalism -literalistic -literally -literals -literary -literate -literati -literature -literatures -lithe -lithely -lithium -lithograph -lithographic -lithographs -lithography -lithological -lithologies -lithology -lithosphere -litigant -litigants -litigate -litigating -litigation -litigious -litigiousness -litmus -litotes -litre -litres -litter -littered -littering -litters -little -littleness -littler -littlest -littoral -liturgical -liturgies -liturgy -livable -live -liveable -lived -livelier -liveliest -livelihood -livelihoods -liveliness -lively -liven -livened -livening -livens -liver -liveried -liveries -liverish -livers -liverworts -livery -lives -livestock -livewire -livid -lividly -living -livings -lizard -lizards -llama -llamas -lls -load -loadable -loaded -loader -loaders -loading -loadings -loads -loaf -loafed -loafer -loafers -loafing -loafs -loam -loams -loamy -loan -loanable -loaned -loaner -loaning -loans -loanword -loanwords -loath -loathe -loathed -loathes -loathing -loathsome -loathsomely -loathsomeness -loaves -lob -lobbed -lobbied -lobbies -lobbing -lobby -lobbying -lobbyist -lobbyists -lobe -lobed -lobelia -lobes -lobotomies -lobotomised -lobotomising -lobotomist -lobotomy -lobs -lobster -lobsters -lobular -local -locale -locales -localisation -localisations -localise -localised -localises -localising -localities -locality -locally -locals -locatable -locate -located -locates -locating -location -locational -locations -locative -locator -locators -loch -lochness -lochs -loci -lock -lockable -lockage -locked -locker -lockers -locket -locking -lockjaw -lockout -lockouts -locks -locksmith -loco -locomote -locomotion -locomotive -locomotives -locus -locust -locusts -lode -lodestar -lodestone -lodge -lodged -lodgement -lodger -lodgers -lodges -lodging -lodgings -loess -loft -lofted -loftier -loftiest -loftily -loftiness -lofts -lofty -log -loganberries -loganberry -logarithm -logarithmic -logarithmically -logarithms -logbook -logbooks -logged -logger -loggerheads -loggers -logging -logic -logical -logicality -logically -logician -logicians -logics -logistic -logistical -logistically -logistics -logjam -logo -logoff -logos -logs -loin -loincloth -loins -loire -loiter -loitered -loiterer -loiterers -loitering -loiters -loll -lolled -lollies -lolling -lollipop -lollipops -lolly -london -londoner -lone -lonelier -loneliest -loneliness -lonely -loner -loners -lonesome -lonesomeness -long -longawaited -longed -longer -longest -longevity -longfaced -longhand -longing -longingly -longings -longish -longitude -longitudes -longitudinal -longitudinally -longlasting -longlived -longlost -longs -longstanding -longsuffering -longwinded -longwindedness -loo -look -lookalike -lookalikes -looked -looker -lookers -looking -lookingglass -lookingglasses -lookout -lookouts -looks -loom -loomed -looming -looms -loon -looney -loony -loop -looped -loophole -loopholes -looping -loops -loopy -loose -loosed -loosely -loosen -loosened -looseness -loosening -loosens -looser -looses -loosest -loosing -loot -looted -looter -looters -looting -loots -lop -lope -loped -lopes -loping -lopped -lopper -loppers -lopping -lopsided -lopsidedly -loquacious -loquacity -lord -lording -lordly -lords -lordship -lordships -lore -lorelei -lorries -lorry -lorryload -lorryloads -losable -lose -loser -losers -loses -losing -losings -loss -losses -lost -lot -loth -lotion -lotions -lots -lotteries -lottery -lotto -lotus -louche -loud -louder -loudest -loudhailer -loudhailers -loudly -loudmouthed -loudness -loudspeaker -loudspeakers -louis -lounge -lounged -lounger -loungers -lounges -lounging -louse -lousiest -lousily -lousy -lout -loutish -loutishness -louts -louver -louvers -louvre -louvred -louvres -lovable -love -loveable -lovebirds -loved -loveless -lovelier -lovelies -loveliest -loveliness -lovelorn -lovely -lovemaking -lover -lovers -loves -lovesick -lovestruck -loving -lovingly -low -lower -lowercase -lowered -lowering -lowers -lowest -lowing -lowish -lowkey -lowland -lowlanders -lowlands -lowlier -lowliest -lowly -lowlying -lowness -lowpitched -lows -lowspirited -loyal -loyalist -loyalists -loyally -loyalties -loyalty -lozenge -lozenges -luanda -lubber -lubbers -lubricant -lubricants -lubricate -lubricated -lubricates -lubricating -lubrication -lubricious -lucid -lucidity -lucidly -lucifer -luck -luckier -luckiest -luckily -luckless -lucky -lucrative -lucre -ludicrous -ludicrously -ludicrousness -ludo -lug -luggage -lugged -lugging -lugs -lugubrious -lugubriously -luke -lukewarm -lull -lullabies -lullaby -lulled -lulling -lulls -lulu -lumbago -lumbar -lumber -lumbered -lumbering -lumberjack -lumberjacks -lumbers -lumen -luminal -luminance -luminaries -luminary -luminescence -luminescent -luminosities -luminosity -luminous -luminously -lump -lumped -lumpen -lumpier -lumpiest -lumpiness -lumping -lumpish -lumps -lumpy -luna -lunacies -lunacy -lunar -lunate -lunatic -lunatics -lunch -lunched -luncheon -luncheons -lunchers -lunches -lunching -lunchpack -lunchtime -lunchtimes -lune -lung -lunge -lunged -lunges -lungfish -lungful -lungfuls -lunging -lungs -lupin -lupines -lupins -lur -lurch -lurched -lurchers -lurches -lurching -lure -lured -lures -lurex -lurid -luridly -luring -lurk -lurked -lurker -lurkers -lurking -lurks -lusaka -luscious -lusciously -lush -lusher -lushest -lushness -lust -lusted -lustful -lustfully -lustier -lustiest -lustily -lusting -lustre -lustreless -lustrous -lusts -lusty -lute -lutes -luther -lux -luxor -luxuriance -luxuriant -luxuriantly -luxuriate -luxuriating -luxuries -luxurious -luxuriously -luxury -lychee -lychees -lye -lying -lymph -lymphatic -lymphocyte -lymphocytes -lymphocytic -lymphoid -lymphoma -lymphomas -lynch -lynched -lynches -lynching -lynchpin -lynx -lynxes -lyon -lyons -lyra -lyre -lyres -lyric -lyrical -lyrically -lyricism -lyricist -lyricists -lyrics -lyrist -lysine -mac -macabre -macaque -macaques -macaroni -macaroon -macaroons -macaw -macaws -mace -maces -machete -machetes -machination -machinations -machine -machined -machinegun -machineguns -machinery -machines -machinist -machinists -machismo -macho -macintosh -macintoshes -mackerel -mackintosh -mackintoshes -macro -macrobiotic -macrocosm -macroeconomic -macroeconomics -macromolecular -macromolecules -macron -macrophage -macrophages -macroscopic -macroscopically -mad -madam -madame -madams -madcap -madden -maddened -maddening -maddeningly -maddens -madder -maddest -made -madeira -mademoiselle -madhouse -madly -madman -madmen -madness -madras -madrid -madrigal -madrigals -madwoman -maelstrom -maestro -mafia -mafiosi -mag -magazine -magazines -magenta -maggot -maggots -magi -magic -magical -magically -magician -magicians -magics -magisterial -magisterially -magistrate -magistrates -magma -magmas -magmatic -magnanimity -magnanimosity -magnanimous -magnanimously -magnate -magnates -magnesia -magnesium -magnet -magnetic -magnetically -magnetisation -magnetise -magnetised -magnetism -magnetite -magneto -magnetodynamics -magnetohydrodynamical -magnetohydrodynamics -magnetometer -magnetometers -magnetosphere -magnetron -magnets -magnification -magnifications -magnificence -magnificent -magnificently -magnified -magnifier -magnifies -magnify -magnifying -magniloquent -magnitude -magnitudes -magnolia -magnolias -magnum -magnums -magpie -magpies -mags -mahatma -mahogany -maid -maiden -maidenly -maidens -maids -maidservant -maidservants -mail -mailable -mailbox -mailed -mailer -mailing -mailings -mailman -mailmen -mailorder -mails -mailshot -mailshots -maim -maimed -maiming -maimings -maims -main -mainbrace -maine -mainframe -mainframes -mainland -mainline -mainly -mains -mainsail -mainspring -mainstay -mainstays -mainstream -maintain -maintainability -maintainable -maintained -maintainer -maintainers -maintaining -maintains -maintenance -maisonette -maisonettes -maize -maizes -majestic -majestically -majesties -majesty -majolica -major -majorette -majorettes -majorities -majority -majors -make -makeover -maker -makers -makes -makeshift -makeup -makeweight -making -makings -malachite -maladaptive -maladies -maladjusted -maladjustment -maladministration -maladroit -malady -malaise -malaria -malarial -malathion -malawi -malay -malayan -malays -malaysia -malcontent -malcontents -maldives -male -malefaction -malefactions -malefactor -malefactors -maleness -males -malevolence -malevolent -malevolently -malformation -malformations -malformed -malfunction -malfunctioned -malfunctioning -malfunctions -malice -malices -malicious -maliciously -maliciousness -malign -malignancies -malignancy -malignant -malignantly -maligned -maligners -maligning -malignity -maligns -malingerers -malingering -mall -mallard -mallards -malleability -malleable -mallet -mallets -mallow -malls -malnourished -malnourishment -malnutrition -malodorous -malpractice -malpractices -malt -malta -malted -maltese -malting -maltreat -maltreated -maltreatment -malts -malty -malva -mama -mamas -mamba -mambas -mammal -mammalia -mammalian -mammals -mammary -mammoth -mammoths -mammy -man -manacle -manacled -manacles -manage -manageability -manageable -managed -management -managements -manager -manageress -manageresses -managerial -managerially -managers -managership -manages -managing -manatee -manciple -mandarin -mandarins -mandate -mandated -mandates -mandating -mandatory -mandela -mandible -mandibles -mandibular -mandolin -mandolins -mandrake -mandril -mandrill -mane -maned -manes -maneuver -manfully -manganese -mange -manger -mangers -mangle -mangled -mangler -mangles -mangling -mango -mangrove -mangroves -manhandle -manhandled -manhandling -manhole -manholes -manhood -manhunt -manhunts -mania -maniac -maniacal -maniacally -maniacs -manias -manic -manically -manicdepressive -manicure -manicured -manifest -manifestation -manifestations -manifested -manifesting -manifestly -manifesto -manifests -manifold -manifolds -manikin -manila -manipulable -manipulate -manipulated -manipulates -manipulating -manipulation -manipulations -manipulative -manipulator -manipulators -mankind -manliest -manliness -manly -manmade -manna -manned -mannequin -mannequins -manner -mannered -mannerism -mannerisms -mannerist -mannerliness -mannerly -manners -manning -manoeuvrability -manoeuvrable -manoeuvre -manoeuvred -manoeuvres -manoeuvring -manoeuvrings -manometer -manor -manorial -manors -manpower -manse -manservant -mansion -mansions -mansized -manslaughter -mantel -mantelpiece -mantelpieces -mantelshelf -mantids -mantis -mantissa -mantissas -mantle -mantled -mantles -mantling -mantra -mantrap -mantraps -mantras -manual -manually -manuals -manufacture -manufactured -manufacturer -manufacturers -manufactures -manufacturing -manure -manured -manures -manuring -manuscript -manuscripts -many -maoism -maoist -maoists -maori -map -maple -maples -mappable -mapped -mapper -mappers -mapping -mappings -maps -maputo -maquettes -mar -mara -marathon -marathons -marauders -marauding -marble -marbled -marbles -march -marched -marcher -marchers -marches -marching -marchioness -mare -mares -margarine -margarines -margate -margin -marginal -marginalia -marginalisation -marginalise -marginalised -marginalises -marginalising -marginality -marginally -marginals -margins -maria -marigold -marigolds -marijuana -marina -marinade -marinas -marinate -marinated -marine -mariner -mariners -marines -marionette -marionettes -marital -maritime -mark -marked -markedly -marker -markers -market -marketability -marketable -marketed -marketeer -marketeers -marketer -marketing -marketplace -markets -marking -markings -marks -marksman -marksmanship -marksmen -markup -markups -marl -marls -marmalade -marmoset -marmosets -marmot -marmots -maroon -marooned -marooning -maroons -marque -marquee -marquees -marques -marquess -marquetry -marquis -marred -marriage -marriageable -marriages -married -marries -marring -marrow -marrows -marry -marrying -mars -marsala -marsh -marshal -marshalled -marshaller -marshalling -marshals -marshes -marshgas -marshier -marshiest -marshiness -marshland -marshmallow -marshmallows -marshy -marsupial -marsupials -mart -marten -martens -martial -martian -martians -martin -martinet -martingale -martingales -martini -martins -martyr -martyrdom -martyred -martyrs -martyry -marvel -marvelled -marvelling -marvellous -marvellously -marvels -marx -marxism -marxist -marxists -mary -marzipan -mas -mascara -mascot -mascots -masculine -masculinity -maser -maseru -mash -mashed -masher -mashing -mask -masked -masking -masks -masochism -masochist -masochistic -masochistically -masochists -mason -masonic -masonry -masons -masque -masquerade -masqueraded -masquerades -masquerading -masques -mass -massacre -massacred -massacres -massacring -massage -massaged -massager -massages -massaging -massed -masses -masseur -masseurs -masseuse -masseuses -massif -massing -massive -massively -massless -massproduced -massproducing -mast -mastectomy -masted -master -masterclass -mastered -masterful -masterfully -mastering -masterly -mastermind -masterminded -masterminding -masterpiece -masterpieces -masters -mastership -masterwork -masterworks -mastery -masthead -masticating -mastication -mastiff -mastitis -mastodon -mastodons -mastoid -mastoids -masts -mat -matador -matadors -match -matchable -matchbox -matchboxes -matched -matcher -matches -matching -matchless -matchmaker -matchmaking -matchplay -matchstick -matchsticks -mate -mated -mater -material -materialisation -materialise -materialised -materialises -materialising -materialism -materialist -materialistic -materialistically -materialists -materiality -materially -materials -maternal -maternally -maternity -mates -math -mathematical -mathematically -mathematician -mathematicians -mathematics -maths -matinee -matinees -mating -matings -matins -matriarch -matriarchal -matriarchies -matriarchy -matrices -matriculate -matriculated -matriculating -matriculation -matrilineal -matrimonial -matrimonially -matrimony -matrix -matrixes -matron -matronly -matrons -mats -matt -matte -matted -matter -mattered -mattering -matteroffact -matters -matthew -matting -mattress -mattresses -maturation -maturational -mature -matured -maturely -maturer -matures -maturing -maturity -maudlin -maul -mauled -mauler -maulers -mauling -mauls -maumau -mausoleum -mausoleums -mauve -maverick -mavericks -maw -mawkish -mawkishness -maxi -maxim -maxima -maximal -maximality -maximally -maximisation -maximise -maximised -maximiser -maximises -maximising -maxims -maximum -may -maya -mayas -maybe -mayday -maydays -mayflies -mayflower -mayfly -mayhap -mayhem -mayonnaise -mayor -mayoral -mayoralty -mayoress -mayors -maypole -maze -mazes -mazier -maziest -mazurka -mazy -mbabane -me -mead -meadow -meadowland -meadows -meagre -meagrely -meagreness -meal -mealie -mealies -meals -mealtime -mealtimes -mealy -mean -meander -meandered -meandering -meanderings -meanders -meaner -meanest -meanie -meanies -meaning -meaningful -meaningfully -meaningfulness -meaningless -meaninglessly -meaninglessness -meanings -meanly -meanness -means -meant -meantime -meanwhile -meany -measles -measly -measurable -measurably -measure -measured -measureless -measurement -measurements -measures -measuring -meat -meataxe -meatball -meatballs -meatier -meatiest -meatless -meatpie -meats -meaty -mecca -mechanic -mechanical -mechanically -mechanicals -mechanics -mechanisable -mechanisation -mechanise -mechanised -mechanising -mechanism -mechanisms -mechanist -mechanistic -mechanistically -medal -medallion -medallions -medallist -medallists -medals -meddle -meddled -meddler -meddlers -meddles -meddlesome -meddling -media -mediaeval -medial -medially -median -medians -mediate -mediated -mediates -mediating -mediation -mediator -mediators -mediatory -medic -medical -medically -medicals -medicate -medicated -medication -medications -medicinal -medicine -medicines -medics -medieval -medievalist -medievalists -mediocre -mediocrity -meditate -meditated -meditates -meditating -meditation -meditations -meditative -meditatively -meditator -medium -mediums -mediumsized -medlar -medley -medleys -medulla -medusa -meek -meeker -meekest -meekly -meekness -meet -meeter -meeting -meetings -meets -mega -megabyte -megabytes -megahertz -megajoules -megalith -megalithic -megalomania -megalomaniac -megalomaniacs -megaparsec -megaphone -megastar -megaton -megatons -megavolt -megawatt -megawatts -meiosis -meiotic -melancholia -melancholic -melancholies -melancholy -melange -melanin -melanoma -melanomas -melatonin -meld -melee -mellifluous -mellifluously -mellifluousness -mellow -mellowed -mellower -mellowing -mellows -melodic -melodically -melodies -melodious -melodiously -melodrama -melodramas -melodramatic -melodramatically -melody -melon -melons -melt -meltdown -melted -melter -melting -melts -member -members -membership -memberships -membrane -membranes -memento -memo -memoir -memoirs -memorabilia -memorable -memorably -memoranda -memorandum -memorandums -memorial -memorials -memories -memorisation -memorise -memorised -memorises -memorising -memory -memphis -men -menace -menaced -menaces -menacing -menacingly -menagerie -menarche -mend -mendacious -mendacity -mended -mendel -mendelevium -mender -menders -mendicant -mending -mends -menfolk -menhir -menhirs -menial -meningitis -meniscus -menopausal -menopause -menorah -menstrual -menstruating -menstruation -menswear -mental -mentalistic -mentalities -mentality -mentally -menthol -mention -mentionable -mentioned -mentioning -mentions -mentor -mentors -menu -menus -meow -meows -mercantile -mercenaries -mercenary -merchandise -merchandising -merchant -merchantability -merchantable -merchantman -merchantmen -merchants -mercies -merciful -mercifully -merciless -mercilessly -mercurial -mercuric -mercury -mercy -mere -merely -merest -meretricious -merge -merged -merger -mergers -merges -merging -meridian -meridians -meridional -meringue -meringues -merino -merit -merited -meriting -meritocracy -meritocratic -meritocrats -meritorious -merits -mermaid -mermaids -merman -mermen -meromorphic -merrier -merriest -merrily -merriment -merry -merrygoround -merrygorounds -merrymaking -mescaline -mesh -meshed -meshes -meshing -mesmeric -mesmerised -mesmerising -mesolithic -meson -mesons -mesosphere -mesozoic -mess -message -messages -messaging -messed -messenger -messengers -messes -messiah -messier -messiest -messily -messiness -messing -messy -mestizo -met -metabolic -metabolically -metabolise -metabolised -metabolises -metabolism -metabolisms -metal -metalanguage -metalinguistic -metalled -metallic -metallised -metallurgical -metallurgist -metallurgy -metals -metalwork -metalworking -metamorphic -metamorphism -metamorphose -metamorphosed -metamorphoses -metamorphosis -metaphor -metaphoric -metaphorical -metaphorically -metaphors -metaphysical -metaphysically -metaphysics -metastability -metastable -metastases -metastasis -metastatic -metatarsal -meted -metempsychosis -meteor -meteoric -meteorite -meteorites -meteoritic -meteorological -meteorologist -meteorologists -meteorology -meteors -meter -metered -metering -meters -methadone -methane -methanol -methionine -method -methodical -methodically -methodological -methodologically -methodologies -methodology -methods -methyl -methylated -methylene -meticulous -meticulously -metier -metonymic -metonymy -metre -metres -metric -metrical -metrically -metrication -metrics -metro -metronome -metronomes -metronomic -metropolis -metropolises -metropolitan -mettle -mew -mewing -mews -mexican -mexicans -mexico -mezzanine -mezzosoprano -miami -miasma -mica -mice -micelles -michigan -micro -microanalyses -microbe -microbes -microbial -microbic -microbiological -microbiologist -microbiologists -microbiology -microchip -microchips -microcode -microcomputer -microcomputers -microcosm -microcosmic -microdensitometer -microdot -microelectronic -microelectronics -microfarad -microfiche -microfilm -microfilming -microgrammes -micrograms -micrograph -micrographs -microgravity -microhydrodynamics -microlight -micrometer -micrometers -micrometres -micron -microns -microorganism -microorganisms -microphone -microphones -microprocessor -microprocessors -microprogram -microscope -microscopes -microscopic -microscopically -microscopist -microscopy -microsecond -microseconds -microsurgery -microwave -microwaveable -microwaved -microwaves -micturition -mid -midafternoon -midair -midas -midday -middays -midden -middle -middleage -middleaged -middleclass -middleman -middlemen -middleoftheroad -middles -middlesized -middleweight -middling -midevening -midfield -midfielder -midfielders -midflight -midge -midges -midget -midgets -midi -midland -midlands -midlife -midline -midmorning -midmost -midnight -midnights -midribs -midriff -midship -midshipman -midships -midst -midstream -midsummer -midway -midweek -midwicket -midwife -midwifery -midwinter -midwives -mien -might -mightier -mightiest -mightily -mights -mighty -migraine -migraines -migrant -migrants -migrate -migrated -migrates -migrating -migration -migrations -migratory -mike -mikes -milady -milan -mild -milder -mildest -mildew -mildewed -mildews -mildewy -mildly -mildmannered -mildness -mile -mileage -mileages -milepost -mileposts -miler -miles -milestone -milestones -milieu -milieus -milieux -militancy -militant -militantly -militants -militarily -militarisation -militarised -militarism -militarist -militaristic -military -militate -militated -militates -militating -militia -militiaman -militiamen -militias -milk -milked -milker -milkers -milkier -milkiest -milking -milkmaid -milkmaids -milkman -milkmen -milks -milkshake -milkshakes -milky -milkyway -mill -milled -millenarian -millenarianism -millennia -millennial -millennium -miller -millers -millet -millibars -milligram -milligrams -millilitres -millimetre -millimetres -milliner -milliners -millinery -milling -million -millionaire -millionaires -millions -millionth -millionths -millipede -millipedes -millisecond -milliseconds -millpond -mills -millstone -millstones -milord -milt -mime -mimed -mimeographed -mimes -mimetic -mimic -mimicked -mimicker -mimicking -mimicry -mimics -miming -mimosa -minaret -minarets -mince -minced -mincemeat -mincer -mincers -minces -mincing -mind -mindboggling -mindbogglingly -minded -mindedness -minder -minders -mindful -minding -mindless -mindlessly -mindlessness -mindreader -minds -mindset -mine -mined -minedetector -minefield -minefields -miner -mineral -mineralisation -mineralised -mineralogical -mineralogy -minerals -miners -mines -mineshaft -minestrone -minesweeper -minesweepers -mineworkers -mingle -mingled -mingles -mingling -mini -miniature -miniatures -miniaturisation -miniaturise -miniaturised -miniaturises -miniaturising -miniaturist -minibar -minibus -minibuses -minicab -minicomputer -minicomputers -minify -minim -minima -minimal -minimalism -minimalist -minimalistic -minimalists -minimality -minimally -minimisation -minimise -minimised -minimiser -minimises -minimising -minimum -mining -minings -minion -minions -miniskirt -minister -ministered -ministerial -ministerially -ministering -ministers -ministration -ministrations -ministries -ministry -mink -minke -minks -minnow -minnows -minor -minorities -minority -minors -minster -minstrel -minstrels -mint -minted -mintier -mintiest -minting -mints -minty -minuet -minuets -minus -minuscule -minuses -minute -minuted -minutely -minuteness -minutes -minutest -minutiae -minx -minxes -miosis -miracle -miracles -miraculous -miraculously -miraculousness -mirage -mirages -mire -mired -mires -mirror -mirrored -mirroring -mirrors -mirth -mirthful -mirthless -mirthlessly -misadventure -misaligned -misalignment -misanalysed -misanthrope -misanthropes -misanthropic -misanthropists -misanthropy -misapplication -misapply -misapprehension -misapprehensions -misappropriated -misappropriation -misbegotten -misbehave -misbehaved -misbehaves -misbehaving -misbehaviour -miscalculate -miscalculated -miscalculation -miscalculations -miscarriage -miscarriages -miscarried -miscarry -miscarrying -miscast -miscasting -miscegenation -miscellanea -miscellaneous -miscellanies -miscellany -mischance -mischief -mischiefmakers -mischiefmaking -mischievous -mischievously -miscible -misclassified -miscomprehended -misconceived -misconception -misconceptions -misconduct -misconfiguration -misconstrued -miscopying -miscount -miscounted -miscounting -miscreant -miscreants -miscue -miscues -misdate -misdeal -misdealing -misdeed -misdeeds -misdemeanour -misdemeanours -misdiagnosis -misdirect -misdirected -misdirecting -misdirection -misdirections -misdoing -miser -miserable -miserably -miseries -miserliness -miserly -misers -misery -misfield -misfiled -misfire -misfired -misfires -misfit -misfits -misfortune -misfortunes -misgive -misgiving -misgivings -misgovernment -misguide -misguided -misguidedly -mishandle -mishandled -mishandles -mishandling -mishap -mishaps -mishear -misheard -mishearing -mishears -mishitting -misidentification -misinform -misinformation -misinformed -misinterpret -misinterpretation -misinterpretations -misinterpreted -misinterpreting -misinterprets -misjudge -misjudged -misjudgement -misjudgements -misjudging -misjudgment -mislabelled -mislaid -mislay -mislead -misleading -misleadingly -misleads -misled -mismanage -mismanaged -mismanagement -mismatch -mismatched -mismatches -mismatching -misname -misnamed -misnomer -misnomers -misogynist -misogynistic -misogynists -misogyny -misplace -misplaced -misplacement -misplaces -misplacing -mispositioned -misprint -misprinted -misprinting -misprints -mispronounced -mispronouncing -mispronunciation -mispronunciations -misquotation -misquote -misquoted -misquotes -misquoting -misread -misreading -misremember -misremembered -misremembering -misrepresent -misrepresentation -misrepresentations -misrepresented -misrepresenting -misrepresents -misrule -miss -missal -missals -missed -misses -misshapen -missile -missiles -missing -mission -missionaries -missionary -missions -missive -missives -missouri -misspell -misspelled -misspelling -misspellings -misspells -misspelt -misspend -misspent -misstatement -missteps -missus -missuses -missy -mist -mistake -mistaken -mistakenly -mistakes -mistaking -misted -mister -misters -mistier -mistiest -mistily -mistime -mistimed -mistiness -misting -mistletoe -mistook -mistranslated -mistranslates -mistranslating -mistranslation -mistranslations -mistreat -mistreated -mistreating -mistreatment -mistress -mistresses -mistrust -mistrusted -mistrustful -mistrustfully -mistrusting -mistrusts -mists -misty -mistype -mistyped -mistypes -mistyping -mistypings -misunderstand -misunderstanding -misunderstandings -misunderstands -misunderstood -misuse -misused -misuser -misuses -misusing -mite -mites -mitigate -mitigated -mitigates -mitigating -mitigation -mitigatory -mitochondria -mitochondrial -mitosis -mitre -mitred -mitres -mitt -mitten -mittens -mitts -mix -mixable -mixed -mixer -mixers -mixes -mixing -mixture -mixtures -mixup -mixups -mnemonic -mnemonically -mnemonics -moan -moaned -moaner -moaners -moaning -moans -moas -moat -moated -moats -mob -mobbed -mobbing -mobbish -mobile -mobiles -mobilisable -mobilisation -mobilise -mobilised -mobilises -mobilising -mobilities -mobility -mobs -mobster -mobsters -moccasin -moccasins -mock -mocked -mocker -mockeries -mockers -mockery -mocking -mockingbird -mockingly -mocks -mockup -mockups -mod -modal -modalities -modality -mode -model -modelled -modeller -modellers -modelling -models -modem -modems -moderate -moderated -moderately -moderates -moderating -moderation -moderations -moderator -moderators -modern -moderner -modernisation -modernisations -modernise -modernised -modernising -modernism -modernist -modernistic -modernists -modernity -modes -modest -modestly -modesty -modicum -modifiable -modification -modifications -modified -modifier -modifiers -modifies -modify -modifying -modish -modishly -modular -modularisation -modularise -modularised -modularising -modularity -modulate -modulated -modulates -modulating -modulation -modulations -modulator -module -modules -moduli -modulus -mogul -moguls -mohair -mohairs -moiety -moist -moisten -moistened -moistening -moistens -moister -moistness -moisture -moisturise -moisturiser -moisturisers -moisturising -molar -molarities -molarity -molars -molasses -mold -molds -moldy -mole -molecular -molecule -molecules -molehill -molehills -moles -moleskin -molest -molestation -molestations -molested -molester -molesters -molesting -molests -mollified -mollifies -mollify -mollusc -molluscan -molluscs -molten -molts -molybdenum -mom -moment -momentarily -momentary -momentous -moments -momentum -moms -monaco -monadic -monalisa -monarch -monarchic -monarchical -monarchies -monarchist -monarchists -monarchs -monarchy -monasteries -monastery -monastic -monasticism -monaural -monday -mondays -monetarism -monetarist -monetarists -monetary -money -moneyed -moneylender -moneylenders -moneyless -moneys -monger -mongers -mongol -mongols -mongoose -mongrel -mongrels -monies -monition -monitor -monitored -monitoring -monitors -monk -monkey -monkeyed -monkeying -monkeys -monkfish -monkish -monks -mono -monochromatic -monochrome -monocle -monocled -monoclonal -monocular -monoculture -monocytes -monogamous -monogamously -monogamy -monogram -monogrammed -monograph -monographic -monographs -monolayer -monolayers -monolingual -monolith -monolithic -monoliths -monologue -monologues -monomania -monomer -monomeric -monomers -monomial -monomials -monomolecular -monophonic -monophthongs -monoplane -monopole -monopoles -monopolies -monopolisation -monopolise -monopolised -monopolises -monopolising -monopolist -monopolistic -monopolists -monopoly -monorail -monostable -monosyllabic -monosyllable -monosyllables -monotheism -monotheist -monotheistic -monotheists -monotone -monotonic -monotonically -monotonicity -monotonous -monotonously -monotony -monoxide -monroe -monsieur -monsoon -monsoons -monster -monsters -monstrosities -monstrosity -monstrous -monstrously -montage -montages -month -monthlies -monthly -months -montreal -monument -monumental -monumentally -monuments -moo -mood -moodiest -moodily -moodiness -moods -moody -mooed -mooing -moon -moonbeam -moonbeams -mooning -moonless -moonlight -moonlighting -moonlit -moonrise -moons -moonshine -moonshot -moonshots -moonstones -moor -moored -moorhen -moorhens -mooring -moorings -moorland -moorlands -moors -moos -moose -moot -mooted -mop -mope -moped -mopeds -mopes -moping -mopped -mopping -mops -moraine -moraines -moral -morale -morales -moralise -moralised -moralising -moralism -moralist -moralistic -moralists -moralities -morality -morally -morals -morass -morasses -moratorium -moray -morays -morbid -morbidity -morbidly -mordant -more -moreover -mores -morgue -moribund -moribundity -moribundly -mormon -mormons -morn -morning -mornings -morns -moroccan -morocco -moron -moronic -morons -morose -morosely -moroseness -morph -morpheme -morphemes -morpheus -morphia -morphine -morphism -morphisms -morphogenesis -morphogenetic -morphological -morphologically -morphologies -morphology -morrow -morse -morsel -morsels -mort -mortal -mortalities -mortality -mortally -mortals -mortar -mortars -mortgage -mortgageable -mortgaged -mortgagee -mortgagees -mortgages -mortgaging -mortgagor -mortice -mortices -mortification -mortified -mortify -mortifying -mortise -mortises -mortuary -mosaic -mosaics -moscow -moses -mosque -mosques -mosquito -moss -mosses -mossier -mossiest -mossy -most -mostly -motel -motels -motes -motet -motets -moth -mothball -mothballed -mothballs -motheaten -mother -motherboard -motherboards -mothered -motherhood -mothering -motherinlaw -motherland -motherless -motherly -motherofpearl -mothers -mothersinlaw -motherstobe -moths -motif -motifs -motile -motility -motion -motional -motioned -motioning -motionless -motionlessly -motions -motivate -motivated -motivates -motivating -motivation -motivational -motivations -motivator -motivators -motive -motiveless -motives -motley -motlier -motliest -motocross -motor -motorbike -motorbikes -motorcade -motorcar -motorcars -motorcycle -motorcycles -motorcycling -motorcyclist -motorcyclists -motored -motoring -motorised -motorist -motorists -motors -motorway -motorways -mottled -motto -mould -moulded -moulder -mouldering -moulders -mouldier -mouldiest -moulding -mouldings -moulds -mouldy -moult -moulted -moulting -moults -mound -mounded -mounds -mount -mountable -mountain -mountaineer -mountaineering -mountaineers -mountainous -mountains -mountainside -mountainsides -mounted -mountie -mounties -mounting -mountings -mounts -mourn -mourned -mourner -mourners -mournful -mournfully -mournfulness -mourning -mourns -mouse -mouselike -mousetrap -mousetraps -mousey -moussaka -mousse -mousses -moustache -moustached -moustaches -mousy -mouth -mouthed -mouthful -mouthfuls -mouthing -mouthorgan -mouthparts -mouthpiece -mouthpieces -mouths -mouthtomouth -mouthwash -mouthwatering -movable -move -moveable -moved -movement -movements -mover -movers -moves -movie -movies -moving -movingly -mow -mowed -mower -mowers -mowing -mown -mows -mozart -mr -mrs -ms -mu -much -muchness -muck -mucked -mucking -mucks -mucky -mucosa -mucous -mucus -mud -muddied -muddier -muddies -muddiest -muddle -muddled -muddles -muddling -muddy -muddying -mudflats -mudflow -mudflows -mudguard -mudguards -mudlarks -muds -muesli -muff -muffed -muffin -muffins -muffle -muffled -muffler -mufflers -muffling -muffs -mufti -mug -mugged -mugger -muggers -muggier -mugging -muggings -muggy -mugs -mugshots -mulberries -mulberry -mulch -mulches -mulching -mule -mules -mull -mullah -mullahs -mulled -mullet -mulling -mullioned -mullions -multichannel -multicolour -multicoloured -multicultural -multiculturalism -multidimensional -multifarious -multiform -multifunction -multifunctional -multilateral -multilateralism -multilayer -multilevel -multilingual -multimedia -multimeter -multimillion -multinational -multinationals -multiphase -multiple -multiples -multiplex -multiplexed -multiplexer -multiplexers -multiplexes -multiplexing -multiplexor -multiplexors -multiplication -multiplications -multiplicative -multiplicities -multiplicity -multiplied -multiplier -multipliers -multiplies -multiply -multiplying -multiprocessing -multiprocessor -multiprocessors -multiprogramming -multiracial -multitude -multitudes -mum -mumble -mumbled -mumbler -mumbles -mumbling -mumblings -mumbojumbo -mummies -mummification -mummified -mummify -mummy -mumps -mums -munch -munched -muncher -munchers -munches -munching -mundane -mundanely -munich -municipal -municipalities -municipality -munificence -munificent -munificently -munition -munitions -muons -mural -murals -murder -murdered -murderer -murderers -murderess -murdering -murderous -murderously -murders -murk -murkier -murkiest -murkiness -murky -murmur -murmured -murmurer -murmuring -murmurings -murmurs -murray -muscadel -muscat -muscle -muscled -muscles -muscling -muscular -muscularity -musculature -musculoskeletal -muse -mused -muses -museum -museums -mush -mushes -mushroom -mushroomed -mushrooming -mushrooms -mushy -music -musical -musicality -musically -musicals -musician -musicians -musicianship -musicologist -musicologists -musicology -musing -musingly -musings -musk -musket -musketeer -musketeers -muskets -muskier -muskiest -musks -musky -muslim -muslims -muslin -mussel -mussels -must -mustache -mustang -mustangs -mustard -muster -mustered -mustering -musters -mustier -mustiest -mustily -mustiness -musts -musty -mutability -mutable -mutagens -mutant -mutants -mutate -mutated -mutates -mutating -mutation -mutational -mutations -mute -muted -mutely -muteness -mutes -mutilate -mutilated -mutilates -mutilating -mutilation -mutilations -mutineer -mutineers -muting -mutinied -mutinies -mutinous -mutinously -mutiny -mutt -mutter -muttered -mutterer -mutterers -muttering -mutterings -mutters -mutton -muttons -mutts -mutual -mutuality -mutually -muzak -muzzle -muzzled -muzzles -muzzling -my -myalgic -myelin -myna -mynahs -myocardial -myope -myopia -myopic -myopically -myriad -myriads -myrrh -myself -mysteries -mysterious -mysteriously -mystery -mystic -mystical -mystically -mysticism -mystics -mystification -mystified -mystifies -mystify -mystifying -mystique -myth -mythic -mythical -mythological -mythologies -mythologised -mythology -myths -myxomatosis -nab -nabbed -nabs -nadir -nag -nagasaki -nagged -nagger -nagging -nags -naiad -naiads -nail -nailbiting -nailed -nailing -nails -nairobi -naive -naively -naivete -naivety -naked -nakedly -nakedness -name -nameable -namecalling -named -namedropping -nameless -namely -nameplate -nameplates -names -namesake -namesakes -namibia -namibian -naming -namings -nannies -nanny -nanometre -nanometres -nanosecond -nanoseconds -nanotechnology -naomi -nap -napalm -nape -naphtha -napkin -napkins -naples -napoleon -napped -nappies -napping -nappy -naps -narcissism -narcissistic -narcoleptic -narcosis -narcotic -narcotics -narrate -narrated -narrates -narrating -narration -narrations -narrative -narratives -narratology -narrator -narrators -narrow -narrowed -narrower -narrowest -narrowing -narrowly -narrowminded -narrowmindedness -narrowness -narrows -narwhal -nasal -nasalised -nasally -nascent -nastier -nastiest -nastily -nastiness -nasturtium -nasturtiums -nasty -natal -nation -national -nationalisation -nationalisations -nationalise -nationalised -nationalising -nationalism -nationalist -nationalistic -nationalists -nationalities -nationality -nationally -nationals -nationhood -nations -nationwide -native -natives -nativity -nato -nattering -natural -naturalisation -naturalise -naturalised -naturalism -naturalist -naturalistic -naturalists -naturally -naturalness -nature -natures -naturist -naturists -naught -naughtiest -naughtily -naughtiness -naughts -naughty -nausea -nauseate -nauseated -nauseates -nauseating -nauseatingly -nauseous -nauseousness -nautical -nautili -nautilus -naval -nave -navel -navels -navies -navigable -navigate -navigated -navigating -navigation -navigational -navigator -navigators -navvies -navvy -navy -nay -nazi -naziism -nazis -nazism -ndebele -ne -near -nearby -neared -nearer -nearest -nearing -nearly -nearness -nears -nearside -nearsighted -neat -neaten -neatening -neatens -neater -neatest -neatly -neatness -nebula -nebulae -nebular -nebulas -nebulosity -nebulous -nebulously -nebulousness -necessaries -necessarily -necessary -necessitate -necessitated -necessitates -necessitating -necessities -necessity -neck -neckband -necked -necking -necklace -necklaces -neckline -necklines -necks -necktie -necromancer -necromancers -necromancy -necromantic -necrophilia -necrophiliac -necrophiliacs -necropolis -necropsy -necrosis -necrotic -nectar -nectarines -nectars -nee -need -needed -needful -needier -neediest -neediness -needing -needle -needlecraft -needled -needles -needless -needlessly -needlework -needling -needs -needy -negate -negated -negates -negating -negation -negations -negative -negatively -negativeness -negatives -negativism -negativity -negev -neglect -neglected -neglectful -neglecting -neglects -negligee -negligees -negligence -negligent -negligently -negligibility -negligible -negligibly -negotiable -negotiate -negotiated -negotiates -negotiating -negotiation -negotiations -negotiator -negotiators -negroid -neigh -neighbour -neighbourhood -neighbourhoods -neighbouring -neighbourliness -neighbourly -neighbours -neighed -neighing -neither -nematode -nematodes -nemesis -neolithic -neologism -neologisms -neon -neonatal -neonate -neonates -neophyte -neophytes -neoplasm -neoplasms -neoprene -nepal -nephew -nephews -nephritis -nepotism -neptune -neptunium -nerd -nerds -nerve -nerveless -nervelessness -nerves -nervous -nervously -nervousness -nervy -nest -nestable -nested -nestegg -nesting -nestle -nestled -nestles -nestling -nests -net -netball -nether -nethermost -nets -nett -netted -netting -nettle -nettled -nettles -netts -network -networked -networking -networks -neural -neuralgia -neurobiology -neurological -neurologically -neurologist -neurologists -neurology -neuron -neuronal -neurone -neurones -neurons -neurophysiology -neuroscience -neuroscientists -neuroses -neurosis -neurosurgeon -neurosurgeons -neurosurgery -neurotic -neurotically -neurotics -neurotransmitter -neurotransmitters -neuter -neutered -neutering -neuters -neutral -neutralisation -neutralise -neutralised -neutraliser -neutralises -neutralising -neutralism -neutralist -neutrality -neutrally -neutrals -neutrino -neutron -neutrons -never -neverending -nevertheless -new -newborn -newcomer -newcomers -newer -newest -newfangled -newfound -newish -newlook -newly -newlywed -newlyweds -newness -news -newsagent -newsagents -newsboy -newscast -newscasters -newsflash -newsflashes -newsletter -newsletters -newsman -newsmen -newspaper -newspapermen -newspapers -newsprint -newsreader -newsreaders -newsreel -newsreels -newsroom -newsstand -newsstands -newsworthy -newsy -newt -newton -newts -next -ngoing -nguni -ngunis -niagara -nib -nibble -nibbled -nibbler -nibblers -nibbles -nibbling -nibs -nice -nicely -niceness -nicer -nicest -niceties -nicety -niche -niches -nick -nicked -nickel -nicking -nickname -nicknamed -nicknames -nicks -nicotine -niece -nieces -niftily -nifty -niger -nigeria -niggardly -niggle -niggled -niggles -niggling -nigh -night -nightcap -nightcaps -nightclothes -nightclub -nightclubs -nightdress -nightdresses -nightfall -nightgown -nightie -nighties -nightingale -nightingales -nightlife -nightly -nightmare -nightmares -nightmarish -nights -nightwatchman -nightwear -nihilism -nihilist -nihilistic -nil -nile -nils -nimble -nimbleness -nimbly -nimbus -nincompoop -nine -ninefold -nines -nineteen -nineteenth -nineties -ninetieth -ninety -nineveh -ninny -ninth -ninths -nip -nipped -nipper -nipping -nipple -nipples -nippon -nips -nirvana -nit -nitpicking -nitrate -nitrates -nitric -nitrogen -nitrogenous -nitroglycerine -nitrous -nits -nitwit -nixon -no -noah -nobility -noble -nobleman -noblemen -nobleness -nobler -nobles -noblest -nobly -nobodies -nobody -noctuids -nocturnal -nocturnally -nocturne -nocturnes -nod -nodal -nodded -nodding -noddle -noddy -node -nodes -nods -nodular -nodule -noduled -nodules -noel -noggin -nogging -nohow -noise -noiseless -noiselessly -noises -noisier -noisiest -noisily -noisiness -noisome -noisy -nomad -nomadic -nomads -nomenclature -nomenclatures -nominal -nominally -nominate -nominated -nominates -nominating -nomination -nominations -nominative -nominator -nominee -nominees -non -nonbeliever -nonbelievers -nonchalance -nonchalant -nonchalantly -nonconformist -nonconformists -nonconformity -nondrinkers -none -nonentities -nonentity -nonessential -nonessentials -nonetheless -nonevent -nonexistence -nonexistent -nonfunctional -noninterference -nonintervention -nonparticipation -nonpayment -nonplussed -nonsense -nonsenses -nonsensical -nonsmoker -nonsmokers -nonsmoking -nonviolence -nonviolent -noodle -noodles -nook -nooks -noon -noonday -noons -noontide -noose -noosed -nooses -nor -noradrenalin -noradrenaline -nordic -norm -normal -normalcy -normalisable -normalisation -normalisations -normalise -normalised -normaliser -normalisers -normalises -normalising -normality -normally -normals -norman -normandy -normans -normative -normed -norms -norsemen -north -northbound -northerly -northern -northerner -northerners -northernmost -northmen -northward -northwards -norway -nose -nosed -nosedive -noses -nosey -nosier -nosiest -nosily -nosiness -nosing -nostalgia -nostalgic -nostalgically -nostril -nostrils -nostrum -nosy -not -notable -notables -notably -notaries -notary -notation -notational -notationally -notations -notch -notched -notches -notching -note -notebook -notebooks -noted -notepad -notepads -notepaper -notes -noteworthy -nothing -nothingness -nothings -notice -noticeable -noticeably -noticeboard -noticeboards -noticed -notices -noticing -notifiable -notification -notifications -notified -notifies -notify -notifying -noting -notion -notional -notionally -notions -notoriety -notorious -notoriously -notwithstanding -nougat -nougats -nought -noughts -noun -nounal -nouns -nourish -nourished -nourishes -nourishing -nourishment -novel -novelette -novelist -novelistic -novelists -novelle -novels -novelties -novelty -november -novice -novices -now -nowadays -nowhere -noxious -noxiously -noxiousness -nozzle -nozzles -nu -nuance -nuances -nuclear -nuclei -nucleic -nucleus -nude -nudeness -nudes -nudge -nudged -nudges -nudging -nudism -nudist -nudists -nudities -nudity -nugget -nuggets -nuisance -nuisances -nuke -null -nullification -nullified -nullifies -nullify -nullifying -nullity -nulls -numb -numbed -number -numbered -numbering -numberings -numberless -numberplate -numbers -numbing -numbingly -numbly -numbness -numbs -numbskull -numeracy -numeral -numerals -numerate -numerator -numerators -numeric -numerical -numerically -numerological -numerologist -numerologists -numerology -numerous -numismatic -numismatics -numskull -nun -nunneries -nunnery -nuns -nuptial -nuptials -nurse -nursed -nursemaid -nursemaids -nurseries -nursery -nurseryman -nurserymen -nurses -nursing -nurture -nurtured -nurtures -nurturing -nut -nutation -nutcracker -nutcrackers -nutmeg -nutmegs -nutrient -nutrients -nutriment -nutrition -nutritional -nutritionally -nutritionist -nutritionists -nutritious -nutritive -nuts -nutshell -nuttier -nutty -nuzzle -nuzzled -nuzzles -nuzzling -nyala -nylon -nylons -nymph -nympholepsy -nymphomania -nymphomaniac -nymphs -oaf -oafish -oafs -oak -oaken -oaks -oakum -oar -oars -oarsman -oarsmen -oases -oasis -oast -oat -oatcakes -oath -oaths -oatmeal -oats -obduracy -obdurate -obdurately -obedience -obedient -obediently -obeisance -obelisk -obelisks -obese -obesity -obey -obeyed -obeying -obeys -obfuscate -obfuscated -obfuscates -obfuscation -obfuscatory -obituaries -obituary -object -objected -objectified -objecting -objection -objectionable -objectionableness -objectionably -objections -objective -objectively -objectives -objectivity -objectless -objector -objectors -objects -oblate -obligate -obligated -obligation -obligations -obligatorily -obligatory -oblige -obliged -obliges -obliging -obligingly -oblique -obliqued -obliquely -obliqueness -obliquity -obliterate -obliterated -obliterates -obliterating -obliteration -oblivion -oblivious -obliviousness -oblong -oblongs -obloquy -obnoxious -obnoxiously -obnoxiousness -oboe -oboes -oboist -obscene -obscenely -obscenities -obscenity -obscurantism -obscurantist -obscuration -obscure -obscured -obscurely -obscureness -obscurer -obscures -obscurest -obscuring -obscurities -obscurity -obsequious -obsequiously -obsequiousness -observability -observable -observables -observably -observance -observances -observant -observation -observational -observationally -observations -observatories -observatory -observe -observed -observer -observers -observes -observing -obsess -obsessed -obsesses -obsessing -obsession -obsessional -obsessions -obsessive -obsessively -obsessiveness -obsidian -obsolescence -obsolescent -obsolete -obstacle -obstacles -obstetric -obstetrician -obstetricians -obstetrics -obstinacy -obstinate -obstinately -obstreperous -obstruct -obstructed -obstructing -obstruction -obstructionism -obstructions -obstructive -obstructively -obstructiveness -obstructs -obtain -obtainable -obtained -obtaining -obtains -obtrude -obtruded -obtruding -obtrusive -obtrusiveness -obtuse -obtusely -obtuseness -obverse -obviate -obviated -obviates -obviating -obvious -obviously -obviousness -occasion -occasional -occasionally -occasioned -occasioning -occasions -occident -occidental -occipital -occluded -occludes -occlusion -occult -occultism -occults -occupancies -occupancy -occupant -occupants -occupation -occupational -occupationally -occupations -occupied -occupier -occupiers -occupies -occupy -occupying -occur -occurred -occurrence -occurrences -occurring -occurs -ocean -oceanic -oceanographer -oceanographers -oceanographic -oceanography -oceans -ocelot -ocelots -ochre -ochres -octagon -octagonal -octagons -octahedral -octahedron -octal -octane -octanes -octant -octave -octaves -octavo -octet -octets -october -octogenarian -octogenarians -octopus -octopuses -ocular -oculist -odd -odder -oddest -oddities -oddity -oddjob -oddly -oddment -oddments -oddness -odds -ode -odes -odin -odious -odiously -odiousness -odium -odiums -odometer -odoriferous -odorous -odour -odourless -odours -odyssey -oedema -oedipus -oesophagus -oestrogen -oestrogens -oestrus -oeuvre -oeuvres -of -off -offal -offbeat -offcut -offcuts -offence -offences -offend -offended -offender -offenders -offending -offends -offensive -offensively -offensiveness -offensives -offer -offered -offering -offerings -offers -offertory -offhand -office -officer -officers -officership -officerships -offices -official -officialdom -officially -officialness -officials -officiate -officiated -officiating -officious -officiously -officiousness -offprint -offset -offshoot -offshore -oft -often -ogle -ogled -ogling -ogre -ogres -ogrish -oh -ohio -ohm -ohmic -ohms -oil -oilcloth -oiled -oiler -oilers -oilfield -oilfields -oilier -oiliest -oiliness -oiling -oilman -oilmen -oilrig -oils -oily -oink -oinked -oinks -ointment -ointments -ok -okapi -okapis -okay -okayed -okays -oklahoma -old -oldage -olden -older -oldest -oldfashioned -oldie -oldish -oldmaids -oldtimer -oldtimers -ole -oleander -oleanders -olfactory -olive -oliveoil -oliver -olives -olm -olms -olympia -olympiad -olympian -olympic -olympics -olympus -ombudsman -ombudsmen -omega -omelette -omelettes -omen -omens -ominous -ominously -omission -omissions -omit -omits -omitted -omitting -omnibus -omnibuses -omnidirectional -omnipotence -omnipotent -omnipresence -omnipresent -omniscience -omniscient -omnivore -omnivores -omnivorous -on -onager -onagers -once -one -oneness -oner -onerous -ones -oneself -onesided -onesidedly -onesidedness -ongoing -onion -onions -onlooker -onlookers -onlooking -only -onlybegotten -onset -onshore -onslaught -onslaughts -ontario -onto -ontogeny -ontological -ontologically -ontology -onus -onuses -onward -onwards -onyx -onyxes -oocytes -oodles -ooh -oolitic -oology -oompah -oops -ooze -oozed -oozes -oozing -oozy -opacity -opal -opalescent -opals -opaque -open -opened -opener -openers -openhanded -openhandedness -openheart -openhearted -opening -openings -openly -openminded -openmindedness -openness -opens -opera -operable -operand -operands -operas -operate -operated -operates -operatic -operating -operation -operational -operationally -operations -operative -operatives -operator -operators -operculum -operetta -operettas -ophthalmic -ophthalmics -ophthalmologist -ophthalmologists -ophthalmology -opiate -opiates -opine -opined -opines -opining -opinion -opinionated -opinions -opioid -opioids -opium -opossum -opponent -opponents -opportune -opportunely -opportunism -opportunist -opportunistic -opportunistically -opportunists -opportunities -opportunity -oppose -opposed -opposes -opposing -opposite -oppositely -opposites -opposition -oppositional -oppositions -oppress -oppressed -oppresses -oppressing -oppression -oppressions -oppressive -oppressively -oppressiveness -oppressor -oppressors -opprobrious -opprobrium -opt -opted -optic -optical -optically -optician -opticians -optics -optima -optimal -optimality -optimally -optimisation -optimisations -optimise -optimised -optimiser -optimisers -optimises -optimising -optimism -optimist -optimistic -optimistically -optimists -optimum -opting -option -optional -optionality -optionally -options -optoelectronic -opts -opulence -opulent -opus -opuses -or -oracle -oracles -oracular -oral -orally -orang -orange -oranges -orangs -orangutan -orangutans -orate -orated -orates -orating -oration -orations -orator -oratorical -oratorio -orators -oratory -orb -orbit -orbital -orbitals -orbited -orbiter -orbiting -orbits -orbs -orca -orchard -orchards -orchestra -orchestral -orchestras -orchestrate -orchestrated -orchestrates -orchestrating -orchestration -orchestrations -orchestrator -orchid -orchids -ordain -ordained -ordaining -ordains -ordeal -ordeals -order -ordered -ordering -orderings -orderless -orderlies -orderliness -orderly -orders -ordinal -ordinals -ordinance -ordinances -ordinands -ordinarily -ordinariness -ordinary -ordinate -ordinates -ordination -ordinations -ordnance -ordure -ore -ores -organ -organelles -organic -organically -organics -organisable -organisation -organisational -organisationally -organisations -organise -organised -organiser -organisers -organises -organising -organism -organisms -organist -organists -organs -organza -orgies -orgy -orient -orientable -oriental -orientalism -orientals -orientate -orientated -orientates -orientation -orientations -oriented -orienteering -orienting -orifice -orifices -origami -origin -original -originality -originally -originals -originate -originated -originates -originating -origination -originator -originators -origins -orimulsion -ornament -ornamental -ornamentation -ornamented -ornamenting -ornaments -ornate -ornately -ornithological -ornithologist -ornithologists -ornithology -orphan -orphanage -orphanages -orphaned -orphans -orpheus -orthodontist -orthodox -orthodoxies -orthodoxy -orthogonal -orthogonality -orthogonally -orthographic -orthographical -orthographically -orthography -orthonormal -orthopaedic -orthopaedics -orthorhombic -oryxes -oscar -oscars -oscillate -oscillated -oscillates -oscillating -oscillation -oscillations -oscillator -oscillators -oscillatory -oscilloscope -oscilloscopes -osiris -oslo -osmium -osmosis -osmotic -osprey -ospreys -ossification -ossified -ostensible -ostensibly -ostentation -ostentatious -ostentatiously -osteoarthritis -osteopath -osteopaths -osteopathy -osteoporosis -ostler -ostlers -ostracise -ostracised -ostracism -ostrich -ostriches -other -otherness -others -otherwise -otter -otters -ottoman -ouch -ought -ounce -ounces -our -ours -ourselves -oust -ousted -ouster -ousting -ousts -out -outage -outages -outback -outbid -outbids -outboard -outbound -outbreak -outbreaks -outbred -outbuilding -outbuildings -outburst -outbursts -outcall -outcast -outcasts -outclassed -outcome -outcomes -outcries -outcrop -outcrops -outcry -outdated -outdid -outdo -outdoes -outdoing -outdone -outdoor -outdoors -outer -outermost -outface -outfall -outfalls -outfield -outfit -outfits -outfitters -outflank -outflanked -outflow -outflows -outfox -outfoxed -outfoxes -outgo -outgoing -outgoings -outgrew -outgrow -outgrowing -outgrown -outgrowth -outgrowths -outguess -outhouse -outhouses -outing -outings -outlandish -outlast -outlasted -outlasts -outlaw -outlawed -outlawing -outlawry -outlaws -outlay -outlays -outlet -outlets -outlier -outliers -outline -outlined -outlines -outlining -outlive -outlived -outlives -outliving -outlook -outlooks -outlying -outmanoeuvre -outmanoeuvred -outmoded -outmost -outnumber -outnumbered -outnumbering -outnumbers -outpace -outpaced -outpacing -outpatient -outpatients -outperform -outperformed -outperforming -outperforms -outplacement -outplay -outplayed -outpointed -outpointing -outpost -outposts -outpouring -outpourings -output -outputs -outputting -outrage -outraged -outrageous -outrageously -outrages -outraging -outran -outrank -outreach -outride -outrider -outriders -outrigger -outright -outrun -outruns -outs -outsell -outset -outsets -outshine -outshines -outshining -outshone -outside -outsider -outsiders -outsides -outsize -outskirts -outsmart -outsold -outsourcing -outspan -outspoken -outspokenly -outspokenness -outspread -outstanding -outstandingly -outstation -outstations -outstay -outstayed -outstep -outstretched -outstrip -outstripped -outstripping -outstrips -outvoted -outward -outwardly -outwards -outweigh -outweighed -outweighing -outweighs -outwit -outwith -outwits -outwitted -outwitting -outwork -outworking -ova -oval -ovals -ovarian -ovaries -ovary -ovate -ovation -ovations -oven -ovens -over -overact -overacted -overacting -overactive -overacts -overall -overallocation -overalls -overambitious -overanxious -overate -overbearing -overboard -overburdened -overcame -overcapacity -overcast -overcharge -overcharged -overcharging -overcoat -overcoats -overcome -overcomes -overcoming -overcommitment -overcommitments -overcompensate -overcomplexity -overcomplicated -overconfident -overcook -overcooked -overcrowd -overcrowded -overcrowding -overdetermined -overdid -overdo -overdoes -overdoing -overdone -overdose -overdosed -overdoses -overdosing -overdraft -overdrafts -overdramatic -overdraw -overdrawn -overdressed -overdrive -overdubbing -overdue -overeat -overeating -overeats -overemotional -overemphasis -overemphasise -overemphasised -overenthusiastic -overestimate -overestimated -overestimates -overestimating -overestimation -overexposed -overexposure -overextended -overfamiliarity -overfed -overfeed -overfeeding -overfill -overfishing -overflow -overflowed -overflowing -overflown -overflows -overfly -overflying -overfull -overgeneralised -overgeneralising -overgrazing -overground -overgrown -overgrowth -overhand -overhang -overhanging -overhangs -overhasty -overhaul -overhauled -overhauling -overhauls -overhead -overheads -overhear -overheard -overhearing -overhears -overheat -overheated -overheating -overhung -overincredulous -overindulgence -overindulgent -overinflated -overjoyed -overkill -overladen -overlaid -overlain -overland -overlap -overlapped -overlapping -overlaps -overlay -overlaying -overlays -overleaf -overlie -overlies -overload -overloaded -overloading -overloads -overlong -overlook -overlooked -overlooking -overlooks -overlord -overlords -overly -overlying -overmanning -overmantel -overmatching -overmuch -overnight -overoptimistic -overpaid -overpass -overpay -overpayment -overplay -overplayed -overplaying -overpopulated -overpopulation -overpopulous -overpower -overpowered -overpowering -overpoweringly -overpowers -overpressure -overpriced -overprint -overprinted -overprinting -overprints -overproduced -overproduction -overqualified -overran -overrate -overrated -overreach -overreached -overreaching -overreact -overreacted -overreacting -overreaction -overreacts -overrepresented -overridden -override -overrides -overriding -overripe -overrode -overrule -overruled -overruling -overrun -overrunning -overruns -overs -oversampled -oversampling -oversaw -overseas -oversee -overseeing -overseen -overseer -overseers -oversees -oversensitive -oversensitivity -oversexed -overshadow -overshadowed -overshadowing -overshadows -overshoot -overshooting -overshoots -overshot -oversight -oversights -oversimplification -oversimplifications -oversimplified -oversimplifies -oversimplify -oversimplifying -oversize -oversized -oversleep -overslept -overspend -overspending -overspent -overspill -overstaffed -overstate -overstated -overstatement -overstates -overstating -overstep -overstepped -overstepping -oversteps -overstocked -overstocking -overstress -overstressed -overstretch -overstretched -overstrung -overstuffed -oversubscribed -oversupply -overt -overtake -overtaken -overtaker -overtakers -overtakes -overtaking -overtax -overthetop -overthrew -overthrow -overthrowing -overthrown -overthrows -overtightened -overtime -overtly -overtness -overtone -overtones -overtook -overtops -overture -overtures -overturn -overturned -overturning -overturns -overuse -overused -overuses -overvalue -overvalued -overview -overviews -overweening -overweight -overwhelm -overwhelmed -overwhelming -overwhelmingly -overwhelms -overwinter -overwintered -overwintering -overwork -overworked -overworking -overwrite -overwrites -overwriting -overwritten -overwrote -overwrought -oviduct -ovoid -ovular -ovulation -ovum -ow -owe -owed -owes -owing -owl -owlet -owlets -owlish -owlishly -owls -own -owned -owner -owners -ownership -ownerships -owning -owns -ox -oxalate -oxalic -oxcart -oxen -oxford -oxidant -oxidants -oxidation -oxide -oxides -oxidisation -oxidise -oxidised -oxidiser -oxidising -oxtail -oxtails -oxygen -oxygenated -oxygenating -oxygenation -oxymoron -oyster -oysters -ozone -ozonefriendly -pa -pace -paced -pacemaker -pacemakers -paceman -pacemen -pacer -pacers -paces -pacey -pachyderm -pacific -pacification -pacified -pacifier -pacifies -pacifism -pacifist -pacifists -pacify -pacifying -pacing -pack -packable -package -packaged -packages -packaging -packed -packer -packers -packet -packets -packhorse -packing -packings -packs -pact -pacts -pad -padded -padding -paddings -paddle -paddled -paddler -paddlers -paddles -paddling -paddock -paddocks -paddy -padlock -padlocked -padlocking -padlocks -padre -padres -pads -paean -paeans -paediatric -paediatrician -paediatricians -paediatrics -paedophile -paedophiles -paedophilia -paella -paeony -pagan -paganism -pagans -page -pageant -pageantry -pageants -pageboy -paged -pageful -pager -pagers -pages -paginal -paginate -paginated -paginating -pagination -paging -pagoda -pagodas -paid -paidup -pail -pails -pain -pained -painful -painfully -painfulness -paining -painkiller -painkillers -painless -painlessly -pains -painstaking -painstakingly -paint -paintbox -paintbrush -painted -painter -painters -painting -paintings -paints -paintwork -pair -paired -pairing -pairings -pairs -pairwise -pajama -pajamas -pakistan -pal -palace -palaces -palaeographic -palaeolithic -palaeontological -palaeontologist -palaeontologists -palaeontology -palatability -palatable -palatal -palate -palates -palatial -palatinate -palatine -palaver -pale -paled -paleface -palely -paleness -paler -pales -palest -palette -palettes -palimpsest -palindrome -palindromes -palindromic -paling -palisade -palisades -pall -palladium -pallbearers -palled -pallet -pallets -palliative -palliatives -pallid -pallmall -pallor -palls -palm -palmed -palming -palmist -palmistry -palms -palmtop -palmtops -palmy -palp -palpable -palpably -palpate -palpated -palpates -palpitate -palpitated -palpitating -palpitation -palpitations -pals -palsied -palsy -paltrier -paltriest -paltriness -paltry -paludal -pampas -pamper -pampered -pampering -pampers -pamphlet -pamphleteer -pamphleteers -pamphlets -pan -panacea -panaceas -panache -panama -pancake -pancaked -pancakes -pancreas -pancreatic -panda -pandas -pandemic -pandemics -pandemonium -pander -pandering -panders -pandora -pane -paned -panel -panelled -panelling -panellist -panellists -panels -panes -pang -panga -pangas -pangolin -pangs -panic -panicked -panicking -panicky -panics -panicstricken -panjandrum -panned -pannier -panniers -panning -panoply -panorama -panoramas -panoramic -pans -pansies -pansy -pant -pantaloons -pantechnicon -panted -pantheism -pantheist -pantheistic -pantheon -panther -panthers -panties -pantile -pantiled -pantiles -panting -pantograph -pantographs -pantomime -pantomimes -pantries -pantry -pants -panzer -pap -papa -papacy -papal -paparazzi -papas -papaw -papaws -papaya -paper -paperback -paperbacks -papered -papering -paperless -papers -paperthin -paperweight -paperweights -paperwork -papery -papilla -papist -pappy -paprika -papua -papule -papyri -papyrus -par -parable -parables -parabola -parabolas -parabolic -paraboloid -paraboloids -paracetamol -parachute -parachuted -parachutes -parachuting -parachutist -parachutists -parade -paraded -parader -parades -paradigm -paradigmatic -paradigms -parading -paradise -paradises -paradox -paradoxes -paradoxical -paradoxically -paraffin -paragliding -paragon -paragons -paragraph -paragraphing -paragraphs -paraguay -parakeet -parakeets -paralinguistic -parallax -parallaxes -parallel -paralleled -parallelepiped -paralleling -parallelism -parallelogram -parallelograms -parallels -paralyse -paralysed -paralyses -paralysing -paralysis -paralytic -paralytically -paramagnetic -paramagnetism -paramedic -paramedical -paramedics -parameter -parameters -parametric -parametrically -parametrisation -parametrise -parametrised -parametrises -paramilitaries -paramilitary -paramount -paramountcy -paramour -paranoia -paranoiac -paranoiacs -paranoid -paranormal -parapet -parapets -paraphernalia -paraphrase -paraphrased -paraphrases -paraphrasing -paraplegic -parapsychologist -parapsychology -paraquat -parasite -parasites -parasitic -parasitical -parasitised -parasitism -parasitologist -parasitology -parasol -parasols -paratroop -paratrooper -paratroopers -paratroops -parboil -parcel -parcelled -parcelling -parcels -parch -parched -parches -parchment -parchments -pardon -pardonable -pardoned -pardoning -pardons -pare -pared -parent -parentage -parental -parented -parenteral -parentheses -parenthesis -parenthesise -parenthesised -parenthetic -parenthetical -parenthetically -parenthood -parenting -parentinlaw -parents -parentsinlaw -pares -parfait -parfaits -pariah -pariahs -parietal -paring -paris -parish -parishes -parishioner -parishioners -parisian -parities -parity -park -parka -parkas -parked -parking -parkland -parks -parlance -parley -parleying -parliament -parliamentarian -parliamentarians -parliamentary -parliaments -parlour -parlourmaid -parlours -parlous -parochial -parochialism -parochiality -parodied -parodies -parodist -parody -parodying -parole -paroxysm -paroxysms -parquet -parried -parries -parrot -parroting -parrots -parry -parrying -parse -parsec -parsecs -parsed -parser -parsers -parses -parsimonious -parsimony -parsing -parsings -parsley -parsnip -parsnips -parson -parsonage -parsons -part -partake -partaken -partaker -partakers -partakes -partaking -parted -parthenogenesis -partial -partiality -partially -participant -participants -participate -participated -participates -participating -participation -participative -participators -participatory -participle -participles -particle -particles -particular -particularise -particularised -particularism -particularities -particularity -particularly -particulars -particulate -particulates -parties -parting -partings -partisan -partisans -partisanship -partition -partitioned -partitioning -partitions -partly -partner -partnered -partnering -partners -partnership -partnerships -partook -partridge -partridges -parts -parttime -party -parvenu -pascal -pascals -paschal -pass -passable -passably -passage -passages -passageway -passageways -passant -passe -passed -passenger -passengers -passer -passers -passersby -passes -passim -passing -passion -passionate -passionately -passionateness -passionless -passions -passivated -passive -passively -passives -passivity -passmark -passover -passport -passports -password -passwords -past -pasta -pastas -paste -pasteboard -pasted -pastel -pastels -pastes -pasteur -pasteurisation -pasteurised -pastiche -pastiches -pasties -pastille -pastime -pastimes -pasting -pastis -pastor -pastoral -pastoralism -pastors -pastrami -pastries -pastry -pasts -pasture -pastured -pastureland -pastures -pasturing -pasty -pat -patch -patchable -patched -patches -patchier -patchiest -patchily -patchiness -patching -patchup -patchwork -patchy -pate -patella -paten -patent -patentable -patented -patentee -patenting -patently -patents -pater -paternal -paternalism -paternalist -paternalistic -paternally -paternity -pates -path -pathetic -pathetically -pathfinder -pathfinders -pathless -pathogen -pathogenesis -pathogenic -pathogens -pathological -pathologically -pathologies -pathologist -pathologists -pathology -pathos -paths -pathway -pathways -patience -patient -patiently -patients -patina -patination -patio -patisserie -patois -patriarch -patriarchal -patriarchies -patriarchs -patriarchy -patrician -patricians -patrilineal -patrimony -patriot -patriotic -patriotism -patriots -patrol -patrolled -patrolling -patrols -patron -patronage -patroness -patronesses -patronisation -patronise -patronised -patronises -patronising -patronisingly -patrons -pats -patted -patten -pattens -patter -pattered -pattering -pattern -patterned -patterning -patternless -patterns -patters -patties -patting -paucity -paul -paunch -paunchy -pauper -paupers -pause -paused -pauses -pausing -pave -paved -pavement -pavements -paves -pavilion -pavilions -paving -pavings -pavlov -paw -pawed -pawing -pawn -pawnbroker -pawnbrokers -pawned -pawning -pawns -pawnshop -pawnshops -pawpaw -pawpaws -paws -pay -payable -payback -payday -paydays -payed -payee -payees -payer -payers -paying -payload -payloads -paymaster -paymasters -payment -payments -payphone -payphones -payroll -payrolls -pays -payslips -pea -peace -peaceable -peaceably -peaceful -peacefully -peacefulness -peacekeepers -peacekeeping -peacemaker -peacemakers -peacemaking -peacetime -peach -peaches -peachier -peachiest -peachy -peacock -peacocks -peafowl -peahens -peak -peaked -peakiness -peaking -peaks -peaky -peal -pealed -pealing -peals -peanut -peanuts -pear -pearl -pearls -pearly -pears -peartrees -peas -peasant -peasantry -peasants -peat -peatland -peatlands -peaty -pebble -pebbled -pebbles -pebbly -pecan -peccary -peck -pecked -pecker -peckers -pecking -peckish -pecks -pectin -pectoral -pectorals -peculiar -peculiarities -peculiarity -peculiarly -pecuniary -pedagogic -pedagogical -pedagogically -pedagogue -pedagogy -pedal -pedalled -pedalling -pedals -pedant -pedantic -pedantically -pedantry -pedants -peddle -peddled -peddler -peddlers -peddles -peddling -pederasts -pedestal -pedestals -pedestrian -pedestrianisation -pedestrianised -pedestrians -pedigree -pedigrees -pediment -pedimented -pediments -pedlar -pedlars -pedology -peek -peeked -peeking -peeks -peel -peeled -peeler -peelers -peeling -peelings -peels -peep -peeped -peeper -peepers -peephole -peeping -peeps -peer -peerage -peerages -peered -peering -peerless -peers -peevish -peevishly -peevishness -peg -pegasus -pegged -pegging -pegs -pejorative -pejoratively -pejoratives -pekan -peking -pele -pelican -pelicans -pellet -pellets -pelmet -pelmets -pelt -pelted -pelting -pelts -pelvic -pelvis -pelvises -pen -penal -penalisation -penalise -penalised -penalises -penalising -penalties -penalty -penance -penances -pence -penchant -pencil -pencilled -pencilling -pencils -pendant -pendants -pending -pendulous -pendulum -pendulums -penetrable -penetrate -penetrated -penetrates -penetrating -penetratingly -penetration -penetrations -penetrative -penguin -penguins -penicillin -penile -peninsula -peninsular -peninsulas -penitence -penitent -penitential -penitentiary -penitently -penitents -penknife -penname -pennames -pennant -pennants -penned -pennies -penniless -penning -penny -pennypinching -penology -pens -pension -pensionable -pensioned -pensioner -pensioners -pensioning -pensions -pensive -pensively -pensiveness -pent -pentagon -pentagonal -pentagons -pentagram -pentagrams -pentameter -pentameters -pentasyllabic -pentathlete -pentathlon -pentatonic -pentecostal -penthouse -penultimate -penultimately -penumbra -penurious -penury -peonies -people -peopled -peoples -pep -peperoni -pepper -peppercorn -peppercorns -peppered -peppering -peppermint -peppermints -peppers -peppery -peps -peptic -peptide -peptides -per -perambulate -perambulated -perambulating -perambulations -perambulator -perannum -percales -perceivable -perceive -perceived -perceives -perceiving -percent -percentage -percentages -percentile -percentiles -percept -perceptibility -perceptible -perceptibly -perception -perceptions -perceptive -perceptively -perceptiveness -percepts -perceptual -perceptually -perch -perchance -perched -percher -perches -perching -perchlorate -percipient -percolate -percolated -percolates -percolating -percolation -percolator -percolators -percuss -percussed -percusses -percussing -percussion -percussionist -percussionists -percussive -percussively -percutaneous -perdition -peregrinations -peregrine -peregrines -peremptorily -peremptoriness -peremptory -perennial -perennially -perennials -perestroika -perfect -perfected -perfectibility -perfecting -perfection -perfectionism -perfectionist -perfectionists -perfections -perfectly -perfects -perfidious -perfidiously -perfidy -perforate -perforated -perforation -perforations -perforce -perform -performable -performance -performances -performed -performer -performers -performing -performs -perfume -perfumed -perfumery -perfumes -perfuming -perfunctorily -perfunctory -perfused -perfusion -pergola -pergolas -perhaps -peri -periastron -perigee -periglacial -perihelion -peril -perilous -perilously -perils -perimeter -perimeters -perinatal -perineal -perineum -period -periodic -periodical -periodically -periodicals -periodicity -periods -perioperative -peripatetic -peripheral -peripherally -peripherals -peripheries -periphery -periphrasis -periphrastic -periscope -periscopes -perish -perishable -perishables -perished -perishes -perishing -peritoneum -perjure -perjured -perjurer -perjury -perk -perked -perkier -perkiest -perkily -perking -perks -perky -perm -permafrost -permanence -permanency -permanent -permanently -permanganate -permeability -permeable -permeate -permeated -permeates -permeating -permeation -permed -perming -permissibility -permissible -permission -permissions -permissive -permissiveness -permit -permits -permitted -permitting -permittivity -perms -permutation -permutations -permute -permuted -permutes -permuting -pernicious -perniciousness -peroration -peroxidase -peroxide -peroxides -perpendicular -perpendicularly -perpendiculars -perpetrate -perpetrated -perpetrates -perpetrating -perpetration -perpetrator -perpetrators -perpetual -perpetually -perpetuate -perpetuated -perpetuates -perpetuating -perpetuation -perpetuity -perplex -perplexed -perplexedly -perplexing -perplexities -perplexity -perquisite -perquisites -perron -perry -persecute -persecuted -persecuting -persecution -persecutions -persecutor -persecutors -perseverance -persevere -persevered -perseveres -persevering -perseveringly -persia -persian -persist -persisted -persistence -persistent -persistently -persisting -persists -person -persona -personable -personae -personage -personages -personal -personalisation -personalise -personalised -personalising -personalities -personality -personally -personification -personifications -personified -personifies -personify -personifying -personnel -persons -perspective -perspectives -perspex -perspicacious -perspicacity -perspicuity -perspicuous -perspicuously -perspiration -perspire -perspiring -persuade -persuaded -persuaders -persuades -persuading -persuasion -persuasions -persuasive -persuasively -persuasiveness -pert -pertain -pertained -pertaining -pertains -perth -pertinacious -pertinaciously -pertinacity -pertinence -pertinent -pertinently -pertly -pertness -perturb -perturbation -perturbations -perturbed -perturbing -peru -perusal -peruse -perused -peruses -perusing -peruvian -pervade -pervaded -pervades -pervading -pervasive -pervasiveness -perverse -perversely -perverseness -perversion -perversions -perversity -pervert -perverted -perverting -perverts -peseta -pesetas -pesky -pessimism -pessimist -pessimistic -pessimistically -pessimists -pest -pester -pestered -pestering -pesticide -pesticides -pestilence -pestilent -pestilential -pestle -pests -pet -petal -petals -petard -peter -petered -petering -peters -pethidine -petit -petite -petition -petitioned -petitioner -petitioners -petitioning -petitions -petrel -petrels -petrification -petrified -petrifies -petrify -petrifying -petrochemical -petrochemicals -petrographic -petrographical -petrol -petroleum -petrological -petrology -pets -petted -petticoat -petticoats -pettier -pettiest -pettifoggers -pettifogging -pettiness -petting -pettish -pettishly -pettishness -petty -petulance -petulant -petulantly -petunia -petunias -pew -pews -pewter -phalanx -phantasy -phantom -phantoms -pharaoh -pharmaceutical -pharmaceuticals -pharmacies -pharmacist -pharmacists -pharmacological -pharmacologist -pharmacologists -pharmacology -pharmacy -pharynx -phase -phased -phases -phasing -pheasant -pheasants -phenol -phenols -phenomena -phenomenal -phenomenally -phenomenological -phenomenologically -phenomenologists -phenomenology -phenomenon -phenotype -phenotypes -phenylalanine -pheromone -pheromones -phew -philanthropic -philanthropist -philanthropists -philanthropy -philatelic -philatelists -philately -philharmonic -philistine -philological -philologist -philologists -philology -philosopher -philosophers -philosophic -philosophical -philosophically -philosophies -philosophise -philosophising -philosophy -phlebotomy -phlegm -phlegmatic -phlegmatically -phlogiston -phlox -phobia -phobias -phobic -phoenix -phoenixes -phone -phoned -phoneme -phonemes -phonemic -phonemically -phoner -phones -phonetic -phonetically -phoneticians -phoneticist -phonetics -phoney -phoneys -phoning -phonograph -phonographic -phonological -phonologically -phonology -phonon -phony -phooey -phosphatase -phosphate -phosphates -phosphatic -phospholipids -phosphor -phosphorescence -phosphorescent -phosphoric -phosphorous -phosphors -phosphorus -photo -photocells -photochemical -photochemically -photochemistry -photocopied -photocopier -photocopiers -photocopies -photocopy -photocopying -photoelectric -photoelectrically -photogenic -photograph -photographed -photographer -photographers -photographic -photographically -photographing -photographs -photography -photolysis -photolytic -photometric -photometrically -photometry -photomultiplier -photon -photons -photoreceptor -photos -photosensitive -photosphere -photostat -photosynthesis -photosynthesising -photosynthetic -photosynthetically -phototypesetter -phototypesetting -photovoltaic -phrasal -phrase -phrasebook -phrased -phraseology -phrases -phrasing -phrenological -phrenologically -phrenologists -phrenology -phyla -phylactery -phylogenetic -phylogeny -phylum -physic -physical -physicality -physically -physician -physicians -physicist -physicists -physics -physio -physiognomies -physiognomy -physiological -physiologically -physiologist -physiologists -physiology -physiotherapist -physiotherapists -physiotherapy -physique -phytoplankton -pi -pianissimo -pianist -pianistic -pianists -piano -pianoforte -pianola -piazza -piazzas -pica -picaresque -picasso -piccolo -pick -pickaxe -pickaxes -picked -picker -pickerel -pickerels -pickers -picket -picketed -picketing -pickets -picking -pickings -pickle -pickled -pickles -pickling -pickpocket -pickpocketing -pickpockets -picks -pickup -pickups -picnic -picnicked -picnickers -picnicking -picnics -picoseconds -pictogram -pictograms -pictographic -pictorial -pictorially -pictural -picture -pictured -pictures -picturesque -picturesquely -picturesqueness -picturing -pidgin -pie -piebald -piece -pieced -piecemeal -pieces -piecewise -piecework -piecing -pied -pier -pierce -pierced -piercer -piercers -pierces -piercing -piercingly -piers -pies -pieta -piety -piezoelectric -piffle -pig -pigeon -pigeons -piggery -piggish -piggy -piggyback -piglet -piglets -pigment -pigmentation -pigmented -pigments -pigs -pigsties -pigsty -pigtail -pigtailed -pigtails -pike -pikemen -pikes -pikestaff -pilaster -pilasters -pilchard -pilchards -pile -piled -piles -pileup -pilfer -pilfered -pilfering -pilgrim -pilgrimage -pilgrimages -pilgrims -piling -pill -pillage -pillaged -pillages -pillaging -pillar -pillared -pillars -pillbox -pillion -pilloried -pillories -pillory -pillow -pillowcase -pillowcases -pillowed -pillows -pills -pilot -piloted -piloting -pilots -pimp -pimpernel -pimping -pimple -pimpled -pimples -pimply -pimps -pin -pinafore -pinafores -pinball -pincer -pincered -pincers -pinch -pinched -pincher -pinches -pinching -pincushion -pincushions -pine -pineal -pineapple -pineapples -pined -pines -ping -pingpong -pings -pinhead -pinheads -pinhole -pinholes -pining -pinion -pinioned -pinions -pink -pinked -pinker -pinkie -pinkies -pinking -pinkish -pinkness -pinks -pinky -pinnacle -pinnacled -pinnacles -pinned -pinning -pinpoint -pinpointed -pinpointing -pinpoints -pinprick -pinpricks -pins -pinstripe -pinstriped -pinstripes -pint -pints -pintsized -pinup -pinups -piny -pion -pioneer -pioneered -pioneering -pioneers -pions -pious -piously -pip -pipe -piped -pipeline -pipelines -piper -pipers -pipes -pipette -pipettes -pipework -piping -pipings -pipit -pipits -pipped -pippin -pipping -pips -piquancy -piquant -pique -piqued -piracies -piracy -piranha -piranhas -pirate -pirated -pirates -piratical -pirating -pirouette -pirouetted -pirouettes -pirouetting -pisa -pistol -pistols -piston -pistons -pit -pitbull -pitch -pitchdark -pitched -pitcher -pitchers -pitches -pitchfork -pitchforks -pitching -piteous -piteously -pitfall -pitfalls -pith -pithead -pithier -pithiest -pithily -piths -pithy -pitiable -pitiably -pitied -pities -pitiful -pitifully -pitiless -pitilessly -piton -pitons -pits -pittance -pitted -pitting -pituitary -pity -pitying -pityingly -pivot -pivotal -pivoted -pivoting -pivots -pixel -pixels -pixie -pixies -pizazz -pizza -pizzas -pizzeria -pizzerias -pizzicato -placard -placards -placate -placated -placates -placating -placatingly -placatory -place -placebo -placed -placeholder -placemen -placement -placements -placenta -placentae -placental -placentas -placer -placers -places -placid -placidity -placidly -placing -placings -plagiarise -plagiarised -plagiarising -plagiarism -plagiarist -plagiarists -plague -plagued -plagues -plaguing -plaice -plaid -plaids -plain -plainest -plainly -plainness -plains -plaint -plaintiff -plaintiffs -plaintive -plaintively -plait -plaited -plaiting -plaits -plan -planar -plane -planed -planes -planet -planetarium -planetary -planetesimals -planetoids -planets -plangent -planing -plank -planking -planks -plankton -planktonic -planned -planner -planners -planning -plans -plant -plantain -plantation -plantations -planted -planter -planters -planting -plantings -plants -plaque -plaques -plasm -plasma -plasmas -plasmid -plasmids -plaster -plasterboard -plastered -plasterer -plasterers -plastering -plasters -plasterwork -plastic -plasticised -plasticisers -plasticity -plastics -plate -plateau -plateaus -plateaux -plated -plateful -platefuls -platelet -platelets -platen -platens -plates -platform -platforms -plating -platinum -platitude -platitudes -platitudinous -plato -platonic -platoon -platoons -platter -platters -platypus -platypuses -plaudits -plausibility -plausible -plausibly -play -playable -playback -playboy -playboys -played -player -players -playfellow -playfellows -playful -playfully -playfulness -playground -playgrounds -playgroup -playgroups -playhouse -playing -playings -playmate -playmates -playroom -plays -plaything -playthings -playtime -playwright -playwrights -plaza -plazas -plea -plead -pleaded -pleading -pleadingly -pleadings -pleads -pleas -pleasant -pleasanter -pleasantest -pleasantly -pleasantness -pleasantries -pleasantry -please -pleased -pleases -pleasing -pleasingly -pleasurable -pleasurably -pleasure -pleasures -pleat -pleated -pleats -pleb -plebeian -plebiscite -plebs -plectrum -plectrums -pledge -pledged -pledges -pledging -plenary -plenipotentiary -plenitude -plenteous -plenteously -plentiful -plentifully -plenty -plenum -plethora -pleura -pleural -pleurisy -plexus -pliable -pliant -plied -pliers -plies -plight -plights -plimsolls -plinth -plinths -plod -plodded -plodder -plodding -plods -plop -plopped -plopping -plops -plosive -plot -plots -plotted -plotter -plotters -plotting -plough -ploughed -ploughers -ploughing -ploughman -ploughmen -ploughs -ploughshare -ploughshares -plover -plovers -ploy -ploys -pluck -plucked -plucker -pluckier -pluckiest -plucking -plucks -plucky -plug -plugged -plugging -plughole -plugs -plum -plumage -plumages -plumb -plumbago -plumbed -plumber -plumbers -plumbing -plumbs -plume -plumed -plumes -pluming -plummet -plummeted -plummeting -plummets -plummy -plump -plumped -plumper -plumping -plumpness -plums -plumtree -plumy -plunder -plundered -plunderers -plundering -plunders -plunge -plunged -plunger -plungers -plunges -plunging -pluperfect -plural -pluralisation -pluralise -pluralised -pluralising -pluralism -pluralist -pluralistic -pluralists -plurality -plurals -plus -pluses -plush -plushy -pluto -plutocracy -plutocrats -plutonic -plutonium -ply -plying -plywood -pneumatic -pneumatics -pneumonia -poach -poached -poacher -poachers -poaches -poaching -pock -pocked -pocket -pocketbook -pocketed -pocketful -pocketing -pockets -pockmarked -pocks -pod -podded -podgy -podia -podium -podiums -pods -poem -poems -poet -poetess -poetic -poetical -poetically -poetics -poetise -poetry -poets -pogo -pogrom -pogroms -poignancy -poignant -poignantly -poikilothermic -poinsettias -point -pointblank -pointed -pointedly -pointedness -pointer -pointers -pointillism -pointillist -pointing -pointless -pointlessly -pointlessness -points -pointy -poise -poised -poises -poising -poison -poisoned -poisoner -poisoning -poisonings -poisonous -poisons -poke -poked -poker -pokerfaced -pokers -pokes -poking -poky -poland -polar -polarisation -polarisations -polarise -polarised -polarising -polarities -polarity -polder -pole -polecat -polecats -poled -polemic -polemical -polemicist -polemics -poles -polestar -polevaulting -poleward -polewards -police -policed -policeman -policemen -polices -policewoman -policewomen -policies -policing -policy -policyholder -policyholders -polio -poliomyelitis -polish -polished -polisher -polishers -polishes -polishing -polishings -politburo -polite -politely -politeness -politer -politesse -politest -politic -political -politically -politician -politicians -politicisation -politicise -politicised -politicising -politicking -politics -polity -polka -polkas -poll -pollarded -polled -pollen -pollens -pollinate -pollinated -pollinating -pollination -pollinator -pollinators -polling -polls -pollster -pollsters -pollutant -pollutants -pollute -polluted -polluter -polluters -pollutes -polluting -pollution -pollutions -polo -polonaise -polonaises -poloneck -polonies -polonium -polony -poltergeist -poltergeists -poltroon -polyandry -polyatomic -polycarbonate -polychromatic -polychrome -polycotton -polycrystalline -polycyclic -polyester -polyesters -polyethylene -polygamous -polygamy -polyglot -polyglots -polygon -polygonal -polygons -polygraph -polygynous -polygyny -polyhedra -polyhedral -polyhedron -polymath -polymer -polymerase -polymerases -polymeric -polymerisation -polymerised -polymers -polymorphic -polymorphism -polymorphisms -polymorphous -polynomial -polynomially -polynomials -polyp -polypeptide -polypeptides -polyphonic -polyphony -polypropylene -polyps -polysaccharide -polysaccharides -polystyrene -polysyllabic -polysyllable -polysyllables -polytechnic -polytechnics -polytheism -polytheist -polytheistic -polytheists -polythene -polytopes -polyunsaturated -polyunsaturates -polyurethane -pomade -pomades -pomegranate -pomegranates -pomelo -pomp -pompadour -pompeii -pompey -pomposity -pompous -pompously -pompousness -ponce -poncho -pond -ponder -pondered -pondering -ponderous -ponderously -ponders -ponds -ponies -pontiff -pontiffs -pontifical -pontificate -pontificated -pontificating -pontification -pontifications -pontoon -pontoons -pony -ponytail -pooch -pooches -poodle -poodles -poof -pooh -pool -pooled -pooling -pools -poolside -poop -poor -poorer -poorest -poorly -poorness -poorspirited -pop -popcorn -pope -popes -popeyed -poplar -poplars -popmusic -popped -popper -poppet -poppies -popping -poppy -poppycock -pops -populace -popular -popularisation -popularisations -popularise -popularised -popularising -popularity -popularly -populate -populated -populating -population -populations -populism -populist -populists -populous -popup -porcelain -porch -porches -porcine -porcupine -porcupines -pore -pored -pores -poring -pork -porkchop -porker -porky -porn -porno -pornographer -pornographers -pornographic -pornography -porns -porosity -porous -porphyritic -porphyry -porpoise -porpoises -porridge -port -portability -portable -portables -portage -portal -portals -portcullis -portcullises -ported -portend -portended -portending -portends -portent -portentous -portentously -portents -porter -porterage -porters -portfolio -porthole -portholes -portico -porting -portion -portions -portly -portmanteau -portmanteaus -portrait -portraitist -portraits -portraiture -portray -portrayal -portrayals -portrayed -portraying -portrays -ports -portugal -pose -posed -poseidon -poser -posers -poses -poseur -poseurs -posh -posies -posing -posit -posited -positing -position -positionable -positional -positionally -positioned -positioning -positions -positive -positively -positiveness -positives -positivism -positivist -positivists -positivity -positron -positrons -posits -posse -possess -possessed -possesses -possessing -possession -possessions -possessive -possessively -possessiveness -possessives -possessor -possessors -possibilities -possibility -possible -possibles -possibly -possum -possums -post -postage -postal -postbag -postbox -postboxes -postcard -postcards -postcode -postcodes -postdated -posted -poster -posterior -posteriors -posterity -posters -postfixes -postgraduate -postgraduates -posthumous -posthumously -postilion -postilions -postillion -posting -postings -postlude -postman -postmark -postmarked -postmarks -postmaster -postmasters -postmen -postmistress -postmodern -postmodernism -postmodernist -postmortem -postmortems -postnatal -postoperative -postoperatively -postpone -postponed -postponement -postponements -postpones -postponing -posts -postscript -postscripts -postulate -postulated -postulates -postulating -postulation -postural -posture -postured -postures -posturing -posturings -posy -pot -potable -potash -potassium -potato -potbellied -potch -potencies -potency -potent -potentate -potentates -potential -potentialities -potentiality -potentially -potentials -potentiometer -potentiometers -potently -pothole -potholes -potion -potions -potpourri -pots -potsherds -potshot -potshots -pottage -potted -potter -pottered -potteries -pottering -potters -pottery -potties -potting -potty -pouch -pouches -pouffe -pouffes -poult -poulterer -poultice -poultry -pounce -pounced -pounces -pouncing -pound -poundage -pounded -pounding -pounds -pour -pourable -poured -pouring -pours -pout -pouted -pouter -pouting -pouts -poverty -povertystricken -powder -powdered -powdering -powders -powdery -power -powerboat -powerboats -powered -powerful -powerfully -powerfulness -powerhouse -powerhouses -powering -powerless -powerlessness -powers -powersharing -pox -practicabilities -practicability -practicable -practical -practicalities -practicality -practically -practicals -practice -practices -practise -practised -practises -practising -practitioner -practitioners -pragmatic -pragmatically -pragmatics -pragmatism -pragmatist -pragmatists -prague -prairie -prairies -praise -praised -praises -praiseworthy -praising -praline -pram -prams -prance -pranced -prancer -prancing -prang -prank -pranks -prankster -pranksters -prat -prattle -prattled -prattler -prattling -prawn -prawns -pray -prayed -prayer -prayerbook -prayerful -prayerfully -prayers -praying -prays -pre -preach -preached -preacher -preachers -preaches -preaching -preachings -preadolescent -preallocate -preamble -preambles -preamp -preamplifier -prearranged -preauthorise -prebend -prebendary -precarious -precariously -precariousness -precaution -precautionary -precautions -precede -preceded -precedence -precedences -precedent -precedents -precedes -preceding -precept -precepts -precess -precessed -precessing -precession -precinct -precincts -precious -preciously -preciousness -precipice -precipices -precipitate -precipitated -precipitately -precipitates -precipitating -precipitation -precipitous -precipitously -precis -precise -precisely -preciseness -precision -precisions -preclinical -preclude -precluded -precludes -precluding -precocious -precociously -precociousness -precocity -precognition -precognitions -precomputed -preconceived -preconception -preconceptions -precondition -preconditions -precooked -precursor -precursors -predate -predated -predates -predating -predation -predations -predator -predators -predatory -predeceased -predecessor -predecessors -predeclared -predefine -predefined -predefining -predestination -predestined -predetermination -predetermine -predetermined -predetermines -predicament -predicaments -predicate -predicated -predicates -predicating -predicative -predict -predictability -predictable -predictably -predicted -predicting -prediction -predictions -predictive -predictor -predictors -predicts -predilection -predilections -predispose -predisposed -predisposes -predisposing -predisposition -predispositions -predominance -predominant -predominantly -predominate -predominated -predominates -predominating -preen -preened -preening -preens -prefab -prefabricated -prefabrication -prefabs -preface -prefaced -prefaces -prefacing -prefatory -prefect -prefects -prefecture -prefer -preferable -preferably -preference -preferences -preferential -preferentially -preferment -preferred -preferring -prefers -prefigured -prefix -prefixed -prefixes -prefixing -pregnancies -pregnancy -pregnant -preheat -preheating -prehensile -prehistoric -prehistory -prejudge -prejudged -prejudging -prejudice -prejudiced -prejudices -prejudicial -prejudicing -prelate -prelates -preliminaries -preliminarily -preliminary -prelude -preludes -premature -prematurely -prematureness -prematurity -premeditate -premeditated -premeditation -premenstrual -premier -premiere -premiered -premieres -premiers -premiership -premise -premised -premises -premising -premiss -premisses -premium -premiums -premolar -premolars -premonition -premonitions -prenatal -preoccupation -preoccupations -preoccupied -preoccupy -preoccupying -preordained -prep -prepaid -preparation -preparations -preparative -preparatory -prepare -prepared -preparedness -preparer -preparers -prepares -preparing -prepayment -prepays -preplanned -preponderance -preponderant -preponderantly -preposition -prepositional -prepositions -preposterous -preposterously -preps -prerogative -prerogatives -presbytery -preschool -prescribe -prescribed -prescribes -prescribing -prescription -prescriptions -prescriptive -prescriptively -prescriptivism -prescriptivist -preselect -preselected -preselects -presence -presences -present -presentable -presentation -presentational -presentations -presented -presenter -presenters -presentiment -presentiments -presenting -presently -presents -preservation -preservationists -preservative -preservatives -preserve -preserved -preserver -preserves -preserving -preset -presets -presetting -preside -presided -presidencies -presidency -president -presidential -presidents -presides -presiding -presidium -press -pressed -presses -pressing -pressingly -pressings -pressman -pressmen -pressup -pressups -pressure -pressurecooking -pressured -pressures -pressuring -pressurise -pressurised -pressurises -pressurising -prestidigitation -prestidigitator -prestidigitatorial -prestige -prestigious -presto -presumable -presumably -presume -presumed -presumes -presuming -presumption -presumptions -presumptive -presumptively -presumptuous -presumptuously -presumptuousness -presuppose -presupposed -presupposes -presupposing -presupposition -presuppositions -pretence -pretences -pretend -pretended -pretender -pretenders -pretending -pretends -pretension -pretensions -pretentious -pretentiously -pretentiousness -preterite -preternatural -preternaturally -pretext -pretexts -pretor -pretoria -pretreated -pretreatment -pretreatments -prettier -prettiest -prettify -prettily -prettiness -pretty -prevail -prevailed -prevailing -prevails -prevalence -prevalent -prevalently -prevaricate -prevaricated -prevaricating -prevarication -prevent -preventable -prevented -preventing -prevention -preventions -preventive -prevents -preview -previewed -previewer -previewers -previewing -previews -previous -previously -prevue -prevues -prey -preyed -preying -preys -priapic -price -priced -priceless -prices -pricewar -pricey -pricier -pricing -prick -pricked -pricking -prickle -prickled -prickles -pricklier -prickliest -prickliness -prickling -prickly -pricks -pricy -pride -prided -prides -pried -pries -priest -priestess -priestesses -priesthood -priestly -priests -prig -priggish -priggishly -priggishness -prim -primacy -primaeval -primal -primaries -primarily -primary -primate -primates -prime -primed -primeness -primer -primers -primes -primetime -primeval -priming -primitive -primitively -primitiveness -primitives -primly -primness -primogeniture -primordial -primrose -primroses -primus -prince -princelings -princely -princes -princess -princesses -principal -principalities -principality -principally -principals -principle -principled -principles -print -printable -printed -printer -printers -printing -printings -printmakers -printmaking -printout -printouts -prints -prions -prior -priories -priorities -prioritisation -prioritise -prioritised -prioritises -prioritising -priority -priors -priory -prise -prised -prises -prising -prism -prismatic -prisms -prison -prisoner -prisoners -prisons -prissy -pristine -privacy -private -privateer -privateers -privately -privates -privation -privations -privatisation -privatisations -privatise -privatised -privatises -privatising -privet -privilege -privileged -privileges -privileging -privy -prize -prized -prizer -prizes -prizewinner -prizing -pro -proactive -probabilist -probabilistic -probabilistically -probabilities -probability -probable -probably -probate -probation -probationary -probative -probe -probed -prober -probes -probing -probity -problem -problematic -problematical -problematically -problems -proboscis -procedural -procedurally -procedure -procedures -proceed -proceeded -proceeding -proceedings -proceeds -process -processable -processed -processes -processing -procession -processional -processions -processor -processors -proclaim -proclaimed -proclaimers -proclaiming -proclaims -proclamation -proclamations -proclivities -proclivity -procrastinate -procrastinating -procrastination -procrastinations -procrastinator -procrastinators -procreate -procreated -procreating -procreation -procreational -procreative -procreatory -proctor -proctorial -proctors -procurable -procure -procured -procurement -procurements -procures -procuring -prod -prodded -prodding -prodeo -prodigal -prodigality -prodigally -prodigies -prodigious -prodigiously -prodigy -prods -produce -produced -producer -producers -produces -producible -producing -product -production -productions -productive -productively -productivity -products -profanation -profane -profaned -profanely -profaneness -profanities -profanity -profess -professed -professedly -professes -professing -profession -professional -professionalisation -professionalised -professionalism -professionally -professionals -professions -professor -professorial -professors -professorship -professorships -proffer -proffered -proffering -proffers -proficiencies -proficiency -proficient -proficiently -profile -profiled -profiles -profiling -profit -profitability -profitable -profitably -profited -profiteering -profiteers -profiteroles -profiting -profitless -profits -profittaking -profligacy -profligate -profligately -proforma -proformas -profound -profounder -profoundest -profoundly -profundity -profuse -profusely -profuseness -profusion -progenitor -progenitors -progeny -progesterone -prognoses -prognosis -prognosticate -prognostication -prognostications -program -programmable -programmatic -programme -programmed -programmer -programmers -programmes -programming -programs -progress -progressed -progresses -progressing -progression -progressions -progressive -progressively -progressiveness -progressives -prohibit -prohibited -prohibiting -prohibition -prohibitionist -prohibitionists -prohibitions -prohibitive -prohibitively -prohibits -project -projected -projectile -projectiles -projecting -projection -projectionist -projections -projective -projectively -projector -projectors -projects -prokaryotes -prolactin -prolapse -prolapsed -proletarian -proletarianisation -proletarians -proletariat -proliferate -proliferated -proliferates -proliferating -proliferation -proliferative -prolific -prolifically -prolix -prologue -prologues -prolong -prolongation -prolonged -prolonging -prolongs -promenade -promenaded -promenader -promenaders -promenades -prominence -prominences -prominent -prominently -promiscuity -promiscuous -promiscuously -promise -promised -promises -promising -promisingly -promissory -promontories -promontory -promotable -promote -promoted -promoter -promoters -promotes -promoting -promotion -promotional -promotions -prompt -prompted -prompter -prompters -prompting -promptings -promptitude -promptly -promptness -prompts -promulgate -promulgated -promulgating -promulgation -promulgations -prone -proneness -prong -prongs -pronominal -pronoun -pronounce -pronounceable -pronounced -pronouncedly -pronouncement -pronouncements -pronounces -pronouncing -pronouns -pronto -pronunciation -pronunciations -proof -proofed -proofing -proofread -proofreader -proofreaders -proofreading -proofreads -proofs -prop -propaganda -propagandist -propagandists -propagate -propagated -propagates -propagating -propagation -propagator -propagators -propane -propel -propellant -propellants -propelled -propeller -propellers -propelling -propels -propensities -propensity -proper -properly -propertied -properties -property -prophecies -prophecy -prophesied -prophesies -prophesy -prophesying -prophet -prophetess -prophetic -prophetically -prophets -prophylactic -prophylactics -prophylaxis -propinquity -propionate -propitiate -propitiated -propitiating -propitiation -propitiatory -propitious -proponent -proponents -proportion -proportional -proportionality -proportionally -proportionate -proportionately -proportioned -proportions -proposal -proposals -propose -proposed -proposer -proposers -proposes -proposing -proposition -propositional -propositioned -propositioning -propositions -propound -propounded -propounding -propped -propping -proprietary -proprieties -proprietor -proprietorial -proprietorially -proprietors -proprietorship -proprietress -propriety -proprioceptive -props -propulsion -propulsive -propylene -pros -prosaic -prosaically -prosaist -proscenium -proscribe -proscribed -proscription -proscriptive -prose -prosecutable -prosecute -prosecuted -prosecutes -prosecuting -prosecution -prosecutions -prosecutor -prosecutorial -prosecutors -proselytise -proselytising -prosodic -prosody -prospect -prospecting -prospective -prospectively -prospector -prospectors -prospects -prospectus -prospectuses -prosper -prospered -prospering -prosperity -prosperous -prosperously -prospers -prostaglandin -prostaglandins -prostate -prostates -prostatic -prosthesis -prosthetic -prostitute -prostituted -prostitutes -prostituting -prostitution -prostrate -prostrated -prostrates -prostrating -prostration -protactinium -protagonist -protagonists -protea -protean -proteas -protease -protect -protected -protecting -protection -protectionism -protectionist -protectionists -protections -protective -protectively -protectiveness -protector -protectorate -protectorates -protectors -protects -protege -protegee -protegees -proteges -protein -proteins -protest -protestant -protestantism -protestants -protestation -protestations -protested -protester -protesters -protesting -protestor -protestors -protests -protists -protocol -protocols -proton -protons -protoplasm -protoplasmic -prototype -prototyped -prototypes -prototypical -prototyping -protozoa -protozoan -protozoans -protract -protracted -protractor -protractors -protrude -protruded -protrudes -protruding -protrusion -protrusions -protrusive -protuberance -protuberances -proud -prouder -proudest -proudly -provable -provably -prove -proved -proven -provenance -provence -proverb -proverbial -proverbially -proverbs -proves -providable -provide -provided -providence -provident -providential -providentially -provider -providers -provides -providing -province -provinces -provincial -provincialism -proving -provision -provisional -provisionally -provisioned -provisioning -provisions -provocation -provocations -provocative -provocatively -provoke -provoked -provoker -provokes -provoking -provokingly -provost -prow -prowess -prowl -prowled -prowler -prowlers -prowling -prowls -prows -proxies -proximal -proximally -proximate -proximately -proximity -proximo -proxy -prude -prudence -prudent -prudential -prudently -prudery -prudish -prudishness -prune -pruned -pruners -prunes -pruning -prunings -prurience -prurient -pruritus -prussia -prussian -prussic -pry -prying -pryings -psalm -psalmist -psalmody -psalms -psalter -psalters -psaltery -psephologist -pseudo -pseudonym -pseudonymous -pseudonyms -pseudopod -psoriasis -psyche -psychedelia -psychedelic -psychiatric -psychiatrist -psychiatrists -psychiatry -psychic -psychically -psychics -psycho -psychoanalyse -psychoanalysis -psychoanalyst -psychoanalysts -psychoanalytic -psychokinesis -psychokinetic -psycholinguistic -psycholinguistics -psycholinguists -psychological -psychologically -psychologies -psychologist -psychologists -psychology -psychometric -psychopath -psychopathic -psychopathology -psychopaths -psychoses -psychosis -psychosocial -psychosomatic -psychotherapist -psychotherapists -psychotherapy -psychotic -psychotically -psychotics -ptarmigan -ptarmigans -pterodactyl -pterosaurs -ptolemy -pub -puberty -pubescent -pubic -public -publican -publicans -publication -publications -publicise -publicised -publicises -publicising -publicist -publicists -publicity -publicly -publish -publishable -published -publisher -publishers -publishes -publishing -pubs -pudding -puddings -puddle -puddles -puerile -puerility -puerperal -puff -puffballs -puffed -puffer -puffin -puffiness -puffing -puffins -puffs -puffy -pug -pugilist -pugilistic -pugnacious -pugnaciously -pugnacity -pugs -puissant -puke -puking -pulchritude -puling -pull -pulled -puller -pullets -pulley -pulleys -pulling -pullover -pullovers -pulls -pulmonary -pulp -pulped -pulping -pulpit -pulpits -pulps -pulpy -pulsar -pulsars -pulsate -pulsated -pulsates -pulsating -pulsation -pulsations -pulse -pulsed -pulses -pulsing -pulverisation -pulverise -pulverised -pulverising -puma -pumas -pumice -pummel -pummelled -pummelling -pummels -pump -pumped -pumping -pumpkin -pumpkins -pumps -pun -punch -punchable -punchbowl -punchcard -punched -puncher -punches -punching -punchline -punchlines -punchy -punctate -punctilious -punctiliously -punctual -punctuality -punctually -punctuate -punctuated -punctuates -punctuating -punctuation -punctuational -punctuations -puncture -punctured -punctures -puncturing -pundit -pundits -pungency -pungent -pungently -punier -puniest -punish -punishable -punished -punishes -punishing -punishment -punishments -punitive -punitively -punk -punks -punky -punned -punnet -punning -puns -punster -punt -punted -punter -punters -punting -punts -puny -pup -pupa -pupae -pupal -pupated -pupates -pupating -pupil -pupillage -pupils -puppet -puppeteer -puppetry -puppets -puppies -puppy -puppyhood -pups -purblind -purchasable -purchase -purchased -purchaser -purchasers -purchases -purchasing -purdah -pure -puree -purees -purely -pureness -purer -purest -purgative -purgatorial -purgatory -purge -purged -purges -purging -purgings -purification -purified -purifier -purifies -purify -purifying -purims -purines -purist -purists -puritan -puritanical -puritanism -puritans -purities -purity -purl -purlieus -purling -purlins -purloin -purloined -purls -purple -purples -purplish -purport -purported -purportedly -purporting -purports -purpose -purposed -purposeful -purposefully -purposefulness -purposeless -purposelessly -purposely -purposes -purposing -purposive -purr -purred -purring -purrs -purse -pursed -purser -purses -pursing -pursuance -pursuant -pursue -pursued -pursuer -pursuers -pursues -pursuing -pursuit -pursuits -purvey -purveyance -purveyed -purveying -purveyor -purveyors -purview -pus -push -pushable -pushed -pusher -pushers -pushes -pushier -pushing -pushovers -pushups -pushy -puss -pussy -pussycat -pussyfooting -pustular -pustule -pustules -put -putative -putatively -putput -putrefaction -putrefy -putrefying -putrescent -putrid -putridity -puts -putsch -putt -putted -putter -putters -putti -putting -putts -putty -puzzle -puzzled -puzzlement -puzzler -puzzles -puzzling -puzzlingly -pygmies -pygmy -pyjama -pyjamas -pylon -pylons -pyracantha -pyramid -pyramidal -pyramids -pyre -pyres -pyridine -pyrite -pyrites -pyrolyse -pyrolysis -pyromaniac -pyromaniacs -pyrotechnic -pyrotechnics -pyroxene -pyroxenes -python -pythons -qatar -qua -quack -quacked -quacking -quackish -quacks -quadrangle -quadrangles -quadrangular -quadrant -quadrants -quadratic -quadratically -quadratics -quadrature -quadratures -quadrilateral -quadrilaterals -quadrille -quadrilles -quadripartite -quadrophonic -quadruped -quadrupeds -quadruple -quadrupled -quadruples -quadruplets -quadruplicate -quadrupling -quadruply -quadrupole -quaff -quaffed -quaffing -quagga -quaggas -quagmire -quagmires -quail -quailed -quails -quaint -quainter -quaintly -quaintness -quake -quaked -quaker -quakers -quakes -quaking -qualification -qualifications -qualified -qualifier -qualifiers -qualifies -qualify -qualifying -qualitative -qualitatively -qualities -quality -qualm -qualms -quantifiable -quantification -quantified -quantifier -quantifiers -quantifies -quantify -quantifying -quantisation -quantise -quantised -quantitative -quantitatively -quantities -quantity -quantum -quarantine -quarantined -quark -quarks -quarrel -quarrelled -quarrelling -quarrels -quarrelsome -quarried -quarries -quarry -quarrying -quarrymen -quart -quarter -quarterback -quartered -quartering -quarterly -quartermaster -quarters -quarterstaff -quarterstaffs -quartet -quartets -quartic -quartics -quartile -quartiles -quarto -quarts -quartz -quartzite -quasar -quasars -quash -quashed -quashing -quasi -quasilinear -quaternary -quaternion -quaternions -quatrain -quatrains -quaver -quavered -quavering -quavers -quay -quays -quayside -queasiness -queasy -quebec -queen -queenly -queens -queer -queerest -queerly -quell -quelled -quelling -quells -quench -quenched -quencher -quenchers -quenches -quenching -queried -queries -quern -querulous -querulously -querulousness -query -querying -quest -questing -question -questionable -questionably -questioned -questioner -questioners -questioning -questioningly -questionings -questionnaire -questionnaires -questions -quests -queue -queued -queueing -queues -queuing -quibble -quibbles -quibbling -quiche -quiches -quick -quicken -quickened -quickening -quickens -quicker -quickest -quicklime -quickly -quickness -quicksand -quicksands -quicksilver -quickwitted -quid -quids -quiesce -quiesced -quiescence -quiescent -quiet -quieted -quieten -quietened -quietening -quietens -quieter -quietest -quieting -quietly -quietness -quiets -quietus -quiff -quill -quills -quilt -quilted -quilting -quilts -quince -quincentenary -quinces -quinine -quinquennial -quintessence -quintessential -quintessentially -quintet -quintets -quintic -quintillion -quintuple -quip -quipped -quipper -quips -quire -quirk -quirkier -quirkiest -quirkiness -quirks -quirky -quisling -quit -quite -quits -quitted -quitter -quitting -quiver -quivered -quivering -quiveringly -quivers -quixotic -quiz -quizzed -quizzes -quizzical -quizzically -quizzing -quoins -quoits -quondam -quorate -quorum -quota -quotable -quotas -quotation -quotations -quote -quoted -quoter -quotes -quotidian -quotient -quotients -quoting -quovadis -rabat -rabats -rabbi -rabbis -rabbit -rabbiting -rabbits -rabble -rabid -rabidly -rabies -raccoon -raccoons -race -racecourse -racecourses -raced -racegoers -racehorse -racehorses -racer -racers -races -racetrack -rachis -racial -racialism -racialist -racialists -racially -racier -raciest -racily -racing -racings -racism -racist -racists -rack -racked -racket -racketeering -rackets -racking -racks -raconteur -racoon -racquet -racquets -racy -rad -radar -radars -radial -radially -radials -radian -radiance -radiancy -radians -radiant -radiantly -radiate -radiated -radiates -radiating -radiation -radiations -radiative -radiatively -radiator -radiators -radical -radicalism -radically -radicals -radices -radii -radio -radioactive -radioactively -radioactivity -radioastronomical -radiocarbon -radioed -radiogalaxies -radiogalaxy -radiogram -radiograph -radiographer -radiographers -radiographic -radiographs -radiography -radioing -radiological -radiologist -radiologists -radiology -radiometric -radionuclide -radios -radiotherapy -radish -radishes -radium -radius -radix -radon -raffia -raffle -raffled -raffles -raft -rafter -rafters -rafting -raftman -rafts -raftsman -rag -ragamuffin -ragamuffins -ragbag -rage -raged -rages -ragged -raggedly -raging -ragout -rags -ragstoriches -ragtime -ragwort -raid -raided -raider -raiders -raiding -raids -rail -railed -railes -railing -railings -raillery -railroad -rails -railway -railwayman -railwaymen -railways -raiment -rain -rainbow -rainbows -raincloud -rainclouds -raincoat -raincoats -raindrop -raindrops -rained -rainfall -rainforest -rainforests -rainier -rainiest -raining -rainless -rainout -rains -rainstorm -rainstorms -rainswept -rainwater -rainy -raise -raised -raiser -raises -raisin -raising -raisins -raj -rajah -rake -raked -rakes -raking -rakish -rallied -rallies -rally -rallying -ram -ramble -rambled -rambler -ramblers -rambles -rambling -ramblings -ramification -ramifications -ramified -ramifies -ramify -rammed -rammer -ramming -ramp -rampage -rampaged -rampages -rampaging -rampant -rampantly -rampart -ramparts -ramped -ramping -ramps -ramrod -rams -ramshackle -ran -ranch -rancher -ranchers -ranches -ranching -rancid -rancorous -rancour -rand -random -randomisation -randomise -randomised -randomising -randomly -randomness -rands -randy -rang -range -ranged -ranger -rangers -ranges -ranging -rangy -rani -ranis -rank -ranked -ranker -rankers -rankest -ranking -rankings -rankle -rankled -rankles -rankling -rankness -ranks -ransack -ransacked -ransacking -ransom -ransomed -ransoming -ransoms -rant -ranted -ranter -ranters -ranting -rantings -rants -rap -rapacious -rapacity -rape -raped -rapes -rapeseed -rapid -rapidity -rapidly -rapids -rapier -rapiers -rapine -raping -rapist -rapists -rapped -rapping -rapport -rapporteur -rapporteurs -rapports -rapprochement -raps -rapt -raptor -raptors -rapture -raptures -rapturous -rapturously -rare -rarebit -rarefaction -rarefactions -rarefied -rarely -rareness -rarer -rarest -raring -rarities -rarity -rascal -rascally -rascals -rased -rash -rasher -rashers -rashes -rashest -rashly -rashness -rasing -rasp -raspberries -raspberry -rasped -rasper -rasping -rasps -raspy -raster -rasters -rat -ratatouille -rate -rated -ratepayer -ratepayers -rater -rates -rather -ratification -ratifications -ratified -ratifier -ratifies -ratify -ratifying -rating -ratings -ratio -ratiocination -ration -rational -rationale -rationales -rationalisation -rationalisations -rationalise -rationalised -rationalising -rationalism -rationalist -rationalistic -rationalists -rationalities -rationality -rationally -rationed -rationing -rations -ratios -ratlike -ratrace -rats -rattier -rattle -rattled -rattler -rattles -rattlesnake -rattlesnakes -rattling -ratty -raucous -raucously -ravage -ravaged -ravages -ravaging -rave -raved -ravel -ravelled -ravelling -ravels -raven -ravening -ravenous -ravenously -ravens -raver -ravers -raves -ravine -ravines -raving -ravingly -ravings -ravioli -ravish -ravished -ravisher -ravishes -ravishing -ravishingly -raw -rawest -rawness -ray -rayed -rayon -rays -raze -razed -razes -razing -razor -razorbills -razorblades -razoring -razors -razorsharp -razzmatazz -re -reabsorb -reabsorbed -reabsorption -reaccept -reaccessed -reach -reachable -reached -reaches -reachieved -reaching -reacquainting -reacquired -reacquisition -react -reactant -reactants -reacted -reacting -reaction -reactionaries -reactionary -reactions -reactivate -reactivated -reactivates -reactivating -reactivation -reactive -reactivities -reactivity -reactor -reactors -reacts -read -readability -readable -readably -readapt -reader -readers -readership -readerships -readied -readier -readies -readiest -readily -readiness -reading -readings -readjust -readjusted -readjusting -readjustment -readjustments -readmission -readmit -readmits -readmitted -reads -ready -readying -readymade -reaffirm -reaffirmation -reaffirmed -reaffirming -reaffirms -reafforestation -reagent -reagents -real -realign -realigned -realigning -realignment -realignments -realigns -realisable -realisation -realisations -realise -realised -realises -realising -realism -realist -realistic -realistically -realists -realities -reality -reallife -reallocate -reallocated -reallocates -reallocating -reallocation -really -realm -realms -realness -realpolitik -reals -realty -ream -reams -reanimated -reanimating -reap -reaped -reaper -reapers -reaping -reappear -reappearance -reappeared -reappearing -reappears -reapplied -reapply -reapplying -reappoint -reappointed -reappointment -reappraisal -reappraised -reappraising -reaps -rear -reared -rearer -rearguard -rearing -rearm -rearmament -rearmed -rearming -rearms -rearrange -rearranged -rearrangement -rearrangements -rearranges -rearranging -rears -rearview -rearward -reason -reasonable -reasonableness -reasonably -reasoned -reasoner -reasoners -reasoning -reasonless -reasons -reassemble -reassembled -reassembling -reassembly -reassert -reasserted -reasserting -reassertion -reasserts -reassess -reassessed -reassessment -reassessments -reassign -reassigned -reassigning -reassignment -reassigns -reassume -reassuming -reassurance -reassurances -reassure -reassured -reassures -reassuring -reassuringly -reattachment -reattempt -reawaken -reawakened -reawakening -rebalanced -rebate -rebates -rebel -rebelled -rebelling -rebellion -rebellions -rebellious -rebelliously -rebelliousness -rebels -rebind -rebirth -rebirths -rebook -reboot -rebooted -reborn -rebound -rebounded -rebounding -rebounds -rebuff -rebuffed -rebuffing -rebuffs -rebuild -rebuilding -rebuilds -rebuilt -rebuke -rebuked -rebukes -rebuking -reburial -reburied -rebury -rebus -rebut -rebuttable -rebuttal -rebuttals -rebutted -rebutting -recalcitrance -recalcitrant -recalculate -recalculated -recalculation -recalibrate -recalibrating -recalibration -recall -recalled -recalling -recalls -recant -recantation -recanted -recanting -recants -recap -recapitalisation -recapitulate -recapitulates -recapitulation -recapped -recaps -recapture -recaptured -recapturing -recast -recasting -recasts -recede -receded -recedes -receding -receipt -receipted -receipts -receivable -receive -received -receiver -receivers -receivership -receives -receiving -recency -recension -recent -recently -receptacle -receptacles -reception -receptionist -receptionists -receptions -receptive -receptiveness -receptivity -receptor -receptors -recess -recessed -recesses -recession -recessional -recessionary -recessions -recessive -recharge -rechargeable -recharged -recharger -recharges -recharging -recheck -rechecked -rechecking -recidivism -recidivist -recidivists -recipe -recipes -recipient -recipients -reciprocal -reciprocally -reciprocals -reciprocate -reciprocated -reciprocating -reciprocation -reciprocity -recirculate -recirculated -recirculating -recirculation -recital -recitals -recitation -recitations -recitative -recitatives -recite -recited -recites -reciting -reckless -recklessly -recklessness -reckon -reckoned -reckoner -reckoning -reckons -reclaim -reclaimable -reclaimed -reclaimer -reclaiming -reclaims -reclamation -reclamations -reclassification -reclassified -reclassifies -reclassify -reclassifying -recline -reclined -recliner -reclines -reclining -reclothe -recluse -recluses -reclusive -recode -recoded -recodes -recoding -recognisable -recognisably -recognisances -recognise -recognised -recogniser -recognisers -recognises -recognising -recognition -recognitions -recoil -recoiled -recoiling -recoils -recollect -recollected -recollecting -recollection -recollections -recollects -recombinant -recombinants -recombination -recombine -recombined -recombines -recombining -recommence -recommenced -recommencement -recommences -recommencing -recommend -recommendable -recommendation -recommendations -recommended -recommending -recommends -recommissioning -recompense -recompensed -recompenses -recompilation -recompilations -recompile -recompiled -recompiling -recomputable -recompute -recomputed -recomputes -recomputing -reconcilable -reconcile -reconciled -reconcilement -reconciles -reconciliation -reconciliations -reconciling -recondite -reconditioned -reconditioning -reconfigurable -reconfiguration -reconfigurations -reconfigure -reconfigured -reconfigures -reconfiguring -reconnaissance -reconnect -reconnected -reconnecting -reconnection -reconnoitre -reconnoitred -reconnoitring -reconquer -reconquest -reconsider -reconsideration -reconsidered -reconsidering -reconsiders -reconstitute -reconstituted -reconstitutes -reconstituting -reconstitution -reconstruct -reconstructed -reconstructing -reconstruction -reconstructions -reconstructs -reconsult -reconsulted -reconsulting -recontribute -reconvene -reconvened -reconvening -reconversion -reconvert -reconverted -recopied -recopy -record -recordable -recordbreaking -recorded -recorder -recorders -recording -recordings -recordist -recordists -records -recount -recounted -recounting -recounts -recoup -recouped -recouping -recouple -recoups -recourse -recover -recoverability -recoverable -recovered -recoveries -recovering -recovers -recovery -recreate -recreated -recreates -recreating -recreation -recreational -recreations -recriminate -recrimination -recriminations -recruit -recruited -recruiter -recruiters -recruiting -recruitment -recruits -recrystallisation -rectal -rectangle -rectangles -rectangular -rectifiable -rectification -rectified -rectifier -rectifies -rectify -rectifying -rectilinear -rectitude -recto -rector -rectors -rectory -rectrix -rectum -rectums -recumbent -recuperate -recuperated -recuperates -recuperating -recuperation -recuperative -recur -recured -recures -recuring -recurred -recurrence -recurrences -recurrent -recurrently -recurring -recurs -recursion -recursions -recursive -recursively -recyclable -recycle -recycled -recyclers -recycles -recycling -red -redaction -redblooded -redbreast -redcoats -redcross -redden -reddened -reddening -reddens -redder -reddest -reddish -redeclaration -redecorated -redecorating -redecoration -rededication -redeem -redeemable -redeemed -redeemer -redeeming -redeems -redefine -redefined -redefiner -redefines -redefining -redefinition -redefinitions -redeliver -redelivery -redemption -redemptions -redemptive -redeploy -redeployed -redeploying -redeployment -redeposited -redeposition -redesign -redesigned -redesigning -redesigns -redevelop -redeveloped -redeveloping -redevelopment -redfaced -redhanded -redhead -redheaded -redheads -redial -redialling -redirect -redirected -redirecting -redirection -redirects -rediscover -rediscovered -rediscoveries -rediscovering -rediscovers -rediscovery -rediscussed -redisplay -redisplayed -redistributable -redistribute -redistributed -redistributes -redistributing -redistribution -redistributions -redistributive -redneck -redness -redo -redoing -redolent -redone -redouble -redoubled -redoubling -redoubt -redoubtable -redoubts -redound -redounded -redox -redraft -redrafted -redrafting -redraw -redrawing -redrawn -redraws -redress -redressed -redressing -reds -redsea -redshift -redshifts -redstarts -redtape -reduce -reduced -reducer -reducers -reduces -reducibility -reducible -reducing -reduction -reductionism -reductionist -reductionists -reductions -reductive -redundancies -redundancy -redundant -redundantly -redwood -reed -reeds -reef -reefed -reefing -reefs -reek -reeked -reeking -reeks -reel -reelects -reeled -reeling -reels -ref -refer -referable -referee -refereed -refereeing -referees -reference -referenced -referencer -references -referencing -referenda -referendum -referendums -referent -referential -referentially -referents -referral -referrals -referred -referring -refers -refile -refiled -refiling -refill -refillable -refilled -refilling -refillings -refills -refinance -refinanced -refinancing -refine -refined -refinement -refinements -refiner -refineries -refiners -refinery -refines -refining -refinish -refit -refits -refitted -refitting -reflation -reflect -reflectance -reflected -reflecting -reflection -reflectional -reflections -reflective -reflectively -reflectiveness -reflectivity -reflector -reflectors -reflects -reflex -reflexes -reflexion -reflexions -reflexive -reflexively -reflexiveness -reflexivity -reflexology -refloat -reflooring -reflux -refluxed -refluxing -refocus -refocused -refocuses -refocusing -refocussed -refocusses -refocussing -refolded -refolding -reforestation -reform -reformable -reformat -reformation -reformations -reformative -reformatted -reformatting -reformed -reformer -reformers -reforming -reformist -reformists -reforms -reformulate -reformulated -reformulates -reformulating -reformulation -reformulations -refract -refracted -refracting -refraction -refractions -refractive -refractors -refractory -refracts -refrain -refrained -refraining -refrains -refreeze -refresh -refreshable -refreshed -refresher -refreshes -refreshing -refreshingly -refreshment -refreshments -refrigerant -refrigerants -refrigerate -refrigerated -refrigeration -refrigerator -refrigerators -refs -refuel -refuelled -refuelling -refuels -refuge -refugee -refugees -refuges -refund -refundable -refunded -refunding -refunds -refurbish -refurbished -refurbishing -refurbishment -refurbishments -refusal -refusals -refuse -refused -refuseniks -refuses -refusing -refutable -refutation -refutations -refute -refuted -refutes -refuting -regain -regained -regaining -regains -regal -regale -regaled -regales -regalia -regaling -regality -regally -regard -regarded -regarding -regardless -regards -regatta -regattas -regelate -regency -regenerate -regenerated -regenerates -regenerating -regeneration -regenerations -regenerative -regent -regents -reggae -regicide -regime -regimen -regimens -regiment -regimental -regimentation -regimented -regiments -regimes -regina -reginas -region -regional -regionalisation -regionalism -regionally -regions -register -registered -registering -registers -registrable -registrar -registrars -registration -registrations -registries -registry -regrading -regress -regressed -regresses -regressing -regression -regressions -regressive -regret -regretful -regretfully -regrets -regrettable -regrettably -regretted -regretting -regroup -regrouped -regrouping -regrow -regrowth -regular -regularisation -regularise -regularised -regularities -regularity -regularly -regulars -regulate -regulated -regulates -regulating -regulation -regulations -regulative -regulator -regulators -regulatory -regurgitate -regurgitated -regurgitating -regurgitation -rehabilitate -rehabilitated -rehabilitating -rehabilitation -rehash -rehashed -rehashes -rehashing -reheard -rehearing -rehears -rehearsal -rehearsals -rehearse -rehearsed -rehearses -rehearsing -reheat -reheated -reheating -reheats -rehouse -rehoused -rehousing -rehydrate -reich -reification -reify -reign -reigned -reigning -reigns -reimburse -reimbursed -reimbursement -reimburses -reimbursing -reimplementation -reimplemented -reimplementing -reimporting -reimpose -reimposed -rein -reincarnate -reincarnated -reincarnating -reincarnation -reincarnations -reindeer -reined -reinfection -reinforce -reinforced -reinforcement -reinforcements -reinforces -reinforcing -reining -reinitialisation -reinitialise -reinitialised -reinitialising -reins -reinsert -reinserted -reinstall -reinstalled -reinstalling -reinstate -reinstated -reinstatement -reinstates -reinstating -reinsurance -reintegration -reinterpret -reinterpretation -reinterpreted -reinterpreting -reintroduce -reintroduced -reintroduces -reintroducing -reintroduction -reintroductions -reinvent -reinvented -reinventing -reinvention -reinventions -reinvents -reinvest -reinvested -reinvestigation -reinvestment -reinvigorate -reinvigorated -reissue -reissued -reissues -reissuing -reiterate -reiterated -reiterates -reiterating -reiteration -reject -rejected -rejecting -rejection -rejections -rejects -rejoice -rejoiced -rejoices -rejoicing -rejoicings -rejoin -rejoinder -rejoinders -rejoined -rejoining -rejoins -rejustified -rejuvenate -rejuvenated -rejuvenating -rejuvenation -rejuvenations -rejuvenatory -rekindle -rekindled -relabel -relabelled -relabelling -relabellings -relaid -relapse -relapsed -relapses -relapsing -relate -related -relatedness -relates -relating -relation -relational -relationally -relations -relationship -relationships -relative -relatively -relatives -relativism -relativist -relativistic -relativistically -relativists -relativity -relator -relaunch -relaunched -relaunching -relax -relaxant -relaxants -relaxation -relaxations -relaxed -relaxes -relaxing -relaxingly -relay -relayed -relaying -relays -relearn -relearning -releasable -release -released -releases -releasing -relegate -relegated -relegates -relegating -relegation -relent -relented -relenting -relentless -relentlessly -relentlessness -relents -relevance -relevancy -relevant -relevantly -reliabilities -reliability -reliable -reliably -reliance -reliant -relic -relics -relict -relicts -relied -relief -reliefs -relies -relieve -relieved -relieves -relieving -relight -relighting -religion -religions -religiosity -religious -religiously -religiousness -relined -relink -relinked -relinking -relinquish -relinquished -relinquishes -relinquishing -reliquaries -reliquary -relish -relished -relishes -relishing -relit -relive -relived -relives -reliving -reload -reloaded -reloading -reloads -relocatable -relocate -relocated -relocates -relocating -relocation -relocations -relocked -reluctance -reluctant -reluctantly -rely -relying -rem -remade -remain -remainder -remaindered -remaindering -remainders -remained -remaining -remains -remake -remakes -remaking -remand -remanded -remands -remap -remaps -remark -remarkable -remarkably -remarked -remarking -remarks -remarriage -remarried -remarry -remaster -remastered -remastering -remasters -rematch -rematching -rematerialised -remediable -remedial -remedied -remedies -remedy -remedying -remember -remembered -remembering -remembers -remembrance -remembrances -remind -reminded -reminder -reminders -reminding -reminds -reminisce -reminisced -reminiscence -reminiscences -reminiscent -reminiscently -reminisces -reminiscing -remiss -remission -remissions -remit -remits -remittal -remittance -remittances -remitted -remitting -remix -remixed -remixes -remnant -remnants -remodel -remodelled -remodelling -remonstrance -remonstrate -remonstrated -remonstrating -remonstration -remonstrations -remorse -remorseful -remorsefully -remorseless -remorselessly -remote -remotely -remoteness -remoter -remotest -remould -remount -remounted -remounts -removable -removal -removals -remove -removed -remover -removers -removes -removing -remunerate -remunerated -remuneration -remunerative -remus -renaissance -renal -rename -renamed -renames -renaming -render -rendered -rendering -renderings -renders -rendezvous -rendezvoused -rending -rendition -renditions -rends -renegade -renegades -renege -reneged -reneging -renegotiate -renegotiated -renegotiating -renegotiation -renew -renewable -renewal -renewals -renewed -renewing -renews -renormalisation -renounce -renounced -renouncement -renounces -renouncing -renovate -renovated -renovating -renovation -renovations -renown -renowned -rent -rental -rentals -rented -renter -renters -rentiers -renting -rents -renumber -renumbered -renumbering -renunciation -renunciations -reoccupation -reoccupied -reoccupy -reoccupying -reoccur -reopen -reopened -reopening -reopens -reorder -reordered -reordering -reorders -reorganisation -reorganisations -reorganise -reorganised -reorganises -reorganising -reorientated -reorientates -reorientation -rep -repack -repackage -repackaged -repacked -repacking -repaid -repaint -repainted -repainting -repair -repairable -repaired -repairer -repairers -repairing -repairman -repairs -repaper -reparation -reparations -repartee -repartition -repartitioned -repartitioning -repast -repasts -repatriate -repatriated -repatriating -repatriation -repatriations -repay -repayable -repaying -repayment -repayments -repays -repeal -repealed -repealing -repeals -repeat -repeatability -repeatable -repeatably -repeated -repeatedly -repeater -repeaters -repeating -repeats -repel -repelled -repellent -repelling -repellingly -repels -repent -repentance -repentant -repentantly -repented -repenting -repents -repercussion -repercussions -repertoire -repertoires -repertory -repetition -repetitions -repetitious -repetitive -repetitively -repetitiveness -rephrase -rephrased -rephrases -rephrasing -repine -repined -repining -replace -replaceable -replaced -replacement -replacements -replaces -replacing -replanning -replant -replanted -replanting -replay -replayed -replaying -replays -replenish -replenished -replenishing -replenishment -replete -replica -replicable -replicas -replicate -replicated -replicates -replicating -replication -replications -replicator -replicators -replied -replier -repliers -replies -replotted -replug -replugged -replugging -reply -replying -repopulate -repopulated -report -reportable -reportage -reported -reportedly -reporter -reporters -reporting -reports -repose -reposed -reposes -reposing -reposition -repositioned -repositioning -repositions -repositories -repository -repossess -repossessed -repossessing -repossession -repossessions -reprehend -reprehensible -represent -representable -representation -representational -representations -representative -representativeness -representatives -represented -representing -represents -repress -repressed -represses -repressing -repression -repressions -repressive -repressively -reprieve -reprieved -reprimand -reprimanded -reprimanding -reprimands -reprint -reprinted -reprinting -reprints -reprisal -reprisals -reprise -reproach -reproached -reproaches -reproachful -reproachfully -reproachfulness -reproaching -reprobate -reprobates -reprocess -reprocessed -reprocessing -reproduce -reproduced -reproduces -reproducibility -reproducible -reproducibly -reproducing -reproduction -reproductions -reproductive -reproductively -reprogram -reprogrammable -reprogramme -reprogrammed -reprogramming -reprojected -reproof -reproofs -reprove -reproved -reprovingly -reps -reptile -reptiles -reptilian -reptilians -republic -republican -republicanism -republicans -republication -republics -republish -republished -republishes -republishing -repudiate -repudiated -repudiates -repudiating -repudiation -repugnance -repugnant -repulse -repulsed -repulsing -repulsion -repulsions -repulsive -repulsively -repulsiveness -repurchase -reputable -reputably -reputation -reputations -repute -reputed -reputedly -reputes -request -requested -requester -requesting -requests -requiem -requiems -require -required -requirement -requirements -requires -requiring -requisite -requisites -requisition -requisitioned -requisitioning -requisitions -requital -requite -requited -reran -reread -rereading -rereads -reregistration -rerolled -reroute -rerouted -rerouteing -reroutes -rerouting -rerun -rerunning -reruns -resale -rescale -rescaled -rescales -rescaling -rescan -rescanned -rescanning -rescans -reschedule -rescheduled -rescheduling -rescind -rescinded -rescinding -rescue -rescued -rescuer -rescuers -rescues -rescuing -resea -resealed -research -researched -researcher -researchers -researches -researching -reseated -reseeding -reselect -reselected -reselection -resell -reseller -resellers -reselling -resemblance -resemblances -resemble -resembled -resembles -resembling -resend -resending -resent -resented -resentful -resentfully -resenting -resentment -resentments -resents -reservation -reservations -reserve -reserved -reserver -reserves -reserving -reservists -reservoir -reservoirs -reset -resets -resettable -resetting -resettle -resettled -resettlement -resettling -reshape -reshaped -reshapes -reshaping -resharpen -resharpened -resharpening -reshow -reshowing -reshuffle -reshuffled -reshuffles -reshuffling -reside -resided -residence -residences -residency -resident -residential -residents -resides -residing -residual -residuals -residuary -residue -residues -residuum -resign -resignal -resignation -resignations -resigned -resignedly -resigning -resigns -resilience -resilient -resin -resinous -resins -resiny -resist -resistance -resistances -resistant -resisted -resistible -resisting -resistive -resistively -resistivity -resistor -resistors -resists -resit -resiting -resits -resize -resizing -resold -resolute -resolutely -resolution -resolutions -resolvability -resolvable -resolve -resolved -resolvent -resolver -resolvers -resolves -resolving -resonance -resonances -resonant -resonantly -resonate -resonated -resonates -resonating -resonator -resonators -resort -resorted -resorting -resorts -resound -resounded -resounding -resoundingly -resounds -resource -resourced -resourceful -resourcefulness -resources -resourcing -respecified -respecify -respect -respectability -respectable -respectably -respected -respectful -respectfully -respecting -respective -respectively -respects -respiration -respirator -respirators -respiratory -respire -respired -respite -resplendent -respond -responded -respondent -respondents -responder -responders -responding -responds -response -responses -responsibilities -responsibility -responsible -responsibly -responsive -responsively -responsiveness -respray -resprayed -resprays -rest -restart -restartable -restarted -restarting -restarts -restate -restated -restatement -restates -restating -restaurant -restaurants -restaurateur -restaurateurs -rested -restful -restfulness -resting -restitution -restive -restiveness -restless -restlessly -restlessness -restock -restocking -restoration -restorations -restorative -restore -restored -restorer -restorers -restores -restoring -restrain -restrained -restraining -restrains -restraint -restraints -restrict -restricted -restricting -restriction -restrictions -restrictive -restrictively -restricts -restroom -restructure -restructured -restructures -restructuring -rests -restyled -resubmission -resubmissions -resubmit -resubmits -resubmitted -resubmitting -resubstitute -result -resultant -resulted -resulting -results -resume -resumed -resumes -resuming -resumption -resupply -resurface -resurfaced -resurfacing -resurgence -resurgent -resurrect -resurrected -resurrecting -resurrection -resurrects -resuscitate -resuscitated -resuscitating -resuscitation -retail -retailed -retailer -retailers -retailing -retails -retain -retained -retainer -retainers -retaining -retains -retake -retaken -retakes -retaking -retaliate -retaliated -retaliates -retaliating -retaliation -retaliatory -retard -retardant -retardation -retarded -retarding -retards -retch -retched -retching -retell -retelling -retention -retentions -retentive -retentiveness -retentivity -retest -retested -retesting -retests -rethink -rethinking -rethought -reticence -reticent -reticular -reticulated -reticulation -reticule -reticules -reticulum -retied -retina -retinal -retinas -retinitis -retinue -retinues -retire -retired -retiree -retirement -retirements -retires -retiring -retitle -retitled -retitling -retold -retook -retort -retorted -retorting -retorts -retouch -retouched -retouching -retrace -retraced -retraces -retracing -retract -retractable -retracted -retracting -retraction -retractions -retracts -retrain -retrained -retraining -retral -retransmission -retransmissions -retransmit -retransmits -retransmitted -retransmitting -retread -retreads -retreat -retreated -retreating -retreats -retrench -retrenchment -retrial -retribution -retributive -retried -retries -retrievable -retrieval -retrievals -retrieve -retrieved -retriever -retrievers -retrieves -retrieving -retro -retroactive -retroactively -retrofit -retrofitted -retrofitting -retrograde -retrogressive -retrospect -retrospection -retrospective -retrospectively -retrospectives -retroviruses -retry -retrying -retsina -retted -retune -retuning -return -returnable -returned -returnees -returning -returns -retype -retyped -retypes -retyping -reunification -reunified -reunify -reunion -reunions -reunite -reunited -reunites -reuniting -reusable -reuse -reused -reuses -reusing -rev -revaluation -revaluations -revalue -revalued -revalues -revamp -revamped -revamping -revamps -revanchist -reveal -revealable -revealed -revealing -revealingly -reveals -reveille -revel -revelation -revelations -revelatory -revelled -reveller -revellers -revelling -revelries -revelry -revels -revenant -revenge -revenged -revengeful -revenges -revenging -revenue -revenues -reverberant -reverberate -reverberated -reverberates -reverberating -reverberation -reverberations -revere -revered -reverence -reverend -reverent -reverential -reverentially -reverently -reveres -reverie -reveries -revering -reversal -reversals -reverse -reversed -reverser -reverses -reversibility -reversible -reversibly -reversing -reversion -revert -reverted -reverting -reverts -review -reviewable -reviewed -reviewer -reviewers -reviewing -reviews -revile -reviled -reviling -revisable -revisal -revise -revised -reviser -revises -revising -revision -revisionary -revisionism -revisionist -revisionists -revisions -revisit -revisited -revisiting -revisits -revitalisation -revitalise -revitalised -revitalising -revival -revivalism -revivalist -revivalists -revivals -revive -revived -reviver -revives -revivify -revivifying -reviving -revocable -revocation -revocations -revoke -revoked -revoker -revokers -revokes -revoking -revolt -revolted -revolting -revoltingly -revolts -revolution -revolutionaries -revolutionary -revolutionise -revolutionised -revolutionises -revolutionising -revolutions -revolve -revolved -revolver -revolvers -revolves -revolving -revs -revue -revues -revulsion -revved -revving -reward -rewarded -rewarding -rewards -reweighed -rewind -rewindable -rewinding -rewinds -rewire -rewired -rewiring -reword -reworded -rewording -rewordings -rework -reworked -reworking -reworks -rewound -rewrap -rewritable -rewrite -rewrites -rewriting -rewritings -rewritten -rewrote -rhapsodic -rhapsodical -rhapsodies -rhapsody -rhea -rhein -rhenium -rheological -rheology -rheostat -rhesus -rhetoric -rhetorical -rhetorically -rhetorician -rhetoricians -rheumatic -rheumatics -rheumatism -rheumatoid -rheumatology -rhine -rhinestone -rhinitis -rhino -rhinoceros -rhinoceroses -rhizome -rho -rhodesia -rhodium -rhododendron -rhododendrons -rhombic -rhomboids -rhombus -rhombuses -rhubarb -rhumbas -rhyme -rhymed -rhymer -rhymes -rhyming -rhythm -rhythmic -rhythmical -rhythmically -rhythms -ria -rial -rials -rialto -rib -ribald -ribaldry -ribbed -ribbing -ribbon -ribbons -ribcage -riboflavin -ribonucleic -ribosomal -ribosome -ribosomes -ribs -rice -rich -richer -riches -richest -richly -richness -rick -rickets -rickety -ricking -ricks -ricksha -rickshas -rickshaw -rickshaws -ricochet -ricocheted -ricocheting -rid -riddance -ridden -ridding -riddle -riddled -riddles -riddling -ride -rider -riders -rides -ridge -ridged -ridges -ridicule -ridiculed -ridicules -ridiculing -ridiculous -ridiculously -ridiculousness -riding -ridings -rids -rife -riff -riffle -riffled -riffs -rifle -rifled -rifleman -riflemen -rifles -rifling -riflings -rift -rifting -rifts -rig -rigged -rigger -riggers -rigging -right -righted -righten -righteous -righteously -righteousness -righter -rightful -rightfully -righthand -righthanded -righthandedness -righthander -righthanders -righting -rightist -rightly -rightminded -rightmost -rightness -rights -rightthinking -rightward -rightwards -rightwing -rightwinger -rightwingers -rigid -rigidifies -rigidify -rigidities -rigidity -rigidly -rigmarole -rigor -rigorous -rigorously -rigour -rigours -rigs -rile -riled -riles -riling -rill -rills -rim -rime -rimless -rimmed -rims -rind -rinds -ring -ringed -ringer -ringers -ringing -ringingly -ringleader -ringleaders -ringless -ringlet -ringlets -ringmaster -rings -ringside -ringworm -rink -rinks -rinse -rinsed -rinses -rinsing -riot -rioted -rioter -rioters -rioting -riotous -riotously -riots -rip -ripcord -ripe -ripely -ripen -ripened -ripeness -ripening -ripens -riper -ripest -riping -ripoff -riposte -riposted -ripostes -ripped -ripper -rippers -ripping -ripple -rippled -ripples -rippling -rips -ripstop -rise -risen -riser -risers -rises -risible -rising -risings -risk -risked -riskier -riskiest -riskiness -risking -risks -risky -risotto -risque -rissole -rissoles -rite -rites -ritual -ritualised -ritualistic -ritualistically -ritually -rituals -rival -rivalled -rivalling -rivalries -rivalry -rivals -riven -river -riverine -rivers -riverside -rivet -riveted -riveter -riveting -rivetingly -rivets -riviera -rivulet -rivulets -roach -roaches -road -roadblock -roadblocks -roadhouse -roadmap -roads -roadshow -roadshows -roadside -roadsides -roadsigns -roadster -roadsweepers -roadway -roadways -roadworks -roadworthy -roam -roamed -roamer -roaming -roams -roan -roar -roared -roarer -roaring -roars -roast -roasted -roaster -roasting -roasts -rob -robbed -robber -robberies -robbers -robbery -robbing -robe -robed -robes -robin -robins -robot -robotic -robotics -robots -robs -robust -robustly -robustness -roc -rock -rockbottom -rocked -rocker -rockers -rockery -rocket -rocketed -rocketing -rocketry -rockets -rockfall -rockfalls -rockier -rockiest -rocking -rocks -rocksolid -rocky -rococo -rocs -rod -rode -rodent -rodents -rodeo -rodeos -rods -roe -roebuck -roentgen -roes -rogue -roguery -rogues -roguish -roguishly -roguishness -roister -roistering -role -roles -roll -rollcall -rolled -roller -rollercoaster -rollers -rollerskating -rollicking -rolling -rolls -rolypoly -rom -roman -romance -romanced -romancer -romances -romancing -romans -romantic -romantically -romanticised -romanticises -romanticising -romanticism -romantics -romany -rome -rommel -romp -romped -romper -romping -romps -romulus -rondavel -roo -roof -roofed -roofer -roofgarden -roofing -roofings -roofless -roofs -rooftop -rooftops -rooibos -rook -rookeries -rookery -rookies -rooks -room -roomful -roomier -roomiest -roommate -rooms -roomy -roost -roosted -rooster -roosters -roosting -roosts -root -rooted -rooting -rootings -rootless -roots -rope -roped -ropes -roping -rosaries -rosary -rose -rosebud -rosebuds -rosebush -rosemary -roses -rosette -rosettes -rosewood -rosier -rosiest -rosily -rosin -roster -rostering -rosters -rostrum -rostrums -rosy -rot -rota -rotary -rotas -rotatable -rotate -rotated -rotates -rotating -rotation -rotational -rotationally -rotations -rotator -rotators -rotatory -rote -rotor -rotors -rots -rotted -rotten -rottenly -rottenness -rotter -rotting -rotund -rotunda -rotundity -rouble -roubles -rouge -rouged -rouges -rough -roughage -roughed -roughen -roughened -roughens -rougher -roughest -roughie -roughing -roughly -roughness -roughs -roughshod -roulette -round -roundabout -roundabouts -rounded -roundel -roundels -rounder -rounders -roundest -roundhouse -rounding -roundish -roundly -roundness -rounds -roundtheclock -roundup -roundups -rouse -roused -rouses -rousing -rout -route -routed -routeing -router -routers -routes -routine -routinely -routines -routing -routs -rove -roved -rover -rovers -roves -roving -rovings -row -rowboat -rowboats -rowdier -rowdiest -rowdily -rowdiness -rowdy -rowdyism -rowed -rower -rowers -rowing -rows -royal -royalist -royalists -royally -royals -royalties -royalty -ruanda -rub -rubbed -rubber -rubberised -rubbers -rubberstamp -rubberstamped -rubberstamping -rubbery -rubbing -rubbings -rubbish -rubbished -rubbishes -rubbishing -rubbishy -rubble -rubbles -rubella -rubicon -rubicund -rubidium -rubies -rubric -rubs -ruby -ruck -rucks -rucksack -rucksacks -ruction -ructions -rudder -rudderless -rudders -ruddiness -ruddy -rude -rudely -rudeness -ruder -rudest -rudimentary -rudiments -rue -rueful -ruefully -ruefulness -rues -ruff -ruffian -ruffians -ruffle -ruffled -ruffles -ruffling -ruffs -rug -rugby -rugged -ruggedly -ruggedness -rugs -ruin -ruination -ruinations -ruined -ruiner -ruining -ruinous -ruinously -ruins -rule -rulebook -rulebooks -ruled -ruler -rulers -rules -ruling -rulings -rum -rumania -rumba -rumbas -rumble -rumbled -rumbles -rumbling -rumblings -rumbustious -rumen -ruminant -ruminants -ruminate -ruminated -ruminating -rumination -ruminations -ruminative -ruminatively -rummage -rummaged -rummages -rummaging -rummy -rumour -rumoured -rumours -rump -rumple -rumpled -rumpling -rumps -rumpus -rumpuses -run -runaway -rundown -rune -runes -rung -rungs -runnable -runner -runners -runnersup -runnerup -runnier -runniest -running -runny -runofthemill -runs -runt -runts -runway -runways -rupee -rupees -rupert -rupture -ruptured -ruptures -rupturing -rural -ruralist -rurally -ruse -rush -rushed -rushes -rushhour -rushier -rushing -rusk -rusks -russet -russia -russian -rust -rusted -rustic -rustically -rusticate -rusticated -rusticity -rustics -rustier -rustiest -rustiness -rusting -rustle -rustled -rustler -rustlers -rustles -rustling -rustproof -rusts -rusty -rut -ruth -ruthless -ruthlessly -ruthlessness -ruts -rutted -rwanda -rye -sabbat -sabbath -sabbaths -sabbatical -sabbaticals -saber -sable -sables -sabotage -sabotaged -sabotages -sabotaging -saboteur -saboteurs -sabra -sabras -sabre -sabres -sabretoothed -sac -saccharides -saccharin -saccharine -sacerdotal -sachet -sachets -sack -sackcloth -sacked -sackful -sackfuls -sacking -sacks -sacral -sacrament -sacramental -sacraments -sacred -sacredly -sacredness -sacrifice -sacrificed -sacrifices -sacrificial -sacrificing -sacrilege -sacrilegious -sacristy -sacrosanct -sacrum -sacs -sad -sadden -saddened -saddening -saddens -sadder -saddest -saddle -saddlebag -saddlebags -saddled -saddler -saddlers -saddles -saddling -sadism -sadist -sadistic -sadistically -sadists -sadly -sadness -sadomasochism -sadomasochistic -sadsack -safari -safaris -safe -safeguard -safeguarded -safeguarding -safeguards -safely -safeness -safer -safes -safest -safeties -safety -saffron -sag -saga -sagacious -sagaciously -sagacity -sagas -sage -sagely -sages -sagest -sagged -sagging -sago -sags -sahara -sahib -said -saigon -sail -sailcloth -sailed -sailer -sailing -sailings -sailmaker -sailor -sailors -sails -saint -sainted -sainthood -saintlier -saintliest -saintliness -saintly -saints -saipan -sake -sakes -saki -salaam -salacious -salad -salads -salamander -salamanders -salami -salamis -salaried -salaries -salary -sale -saleability -saleable -salem -sales -salesgirl -salesman -salesmanship -salesmen -salespeople -salesperson -saleswoman -salicylic -salience -salient -saline -salinity -saliva -salivary -salivas -salivate -salivating -salivation -salivations -sallied -sallies -sallow -sally -sallying -salmon -salmonella -salmons -salome -salon -salons -saloon -saloons -salsa -salt -salted -saltier -saltiest -saltiness -saltpetre -salts -saltwater -salty -salubrious -salubrity -salutary -salutation -salutations -salute -saluted -salutes -saluting -salvage -salvageable -salvaged -salvager -salvages -salvaging -salvation -salve -salved -salver -salvers -salving -salvo -sam -samba -sambas -same -sameness -samizdat -samoa -samosas -samovar -sampan -sample -sampled -sampler -samplers -samples -sampling -samplings -samurai -san -sanatorium -sanctification -sanctified -sanctifies -sanctify -sanctifying -sanctimonious -sanction -sanctioned -sanctioning -sanctions -sanctity -sanctuaries -sanctuary -sanctum -sand -sandal -sandalled -sandals -sandalwood -sandbag -sandbagged -sandbags -sandbank -sandbanks -sandcastle -sandcastles -sanddune -sanded -sander -sandier -sandiest -sanding -sandman -sandpaper -sandpapering -sandpiper -sandpipers -sandpit -sands -sandstone -sandstones -sandwich -sandwiched -sandwiches -sandwiching -sandy -sane -sanely -saner -sanest -sang -sanguine -sanitary -sanitation -sanitise -sanitised -sanitiser -sanitisers -sanity -sank -sanserif -sanskrit -santiago -sap -sapient -sapling -saplings -sapped -sapper -sappers -sapphire -sapphires -sapping -saps -sarcasm -sarcasms -sarcastic -sarcastically -sarcoma -sarcophagi -sarcophagus -sardine -sardines -sardinia -sardonic -sardonically -sarge -sari -saris -sarong -sartorial -sartorially -sash -sashes -sat -satan -satanic -satanically -satanism -satchel -satchels -sated -satellite -satellites -satiate -satiated -satiation -satin -sating -satins -satinwood -satiny -satire -satires -satiric -satirical -satirically -satirise -satirised -satirises -satirising -satirist -satirists -satisfaction -satisfactions -satisfactorily -satisfactory -satisfiable -satisfied -satisfies -satisfy -satisfying -satisfyingly -satrap -satraps -satsumas -saturate -saturated -saturates -saturating -saturation -saturday -saturn -saturnalia -saturnine -satyr -satyric -satyrs -sauce -saucepan -saucepans -saucer -saucers -sauces -saucier -sauciest -saucily -sauciness -saucy -saudi -saudis -sauerkraut -sauna -saunas -saunter -sauntered -sauntering -saunters -sausage -sausages -saute -savage -savaged -savagely -savagery -savages -savaging -savanna -savannah -savant -savants -save -saved -saveloy -saver -savers -saves -saving -savings -saviour -saviours -savour -savoured -savouring -savours -savoury -savvy -saw -sawdust -sawed -sawing -sawmill -sawmills -sawn -saws -sawtooth -sawyer -sawyers -saxon -saxons -saxony -saxophone -saxophones -saxophonist -say -saying -sayings -says -scab -scabbard -scabbards -scabbed -scabby -scabies -scabs -scaffold -scaffolding -scaffolds -scalability -scalable -scalar -scalars -scald -scalded -scalding -scalds -scale -scaled -scalene -scales -scaling -scallop -scalloped -scallops -scalp -scalped -scalpel -scalpels -scalping -scalps -scaly -scam -scamp -scamped -scamper -scampered -scampering -scampi -scams -scan -scandal -scandalise -scandalised -scandalous -scandalously -scandals -scanned -scanner -scanners -scanning -scans -scansion -scant -scantier -scantiest -scantily -scantiness -scanty -scape -scapegoat -scapegoats -scapula -scar -scarab -scarce -scarcely -scarceness -scarcer -scarcest -scarcities -scarcity -scare -scarecrow -scarecrows -scared -scaremonger -scaremongering -scares -scarf -scarfs -scarier -scariest -scarified -scarify -scarifying -scarily -scaring -scarlet -scarlets -scarp -scarred -scarring -scars -scarves -scary -scat -scathe -scathed -scathing -scathingly -scatological -scatter -scattered -scatterer -scatterers -scattering -scatterings -scatters -scavenge -scavenged -scavenger -scavengers -scavenging -scenario -scene -scenery -scenes -scenic -scenically -scent -scented -scenting -scentless -scents -sceptic -sceptical -sceptically -scepticism -sceptics -sceptre -sceptred -sceptres -schedule -scheduled -scheduler -schedulers -schedules -scheduling -schema -schemas -schemata -schematic -schematically -schematics -scheme -schemed -schemer -schemes -scheming -scherzi -scherzo -schism -schismatic -schismatics -schisms -schist -schistosomiasis -schists -schizoid -schizophrenia -schizophrenic -schizophrenically -schizophrenics -schmalz -schnapps -scholar -scholarly -scholars -scholarship -scholarships -scholastic -scholasticism -school -schoolboy -schoolboys -schoolchild -schoolchildren -schooldays -schooled -schoolgirl -schoolgirls -schoolhouse -schooling -schoolmaster -schoolmasters -schoolmates -schoolmistress -schoolroom -schools -schoolteacher -schoolteachers -schooner -schooners -schwa -schwas -sciatica -science -sciences -scientific -scientifically -scientist -scientists -scifi -scimitar -scimitars -scintigraphy -scintillate -scintillated -scintillating -scintillation -scintillations -scintillator -scintillators -scissor -scissored -scissors -sclerosis -scoff -scoffed -scoffing -scold -scolded -scolder -scolding -scolds -scone -scones -scoop -scooped -scooper -scoopful -scooping -scoops -scoot -scooter -scooters -scooting -scoots -scope -scopes -scorch -scorched -scorcher -scorches -scorching -score -scoreboard -scoreboards -scorecard -scorecards -scored -scoreless -scoreline -scorer -scorers -scores -scoring -scorn -scorned -scornful -scornfully -scorning -scorns -scorpion -scorpions -scot -scotch -scotched -scotches -scotfree -scotland -scots -scotsman -scottish -scoundrel -scoundrels -scour -scoured -scourge -scourged -scourges -scourging -scouring -scours -scout -scouted -scouting -scoutmaster -scoutmasters -scouts -scowl -scowled -scowling -scowls -scrabble -scrabbled -scrabbling -scram -scramble -scrambled -scrambler -scramblers -scrambles -scrambling -scrams -scrap -scrapbook -scrapbooks -scrape -scraped -scraper -scrapers -scrapes -scrapie -scraping -scrapings -scrapped -scrappier -scrappiest -scrapping -scrappy -scraps -scrapyard -scrapyards -scratch -scratched -scratches -scratchier -scratchiest -scratchiness -scratching -scratchings -scratchy -scrawl -scrawled -scrawling -scrawls -scrawnier -scrawniest -scrawny -scream -screamed -screamer -screamers -screaming -screamingly -screams -scree -screech -screeched -screeches -screechier -screechiest -screeching -screechy -screed -screeds -screen -screened -screening -screenings -screenplay -screenplays -screens -screenwriter -screw -screwdriver -screwdrivers -screwed -screwing -screws -screwy -scribal -scribble -scribbled -scribbler -scribblers -scribbles -scribbling -scribblings -scribe -scribed -scribes -scribing -scrimped -script -scripted -scripting -scriptorium -scripts -scriptural -scripture -scriptures -scriptwriter -scriptwriters -scriptwriting -scroll -scrollable -scrolled -scrolling -scrolls -scrooge -scrooges -scrotum -scrub -scrubbed -scrubber -scrubbers -scrubbing -scrubby -scrubland -scrubs -scruff -scruffier -scruffy -scrum -scrumhalf -scrummage -scrummaging -scrums -scrunched -scruple -scruples -scrupulous -scrupulously -scrupulousness -scrutineers -scrutinies -scrutinise -scrutinised -scrutinises -scrutinising -scrutiny -scuba -scubas -scud -scudded -scudding -scuds -scuff -scuffed -scuffing -scuffle -scuffled -scuffles -scuffling -scull -sculled -sculler -sculleries -scullery -sculling -sculls -sculpt -sculpted -sculpting -sculptor -sculptors -sculptress -sculptural -sculpture -sculptured -sculptures -scum -scupper -scuppered -scurried -scurries -scurrilous -scurry -scurrying -scurryings -scurvy -scuttle -scuttled -scuttles -scuttling -scythe -scythed -scythes -scything -sea -seabed -seabird -seabirds -seaboard -seaborne -seacow -seacows -seafarer -seafarers -seafaring -seafood -seafront -seagod -seagoing -seagreen -seagull -seagulls -seal -sealant -sealants -sealed -sealer -sealers -sealing -sealion -seals -seam -seamail -seaman -seamanship -seamed -seamen -seamier -seamless -seamlessly -seams -seamstress -seamstresses -seamy -seance -seances -seaplane -seaplanes -seaport -seaports -sear -search -searched -searcher -searchers -searches -searching -searchingly -searchlight -searchlights -seared -searing -sears -seas -seascape -seascapes -seashells -seashore -seashores -seasick -seasickness -seaside -season -seasonable -seasonably -seasonal -seasonality -seasonally -seasoned -seasoner -seasoning -seasons -seat -seated -seating -seatings -seats -seattle -seaward -seawards -seawater -seaweed -seaweeds -seaworthy -sebaceous -sec -secant -secateurs -secede -seceded -secedes -seceding -secession -secessionist -secessionists -secessions -seclude -secluded -seclusion -second -secondaries -secondarily -secondary -secondbest -secondclass -seconded -seconder -seconders -secondhand -seconding -secondly -secondment -secondments -secondrate -seconds -secrecy -secret -secretarial -secretariat -secretariats -secretaries -secretary -secretaryship -secrete -secreted -secretes -secreting -secretion -secretions -secretive -secretively -secretiveness -secretly -secretory -secrets -sect -sectarian -sectarianism -section -sectional -sectioned -sectioning -sections -sector -sectoral -sectored -sectors -sects -secular -secularisation -secularised -secularism -secularist -secularists -secure -secured -securely -securer -secures -securest -securing -securities -security -sedan -sedate -sedated -sedately -sedateness -sedater -sedates -sedating -sedation -sedative -sedatives -sedentary -sedge -sedges -sediment -sedimentary -sedimentation -sediments -sedition -seditious -seduce -seduced -seducer -seducers -seduces -seducing -seduction -seductions -seductive -seductively -seductiveness -sedulously -see -seeable -seed -seedbed -seeded -seeder -seedier -seediest -seediness -seeding -seedless -seedling -seedlings -seeds -seedy -seeing -seeings -seek -seeker -seekers -seeking -seeks -seem -seemed -seeming -seemingly -seemlier -seemliest -seemly -seems -seen -seep -seepage -seeped -seeping -seeps -seer -seers -sees -seesaw -seesaws -seethe -seethed -seethes -seething -seethrough -segment -segmental -segmentation -segmented -segmenting -segments -segregate -segregated -segregates -segregating -segregation -seine -seisin -seismic -seismogram -seismograph -seismological -seismologist -seismologists -seismology -seismometer -seismometers -seize -seized -seizer -seizes -seizing -seizure -seizures -seldom -select -selectable -selected -selectee -selecting -selection -selections -selective -selectively -selectivity -selector -selectors -selects -selenium -selenology -self -selfcentred -selfcentredness -selfconfidence -selfconfident -selfconscious -selfconsciously -selfconsciousness -selfcontrol -selfcontrolled -selfdefence -selfdestruct -selfdestructed -selfdestructing -selfdestruction -selfdestructive -selfdestructs -selfdiscipline -selfemployed -selfesteem -selfevident -selfgoverning -selfgovernment -selfinflicted -selfinterest -selfish -selfishly -selfishness -selfless -selflessly -selfmade -selfpity -selfportrait -selfportraits -selfrespect -selfrespecting -selfrestraint -selfrighteous -selfrighteously -selfrighteousness -selfsacrifice -selfsacrificing -selfsame -selfsupporting -selftaught -sell -sellable -seller -sellers -selling -sells -selves -semantic -semantically -semantics -semaphore -semaphores -semaphoring -semblance -semblances -semen -semester -semesters -semi -semicircle -semicircular -semicolon -semicolons -semiconducting -semiconductor -semiconductors -semiconscious -semidetached -semifinal -semifinalist -semifinalists -semifinals -seminar -seminaries -seminars -seminary -semite -semites -semitic -semitics -sen -senate -senates -senator -senatorial -senators -send -sender -senders -sending -sends -senegal -senhor -senhors -senile -senility -senior -seniority -seniors -senora -senoritas -sensation -sensational -sensationalised -sensationalism -sensationalist -sensationalistic -sensationally -sensations -sense -sensed -senseless -senselessly -senselessness -senses -sensibilities -sensibility -sensible -sensibleness -sensibly -sensing -sensings -sensitisation -sensitised -sensitisers -sensitive -sensitively -sensitiveness -sensitivities -sensitivity -sensor -sensors -sensory -sensual -sensuality -sensually -sensuous -sensuously -sensuousness -sent -sentence -sentenced -sentences -sentencing -sentential -sententious -sententiously -sentience -sentient -sentiment -sentimental -sentimentalised -sentimentalism -sentimentalist -sentimentality -sentimentally -sentiments -sentinel -sentinels -sentries -sentry -seoul -separability -separable -separate -separated -separately -separateness -separates -separating -separation -separations -separatism -separatist -separatists -separator -separators -sepia -september -septet -septets -septic -septicaemia -sepulchral -sepulchre -sepulchres -sequel -sequels -sequence -sequenced -sequencer -sequencers -sequences -sequencing -sequent -sequential -sequentially -sequestered -sequestrated -sequestration -sequin -sequinned -sequins -sequoia -seraglio -serai -seraphic -seraphically -seraphim -seraphs -serenade -serenader -serenades -serenading -serenata -serendipitous -serendipitously -serendipity -serene -serenely -serener -serenest -serenity -serf -serfdom -serfhood -serfs -serge -sergeant -sergeants -serial -serialisation -serialisations -serialise -serialised -serialising -serially -serials -series -serif -serifed -serifs -serious -seriously -seriousness -sermon -sermons -serological -serology -seronegative -serotonin -serpent -serpentine -serpents -serrate -serrated -serried -serum -serums -servant -servants -serve -served -server -servers -serves -service -serviceability -serviceable -serviced -serviceman -servicemen -services -servicing -serviette -servile -servilely -servility -serving -servings -servitude -sesame -sesotho -sessile -session -sessions -set -setback -setbacks -seth -sets -setswana -settee -settees -setter -setters -setting -settings -settle -settled -settlement -settlements -settler -settlers -settles -settling -setts -setup -seven -sevenfold -sevenpence -sevens -seventeen -seventeenth -seventh -seventies -seventieth -seventy -sever -severable -several -severally -severance -severe -severed -severely -severer -severest -severing -severity -severs -sew -sewage -sewed -sewer -sewerage -sewerrat -sewers -sewing -sewings -sewn -sews -sex -sexed -sexes -sexier -sexiest -sexily -sexiness -sexing -sexism -sexist -sexists -sexless -sexologists -sexology -sextant -sextants -sextet -sextets -sexton -sextons -sextuplet -sextuplets -sexual -sexualities -sexuality -sexually -sexy -shabbier -shabbiest -shabbily -shabbiness -shabby -shack -shackle -shackled -shackles -shacks -shade -shaded -shadeless -shades -shadier -shadiest -shadily -shading -shadings -shadow -shadowed -shadowing -shadowless -shadows -shadowy -shady -shaft -shafted -shafting -shafts -shag -shagged -shaggiest -shaggy -shags -shah -shahs -shakable -shake -shakeable -shakedown -shaken -shaker -shakers -shakes -shakeup -shakeups -shakier -shakiest -shakily -shaking -shaky -shale -shall -shallot -shallots -shallow -shallower -shallowest -shallowly -shallowness -shallows -sham -shaman -shamanic -shamanism -shamanistic -shamans -shamble -shambled -shambles -shambling -shame -shamed -shamefaced -shamefacedly -shameful -shamefully -shameless -shamelessly -shamelessness -shames -shaming -shammed -shamming -shampoo -shampooed -shampooing -shampoos -shamrock -shams -shandy -shank -shanks -shanties -shanty -shape -shaped -shapeless -shapelier -shapeliest -shapely -shaper -shapers -shapes -shaping -sharable -shard -shards -share -shareable -shared -shareholder -shareholders -shareholding -shareholdings -sharer -shares -shareware -sharing -shark -sharks -sharp -sharpen -sharpened -sharpener -sharpeners -sharpening -sharpens -sharper -sharpest -sharply -sharpness -sharps -shatter -shattered -shattering -shatteringly -shatterproof -shatters -shave -shaved -shaven -shaver -shavers -shaves -shaving -shavings -shaw -shawl -shawls -she -sheaf -shear -sheared -shearer -shearers -shearing -shears -shearwater -shearwaters -sheath -sheathe -sheathed -sheathing -sheaths -sheaves -shed -shedding -sheds -sheen -sheep -sheepdog -sheepdogs -sheepish -sheepishly -sheepishness -sheepskin -sheepskins -sheer -sheered -sheerest -sheerness -sheet -sheeted -sheeting -sheets -sheik -sheikh -sheikhs -sheiks -shekel -shekels -shelf -shell -shellac -shelled -shellfire -shellfish -shelling -shells -shelter -sheltered -sheltering -shelters -shelve -shelved -shelves -shelving -shepherd -shepherded -shepherdess -shepherding -shepherds -sherbet -sherds -sheriff -sheriffs -sherlock -sherries -sherry -shetland -shibboleth -shibboleths -shied -shield -shielded -shielding -shields -shielings -shies -shift -shifted -shifter -shifters -shiftier -shiftily -shiftiness -shifting -shiftless -shifts -shifty -shilling -shimmer -shimmered -shimmering -shimmers -shin -shinbone -shindig -shine -shined -shiner -shines -shingle -shingles -shinier -shiniest -shining -shinned -shinning -shins -shiny -ship -shipboard -shipborne -shipbuilder -shipbuilders -shipbuilding -shipload -shiploads -shipmate -shipmates -shipment -shipments -shipowner -shipowners -shippable -shipped -shipping -ships -shipshape -shipwreck -shipwrecked -shipwrecks -shipwright -shipwrights -shipyard -shipyards -shire -shires -shirk -shirked -shirking -shirt -shirtless -shirts -shirtsleeves -shiver -shivered -shivering -shiveringly -shivers -shivery -shoal -shoals -shock -shocked -shocker -shockers -shocking -shockingly -shocks -shod -shoddier -shoddiest -shoddily -shoddiness -shoddy -shoe -shoebox -shoed -shoehorn -shoeing -shoelace -shoelaces -shoeless -shoemaker -shoemakers -shoes -shoestring -shoestrings -shogun -shoguns -shone -shoo -shooed -shooing -shook -shoot -shooter -shooters -shooting -shootings -shoots -shop -shopfront -shopfronts -shopkeeper -shopkeepers -shopkeeping -shoplift -shoplifted -shoplifter -shoplifters -shoplifting -shopped -shopper -shoppers -shopping -shops -shore -shored -shoreline -shorelines -shores -shoreward -shorewards -shoring -shorn -short -shortage -shortages -shortbread -shortcircuit -shortcircuited -shortcircuiting -shortcoming -shortcomings -shortcrust -shortcut -shortcuts -shorted -shorten -shortened -shortening -shortens -shorter -shortest -shortfall -shortfalls -shorthand -shorting -shortish -shortlist -shortlisted -shortlisting -shortlived -shortly -shortness -shorts -shortsighted -shortsightedly -shortsightedness -shortstaffed -shorttempered -shortterm -shortwinded -shorty -shot -shotgun -shotguns -shots -should -shoulder -shouldered -shouldering -shoulders -shout -shouted -shouter -shouters -shouting -shouts -shove -shoved -shovel -shovelful -shovelled -shoveller -shovelling -shovels -shoves -shoving -show -showcase -showcases -showcasing -showdown -showed -shower -showered -showering -showers -showery -showgirl -showground -showier -showiest -showing -showings -showjumpers -showman -showmanship -showmen -shown -showoff -showpiece -showpieces -showplace -showroom -showrooms -shows -showy -shrank -shrapnel -shred -shredded -shredder -shredders -shredding -shreds -shrew -shrewd -shrewder -shrewdest -shrewdly -shrewdness -shrews -shriek -shrieked -shrieker -shriekers -shrieking -shrieks -shrift -shrill -shrilled -shrillest -shrillness -shrills -shrilly -shrimp -shrimps -shrine -shrines -shrink -shrinkable -shrinkage -shrinking -shrinkingly -shrinks -shrivel -shrivelled -shrivelling -shrivels -shroud -shrouded -shrouding -shrouds -shrub -shrubberies -shrubbery -shrubby -shrubs -shrug -shrugged -shrugging -shrugs -shrunk -shrunken -shudder -shuddered -shuddering -shudders -shuffle -shuffled -shuffler -shufflers -shuffles -shuffling -shun -shunned -shunning -shuns -shunt -shunted -shunter -shunters -shunting -shunts -shushed -shut -shutdown -shutdowns -shuts -shutter -shuttered -shuttering -shutters -shutting -shuttle -shuttlecock -shuttlecocks -shuttled -shuttles -shuttling -shutup -shy -shyer -shyest -shying -shyly -shyness -siam -siamese -siberia -siberian -sibilance -sibilancy -sibilant -sibling -siblings -sibyl -sic -sicilian -sicily -sick -sickbay -sickbed -sicken -sickened -sickening -sickeningly -sickens -sicker -sickest -sickle -sickles -sickliest -sickly -sickness -sicknesses -sickroom -side -sideband -sidebands -sideboard -sideboards -sideburns -sidecar -sided -sidekick -sidelight -sidelights -sideline -sidelines -sidelong -sider -sidereal -sides -sideshow -sideshows -sidestep -sidestepped -sidestepping -sidesteps -sideswipes -sidetrack -sidetracked -sidetracking -sidewalk -sidewards -sideways -sidewinders -siding -sidings -sidle -sidled -sidling -siege -sieges -sienna -sierra -siesta -siestas -sieve -sieved -sieves -sieving -sift -sifted -sifter -sifters -sifting -siftings -sifts -sigh -sighed -sighing -sighs -sight -sighted -sightedness -sighting -sightings -sightless -sightlessly -sightly -sights -sightsee -sightseeing -sightseers -sigma -sigmoid -sign -signal -signalled -signaller -signallers -signalling -signally -signalman -signalmen -signals -signatories -signatory -signature -signatures -signboards -signed -signer -signers -signet -significance -significances -significant -significantly -signification -significations -signified -signifier -signifies -signify -signifying -signing -signings -signor -signora -signors -signpost -signposted -signposting -signposts -signs -signwriter -silage -silence -silenced -silencer -silencers -silences -silencing -silent -silently -silhouette -silhouetted -silhouettes -silica -silicate -silicates -silicon -silicone -silicosis -silk -silken -silkier -silkiest -silkily -silkiness -silklike -silks -silkworm -silkworms -silky -sillier -silliest -silliness -silly -silo -silt -silted -silting -silts -siltstone -silty -silver -silvered -silvering -silvers -silversmith -silversmiths -silverware -silvery -simeon -similar -similarities -similarity -similarly -simile -similes -similitude -simmer -simmered -simmering -simmers -simper -simpered -simpering -simpers -simple -simpleminded -simpler -simplest -simpleton -simpletons -simplex -simplexes -simplicities -simplicity -simplification -simplifications -simplified -simplifier -simplifies -simplify -simplifying -simplism -simplistic -simplistically -simply -simulacrum -simulate -simulated -simulates -simulating -simulation -simulations -simulator -simulators -simulcasts -simultaneity -simultaneous -simultaneously -sin -sinai -since -sincere -sincerely -sincerest -sincerity -sine -sinecure -sinecures -sinecurist -sines -sinew -sinews -sinewy -sinful -sinfully -sinfulness -sing -singable -singalong -singe -singed -singeing -singer -singers -singes -singing -single -singlehanded -singlehandedly -singleminded -singlemindedly -singlemindedness -singleness -singles -singly -sings -singsong -singular -singularisation -singularities -singularity -singularly -singulars -sinister -sinisterly -sinistral -sink -sinkable -sinker -sinkers -sinking -sinks -sinless -sinned -sinner -sinners -sinning -sins -sinter -sinters -sinuous -sinuously -sinus -sinuses -sinusitis -sinusoid -sinusoidal -sinusoidally -sip -siphon -siphoned -siphoning -siphons -sipped -sipper -sippers -sipping -sips -sir -sire -sired -siren -sirens -sires -sirius -sirloin -sirloins -sirs -sis -sisal -sissies -sissy -sister -sisterhood -sisterinlaw -sisterly -sisters -sistersinlaw -sit -sitar -sitcom -sitcoms -site -sited -sites -siting -sitings -sits -sitter -sitters -sitting -sittings -situate -situated -situating -situation -situational -situationally -situationist -situations -six -sixes -sixfold -sixpence -sixteen -sixteenth -sixth -sixths -sixties -sixtieth -sixty -size -sizeable -sized -sizes -sizing -sizzle -sizzled -sizzles -sizzling -sjambok -skate -skateboard -skateboards -skated -skater -skaters -skates -skating -skein -skeletal -skeleton -skeletons -skeptic -skerries -sketch -sketchbook -sketchbooks -sketched -sketcher -sketches -sketchier -sketchiest -sketchily -sketching -sketchpad -sketchy -skew -skewed -skewer -skewered -skewers -skewness -skews -ski -skid -skidded -skidding -skids -skied -skier -skiers -skies -skiing -skilful -skilfully -skill -skilled -skillet -skillful -skills -skim -skimmed -skimmer -skimming -skimp -skimped -skimping -skimpy -skims -skin -skincare -skindeep -skinflint -skinhead -skinheads -skinless -skinned -skinner -skinners -skinnier -skinniest -skinning -skinny -skins -skintight -skip -skipped -skipper -skippered -skippering -skippers -skipping -skips -skirl -skirmish -skirmishes -skirmishing -skirt -skirted -skirting -skirts -skis -skit -skits -skittish -skittishly -skittishness -skittle -skittles -skua -skuas -skulduggery -skulk -skulked -skulking -skulks -skull -skullcap -skullduggery -skulls -skunk -skunks -sky -skydive -skydived -skydiver -skydivers -skydives -skydiving -skyhigh -skylark -skylarks -skylight -skylights -skyline -skylines -skyscape -skyscraper -skyscrapers -skyward -skywards -slab -slabs -slack -slacked -slacken -slackened -slackening -slackens -slacker -slackers -slackest -slacking -slackly -slackness -slacks -slag -slags -slain -slake -slaked -slalom -slaloms -slam -slammed -slamming -slams -slander -slandered -slanderer -slanderers -slandering -slanderous -slanders -slang -slanging -slant -slanted -slanting -slants -slantwise -slap -slapdash -slapped -slapper -slapping -slaps -slapstick -slash -slashed -slasher -slashes -slashing -slat -slate -slated -slater -slaters -slates -slating -slats -slatted -slaughter -slaughtered -slaughterer -slaughterhouse -slaughterhouses -slaughtering -slaughterings -slaughters -slav -slave -slaved -slavedriver -slavedrivers -slaver -slavered -slavering -slavers -slavery -slaves -slavic -slaving -slavish -slavishly -slavs -slay -slayed -slayer -slayers -slaying -slays -sleaze -sleazier -sleaziest -sleazy -sled -sledding -sledge -sledgehammer -sledgehammers -sledges -sledging -sleds -sleek -sleeker -sleekly -sleekness -sleeks -sleep -sleeper -sleepers -sleepier -sleepiest -sleepily -sleepiness -sleeping -sleepless -sleeplessness -sleeps -sleepwalk -sleepwalker -sleepwalking -sleepwalks -sleepy -sleet -sleets -sleeve -sleeved -sleeveless -sleeves -sleigh -sleighs -sleight -sleights -slender -slenderest -slenderly -slenderness -slept -sleuth -sleuths -slew -slewed -slewing -slice -sliced -slicer -slicers -slices -slicing -slicings -slick -slicked -slicker -slickest -slickly -slickness -slicks -slid -slide -slided -slider -sliders -slides -sliding -slight -slighted -slighter -slightest -slighting -slightingly -slightly -slights -slily -slim -slime -slimes -slimier -slimiest -slimline -slimly -slimmed -slimmer -slimmers -slimmest -slimming -slimness -slims -slimy -sling -slinging -slings -slingshot -slink -slinking -slinky -slip -slippage -slipped -slipper -slipperiness -slippers -slippery -slipping -slips -slipshod -slipstream -slipup -slipway -slit -slither -slithered -slithering -slithers -slithery -slits -slitting -sliver -slivers -slob -slobber -slobbering -slobbers -slobbery -slobs -slog -slogan -slogans -slogged -slogging -slogs -sloop -slop -slope -sloped -slopes -sloping -slopped -sloppier -sloppiest -sloppily -sloppiness -slopping -sloppy -slops -slosh -sloshed -sloshing -slot -sloth -slothful -sloths -slots -slotted -slotting -slouch -slouched -slouches -slouching -slough -sloughed -sloughing -slovak -slovenia -slovenliness -slovenly -slow -slowcoaches -slowdown -slowed -slower -slowest -slowing -slowish -slowly -slowness -slowpoke -slows -sludge -sludgy -slug -sluggard -sluggards -slugged -slugging -sluggish -sluggishly -sluggishness -slugs -sluice -sluiced -sluices -sluicing -slum -slumber -slumbered -slumbering -slumbers -slumming -slump -slumped -slumping -slumps -slums -slung -slunk -slur -slurp -slurped -slurping -slurps -slurred -slurring -slurry -slurs -slush -slushed -slushes -slushier -slushiest -slushy -slut -sluts -sly -slyer -slyly -slyness -smack -smacked -smacker -smacking -smacks -small -smaller -smallest -smallholder -smallholders -smallholding -smallholdings -smallish -smallminded -smallmindedness -smallness -smallpox -smalls -smallscale -smalltalk -smalltime -smalltown -smart -smarted -smarten -smartened -smartening -smarter -smartest -smarting -smartly -smartness -smarts -smash -smashed -smasher -smashes -smashing -smattering -smatterings -smear -smeared -smearing -smears -smegma -smell -smellable -smelled -smellier -smelliest -smelling -smells -smelly -smelt -smelted -smelter -smelters -smelting -smidgeon -smile -smiled -smiler -smilers -smiles -smiling -smilingly -smirk -smirked -smirking -smirks -smite -smith -smithereens -smiths -smithy -smiting -smitten -smock -smocks -smog -smoggy -smogs -smoke -smoked -smokeless -smoker -smokers -smokes -smokescreen -smokestack -smokestacks -smokier -smokiest -smokiness -smoking -smoky -smolder -smooch -smooth -smoothed -smoother -smoothest -smoothing -smoothly -smoothness -smooths -smoothtongued -smote -smother -smothered -smothering -smothers -smoulder -smouldered -smouldering -smoulders -smudge -smudged -smudges -smudgier -smudgiest -smudging -smudgy -smug -smuggle -smuggled -smuggler -smugglers -smuggles -smuggling -smugly -smugness -smut -smuts -smutty -snack -snacks -snaffle -snag -snagged -snagging -snags -snail -snails -snake -snaked -snakepit -snakes -snakeskin -snaking -snaky -snap -snapped -snapper -snappier -snappily -snapping -snappy -snaps -snapshot -snapshots -snare -snared -snares -snaring -snarl -snarled -snarling -snarls -snatch -snatched -snatcher -snatchers -snatches -snatching -sneak -sneaked -sneakers -sneakier -sneakiest -sneakily -sneaking -sneaks -sneaky -sneer -sneered -sneering -sneeringly -sneers -sneeze -sneezed -sneezes -sneezing -snick -snide -sniff -sniffed -sniffer -sniffers -sniffing -sniffle -sniffles -sniffling -sniffly -sniffs -snifter -snigger -sniggered -sniggering -sniggers -snip -snipe -sniper -snipers -snipes -sniping -snipped -snippet -snippets -snipping -snips -snits -snivel -snivelling -snob -snobbery -snobbish -snobbishly -snobbishness -snobs -snoek -snooker -snoop -snooped -snooper -snoopers -snooping -snoops -snoopy -snooze -snoozed -snoozes -snoozing -snore -snored -snorer -snorers -snores -snoring -snorkel -snorkelling -snorkels -snort -snorted -snorting -snorts -snotty -snout -snouts -snow -snowball -snowballed -snowballing -snowballs -snowbound -snowcapped -snowdrift -snowdrifts -snowdrop -snowdrops -snowed -snowfall -snowfalls -snowfields -snowflake -snowflakes -snowier -snowiest -snowing -snowline -snowman -snowmen -snowplough -snowploughs -snows -snowstorm -snowstorms -snowwhite -snowy -snub -snubbed -snubbing -snubnosed -snubs -snuff -snuffbox -snuffed -snuffing -snuffle -snuffled -snuffles -snuffling -snuffs -snug -snugger -snuggle -snuggled -snuggles -snuggling -snugly -snugness -so -soak -soaked -soaker -soakers -soaking -soakings -soaks -soandso -soap -soapbox -soaped -soapier -soapiest -soaping -soaps -soapy -soar -soared -soaring -soaringly -soars -sob -sobbed -sobbing -sobbings -sober -sobered -soberer -sobering -soberly -sobers -sobriety -sobriquet -sobs -socalled -soccer -sociability -sociable -sociably -social -socialisation -socialise -socialised -socialising -socialism -socialist -socialistic -socialists -socialite -socially -socials -societal -societies -society -sociobiology -sociocultural -socioeconomic -sociolinguistic -sociolinguistics -sociolinguists -sociological -sociologically -sociologist -sociologists -sociology -sociopolitical -sock -socked -socket -sockets -socking -socks -socrates -sod -soda -sodas -sodded -sodden -soddy -sodium -sodom -sodomise -sodomised -sodomising -sodomite -sodomites -sodomy -sods -sofa -sofas -soffit -soft -softball -softboiled -soften -softened -softener -softeners -softening -softens -softer -softest -softhearted -softie -softish -softly -softness -softspoken -software -softwood -softy -soggier -soggiest -soggy -soh -soil -soiled -soiling -soilings -soils -soiree -sojourn -sojourned -sojourner -sojourners -sojourning -sojourns -solace -solaces -solanum -solar -solaria -solarium -sold -solder -soldered -soldering -solders -soldier -soldiered -soldiering -soldierly -soldiers -soldiery -sole -solecism -solecisms -solely -solemn -solemnities -solemnity -solemnly -solenoid -solenoidal -solenoids -soler -soles -solfa -solicit -solicitation -solicitations -solicited -soliciting -solicitor -solicitors -solicitous -solicitously -solicits -solicitude -solid -solidarity -solidification -solidified -solidifies -solidify -solidifying -solidity -solidly -solidness -solids -solitaire -solitary -solitude -solitudes -solo -soloing -soloist -soloists -solstice -solstices -solubility -soluble -solute -solutes -solution -solutions -solvable -solve -solved -solvency -solvent -solvents -solver -solvers -solves -solving -soma -somali -somalia -somas -somatic -sombre -sombrely -sombreness -sombrero -some -somebody -someday -somehow -someone -somersault -somersaulted -somersaulting -somersaults -something -sometime -sometimes -someway -someways -somewhat -somewhere -somnambulist -somnolence -somnolent -son -sonar -sonars -sonata -sonatas -sones -song -songbird -songbirds -songbook -songs -songsters -songwriter -songwriters -songwriting -sonic -sonically -soninlaw -sonnet -sonnets -sonny -sonora -sonorities -sonority -sonorous -sonorously -sonorousness -sons -sonsinlaw -soon -sooner -soonest -soonish -soot -soothe -soothed -soothers -soothes -soothing -soothingly -soothsayer -soothsayers -soothsaying -sootier -soots -sooty -sop -sophist -sophisticate -sophisticated -sophisticates -sophistication -sophistry -sophists -soporific -sopping -soppy -soprano -sorbet -sorbets -sorcerer -sorcerers -sorceress -sorcery -sordid -sordidly -sordidness -sore -sorely -soreness -sores -sorghum -sorority -sorrel -sorrier -sorriest -sorrow -sorrowed -sorrowful -sorrowfully -sorrowing -sorrows -sorry -sort -sortable -sorted -sorter -sorters -sortie -sorties -sorting -sorts -sos -soso -sot -sotho -soubriquet -soudan -souffle -sought -soughtafter -souk -souks -soul -souldestroying -souled -soulful -soulfully -soulless -souls -soulsearching -sound -soundcheck -sounded -sounder -soundest -sounding -soundings -soundless -soundlessly -soundly -soundness -soundproof -soundproofed -soundproofing -sounds -soundtrack -soundtracks -soup -soups -soupy -sour -source -sourced -sourceless -sources -sourcing -soured -sourest -souring -sourly -sourness -sours -soused -south -southbound -southerly -southern -southerner -southerners -southernmost -southward -southwards -souvenir -souvenirs -sovereign -sovereigns -sovereignty -soviet -sow -sowed -sower -sowers -soweto -sowing -sown -sows -soy -soya -soybean -soybeans -spa -space -spaceage -spacecraft -spaced -spaceflight -spaceman -spacemen -spacer -spacers -spaces -spaceship -spaceships -spacesuit -spacesuits -spacey -spacial -spacing -spacings -spacious -spaciously -spaciousness -spade -spaded -spades -spadework -spaghetti -spain -spam -span -spandrels -spangle -spangled -spangles -spaniel -spaniels -spanish -spank -spanked -spanker -spanking -spankings -spanks -spanned -spanner -spanners -spanning -spans -spar -spare -spared -sparely -spares -sparetime -sparing -sparingly -spark -sparked -sparking -sparkle -sparkled -sparkler -sparklers -sparkles -sparkling -sparklingly -sparkly -sparks -sparred -sparring -sparrow -sparrowhawk -sparrows -spars -sparse -sparsely -sparseness -sparser -sparsest -sparsity -sparta -spartan -spartans -spas -spasm -spasmodic -spasmodically -spasms -spastic -spastics -spat -spate -spatial -spatially -spats -spatter -spattered -spattering -spatters -spatula -spatulas -spawn -spawned -spawning -spawns -spay -spayed -spaying -spays -speak -speakable -speaker -speakers -speaking -speaks -spear -speared -spearhead -spearheaded -spearheading -spearheads -spearing -spears -spec -special -specialisation -specialisations -specialise -specialised -specialises -specialising -specialism -specialisms -specialist -specialists -specialities -speciality -specially -specialness -specials -specialty -speciation -species -specifiable -specifiably -specific -specifically -specification -specifications -specificities -specificity -specificness -specifics -specified -specifier -specifiers -specifies -specify -specifying -specimen -specimens -specious -speck -speckle -speckled -speckles -specks -specs -spectacle -spectacles -spectacular -spectacularly -spectaculars -spectator -spectators -spectra -spectral -spectre -spectres -spectrogram -spectrograph -spectrometer -spectrometers -spectrometric -spectrometry -spectrophotometer -spectrophotometers -spectrophotometry -spectroscope -spectroscopes -spectroscopic -spectroscopically -spectroscopy -spectrum -specular -speculate -speculated -speculates -speculating -speculation -speculations -speculative -speculatively -speculator -speculators -speculum -sped -speech -speeches -speechifying -speechless -speechlessly -speed -speedboat -speedboats -speedcop -speeded -speedier -speediest -speedily -speeding -speedometer -speedometers -speeds -speedup -speedway -speedwell -speedy -spell -spellable -spellbinder -spellbinding -spellbound -spelled -speller -spellers -spelling -spellings -spells -spelt -spencer -spend -spender -spenders -spending -spends -spendthrift -spent -spermatozoa -spew -spewed -spewing -spews -sphagnum -sphere -spheres -spheric -spherical -spherically -spheroid -spheroidal -sphincter -sphincters -sphinx -sphygmomanometer -spice -spiced -spicer -spicery -spices -spicier -spicily -spicing -spicy -spider -spiders -spidery -spied -spies -spigot -spike -spiked -spikes -spikier -spikiest -spiking -spiky -spill -spillage -spillages -spilled -spiller -spilling -spills -spilt -spin -spinach -spinal -spindle -spindles -spindly -spindrier -spindriers -spindrift -spindry -spine -spinechilling -spineless -spines -spinet -spinnaker -spinner -spinners -spinney -spinning -spinoff -spinoffs -spins -spinster -spinsterhood -spinsters -spiny -spiral -spiralled -spiralling -spirally -spirals -spirant -spirants -spire -spires -spirit -spirited -spiritedl -spiritedly -spiritless -spirits -spiritual -spiritualised -spiritualism -spiritualist -spiritualists -spirituality -spiritually -spirituals -spit -spite -spiteful -spitefully -spitfire -spitfires -spits -spitting -spittle -spittoon -spittoons -splash -splashdown -splashed -splashes -splashing -splashy -splat -splatter -splattered -splattering -splayed -splaying -spleen -spleens -splendid -splendidly -splendour -splendours -splenetic -splice -spliced -splicer -splicers -splices -splicing -spline -splines -splint -splinted -splinter -splintered -splintering -splinters -splints -split -splits -splittable -splitter -splitters -splitting -splittings -splodge -splodges -splotches -splurge -splutter -spluttered -spluttering -splutters -spoil -spoilage -spoiled -spoiler -spoilers -spoiling -spoils -spoilsport -spoilt -spoke -spoken -spokes -spokeshave -spokeshaves -spokesman -spokesmen -spokespeople -spokesperson -spokespersons -spokeswoman -spokeswomen -sponge -sponged -sponger -sponges -spongier -spongiest -sponginess -sponging -spongy -sponsor -sponsored -sponsoring -sponsors -sponsorship -sponsorships -spontaneity -spontaneous -spontaneously -spoof -spoofs -spook -spooked -spooking -spooks -spooky -spool -spooled -spooling -spools -spoon -spooned -spoonful -spoonfuls -spooning -spoons -spoor -sporadic -sporadically -spore -spores -sporran -sporrans -sport -sported -sporting -sportingly -sportive -sports -sportsman -sportsmanship -sportsmen -sportswear -sporty -spot -spotless -spotlessly -spotlessness -spotlight -spotlighting -spotlights -spotlit -spoton -spots -spotted -spotter -spotters -spottier -spottiest -spotting -spotty -spouse -spouses -spout -spouted -spouting -spouts -sprain -sprained -spraining -sprains -sprang -sprat -sprats -sprawl -sprawled -sprawling -sprawls -spray -sprayed -sprayer -sprayers -spraying -sprays -spread -spreadeagled -spreaders -spreading -spreads -spreadsheet -spreadsheets -spree -spreeing -sprig -sprightlier -sprightliest -sprightliness -sprightly -sprigs -spring -springboard -springboards -springbok -springboks -springclean -springcleaned -springer -springier -springiest -springing -springs -springtime -springy -sprinkle -sprinkled -sprinkler -sprinklers -sprinkles -sprinkling -sprint -sprinted -sprinter -sprinters -sprinting -sprints -sprite -sprites -sprocket -sprockets -sprout -sprouted -sprouting -sprouts -spruce -spruced -sprucing -sprung -spry -spud -spume -spun -spunky -spur -spurge -spurges -spurious -spuriously -spurn -spurned -spurning -spurns -spurred -spurring -spurs -spurt -spurted -spurting -spurts -sputnik -sputniks -sputter -sputtered -sputtering -sputum -spy -spyglass -spyhole -spying -spyings -squabble -squabbled -squabbles -squabbling -squad -squadron -squadrons -squads -squalid -squall -squalling -squalls -squally -squalor -squander -squandered -squandering -squanders -square -squared -squarely -squareness -squarer -squares -squaring -squarish -squash -squashed -squashes -squashier -squashiest -squashing -squashy -squat -squats -squatted -squatter -squatters -squatting -squaw -squawk -squawked -squawking -squawks -squeak -squeaked -squeaker -squeakier -squeakiest -squeaking -squeaks -squeaky -squeal -squealed -squealer -squealing -squeals -squeamish -squeamishly -squeamishness -squeegee -squeeze -squeezed -squeezer -squeezes -squeezing -squeezy -squelch -squelched -squelching -squelchy -squib -squibs -squid -squids -squiggle -squiggles -squint -squinted -squinting -squints -squire -squirearchy -squires -squirm -squirmed -squirming -squirms -squirrel -squirrelled -squirrels -squirt -squirted -squirting -squirts -srilanka -stab -stabbed -stabber -stabbing -stabbings -stabilisation -stabilise -stabilised -stabiliser -stabilisers -stabilises -stabilising -stability -stable -stabled -stablemate -stabler -stables -stabling -stably -stabs -staccato -stack -stacked -stacker -stacking -stacks -stadia -stadium -stadiums -staff -staffed -staffing -staffroom -staffs -stag -stage -stagecoach -stagecoaches -staged -stagehands -stager -stages -stagey -stagflation -stagger -staggered -staggering -staggeringly -staggers -staging -stagings -stagnancy -stagnant -stagnate -stagnated -stagnates -stagnating -stagnation -stags -staid -staidness -stain -stained -stainer -staining -stainless -stains -stair -staircase -staircases -stairhead -stairs -stairway -stairways -stairwell -stairwells -stake -staked -stakeholder -stakeholders -stakes -staking -stalactite -stalactites -stalagmite -stalagmites -stale -stalemate -stalemated -stalemates -staleness -stalin -stalk -stalked -stalker -stalkers -stalking -stalks -stall -stalled -stallholders -stalling -stallion -stallions -stalls -stalwart -stalwarts -stamen -stamens -stamina -stammer -stammered -stammering -stammers -stamp -stamped -stampede -stampeded -stampeding -stamper -stampers -stamping -stampings -stamps -stance -stances -stanchion -stanchions -stand -standard -standardisation -standardisations -standardise -standardised -standardises -standardising -standards -standby -standing -standings -standpoint -standpoints -stands -standstill -stank -stanza -stanzas -stapes -staphylococcus -staple -stapled -stapler -staplers -staples -stapling -star -starboard -starch -starched -starches -starchier -starchiest -starchy -stardom -stardust -stare -stared -starer -stares -starfish -stargaze -stargazer -stargazers -stargazing -staring -stark -starker -starkest -starkly -starkness -starless -starlet -starlets -starlight -starlike -starling -starlings -starlit -starred -starrier -starriest -starring -starry -starryeyed -stars -starship -starspangled -starstruck -starstudded -start -started -starter -starters -starting -startle -startled -startles -startling -startlingly -starts -startup -startups -starvation -starve -starved -starves -starving -stashed -stashes -stashing -stasis -state -statecraft -stated -statehood -stateless -stateliest -stateliness -stately -statement -statements -stateoftheart -staterooms -states -statesman -statesmanlike -statesmanship -statesmen -static -statical -statically -statics -stating -station -stationary -stationed -stationer -stationers -stationery -stationing -stationmaster -stations -statistic -statistical -statistically -statistician -statisticians -statistics -stator -stators -statuary -statue -statues -statuesque -statuette -statuettes -stature -statures -status -statuses -statute -statutes -statutorily -statutory -staunch -staunchest -staunching -staunchly -staunchness -stave -staved -staves -staving -stay -stayed -stayers -staying -stays -stead -steadfast -steadfastly -steadfastness -steadied -steadier -steadiest -steadily -steadiness -steady -steadygoing -steadying -steak -steaks -steal -stealer -stealers -stealing -steals -stealth -stealthier -stealthiest -stealthily -stealthy -steam -steamboat -steamboats -steamed -steamer -steamers -steamier -steamiest -steaming -steamroller -steamrollers -steams -steamship -steamships -steamy -steed -steeds -steel -steelclad -steeled -steeling -steels -steelwork -steelworker -steelworkers -steelworks -steely -steep -steeped -steepen -steepened -steepening -steepens -steeper -steepest -steeping -steeple -steeplechase -steeplechaser -steeplechasers -steeplechasing -steepled -steeplejack -steeples -steeply -steepness -steeps -steer -steerable -steerage -steered -steering -steers -stegosaurus -stellar -stellated -stem -stemmed -stemming -stems -stench -stenches -stencil -stencilled -stencils -stenographer -stenographers -stenographic -stenography -stenosis -stentor -stentorian -step -stepbrother -stepchildren -stepdaughter -stepfather -stepladder -stepmother -stepparents -steppe -stepped -steppes -stepping -steps -stepsister -stepson -stepsons -stepwise -steradians -stereo -stereographic -stereophonic -stereos -stereoscopic -stereoscopically -stereoscopy -stereotype -stereotyped -stereotypes -stereotypical -stereotypically -stereotyping -sterile -sterilisation -sterilisations -sterilise -sterilised -steriliser -sterilising -sterility -sterling -stern -sterner -sternest -sternly -sternness -sterns -sternum -steroid -steroids -stet -stethoscope -stevedore -stew -steward -stewardess -stewardesses -stewards -stewardship -stewed -stewing -stews -stick -sticker -stickers -stickiest -stickily -stickiness -sticking -stickleback -sticklebacks -stickler -sticks -sticky -sties -stiff -stiffen -stiffened -stiffener -stiffening -stiffens -stiffer -stiffest -stiffly -stiffnecked -stiffness -stifle -stifled -stifles -stifling -stiflingly -stigma -stigmas -stigmata -stigmatisation -stigmatise -stigmatised -stigmatising -stiletto -still -stillbirths -stillborn -stilled -stiller -stilling -stillness -stills -stilt -stilted -stilts -stimulant -stimulants -stimulate -stimulated -stimulates -stimulating -stimulation -stimulator -stimulatory -stimuli -stimulus -sting -stinged -stinger -stingers -stingier -stingily -stinging -stingray -stings -stingy -stink -stinker -stinkers -stinking -stinks -stinky -stint -stinted -stints -stipel -stipend -stipendiary -stipends -stippled -stipples -stipulate -stipulated -stipulates -stipulating -stipulation -stipulations -stir -stirfried -stirfry -stirred -stirrer -stirrers -stirring -stirrings -stirrup -stirrups -stirs -stitch -stitched -stitcher -stitches -stitching -stoa -stoat -stoats -stochastic -stock -stockade -stockbroker -stockbrokers -stockbroking -stockcar -stocked -stockholders -stockholding -stockier -stockily -stocking -stockinged -stockings -stockist -stockists -stockpile -stockpiled -stockpiles -stockpiling -stockroom -stocks -stocktaking -stocky -stodge -stodgier -stodgiest -stodgy -stoep -stoic -stoical -stoically -stoicism -stoics -stoke -stoked -stoker -stokers -stokes -stoking -stole -stolen -stolid -stolidity -stolidly -stoma -stomach -stomachache -stomachs -stomata -stomp -stomped -stomping -stomps -stone -stonecold -stoned -stoneless -stonemason -stonemasons -stones -stonewalled -stoneware -stonework -stonier -stoniest -stonily -stoning -stony -stood -stooge -stooges -stool -stoolpigeon -stools -stoop -stooped -stooping -stoops -stop -stopcock -stopgap -stopover -stoppable -stoppage -stoppages -stopped -stopper -stoppered -stoppers -stopping -stops -stopwatch -storage -storages -store -stored -storehouse -storehouses -storekeeper -storekeepers -storeman -storeroom -storerooms -stores -storey -storeys -stories -storing -stork -storks -storm -stormed -stormer -stormers -stormier -stormiest -storming -storms -stormtroopers -stormy -story -storybook -storyline -storylines -storyteller -storytellers -storytelling -stout -stouter -stoutest -stoutly -stoutness -stove -stovepipe -stoves -stow -stowage -stowaway -stowed -stowing -stows -straddle -straddled -straddles -straddling -strafe -strafed -strafing -straggle -straggled -straggler -stragglers -straggling -straggly -straight -straightaway -straighten -straightened -straightening -straightens -straighter -straightest -straightforward -straightforwardly -straightforwardness -straightness -strain -strained -strainer -strainers -straining -strains -strait -straiten -straitened -straitjacket -straitjackets -straits -strand -stranded -stranding -strands -strange -strangely -strangeness -stranger -strangers -strangest -strangle -strangled -stranglehold -strangler -stranglers -strangles -strangling -strangulated -strangulation -strap -strapless -strapped -strapper -strapping -straps -strata -stratagem -stratagems -strategic -strategically -strategies -strategist -strategists -strategy -stratification -stratified -stratifies -stratifying -stratigraphic -stratigraphical -stratigraphy -stratosphere -stratospheric -stratospherically -stratum -stratus -straw -strawberries -strawberry -strawman -straws -stray -strayed -strayer -straying -strays -streak -streaked -streaker -streakers -streakier -streakiest -streaking -streaks -streaky -stream -streamed -streamer -streamers -streaming -streamline -streamlined -streamlines -streamlining -streams -street -streets -streetwalkers -streetwise -strength -strengthen -strengthened -strengthening -strengthens -strengths -strenuous -strenuously -streptococcal -streptococci -streptomycin -stress -stressed -stresses -stressful -stressfulness -stressing -stretch -stretchability -stretchable -stretched -stretcher -stretchered -stretchers -stretches -stretchiness -stretching -stretchy -strew -strewed -strewing -strewn -striated -striation -striations -stricken -strict -stricter -strictest -strictly -strictness -stricture -strictures -stride -stridency -strident -stridently -strider -strides -striding -strife -strifes -strike -striker -strikers -strikes -striking -strikingly -string -stringed -stringencies -stringency -stringent -stringently -stringer -stringing -strings -stringy -strip -stripe -striped -striper -stripes -stripier -stripiest -striping -stripling -stripped -stripper -strippers -stripping -strips -stripy -strive -strived -striven -striver -strives -striving -strivings -strode -stroke -stroked -strokes -stroking -stroll -strolled -stroller -strollers -strolling -strolls -strong -stronger -strongest -stronghold -strongholds -strongish -strongly -strongman -strongmen -strongminded -strongroom -strontium -strop -stropped -stropping -strops -strove -struck -structural -structuralism -structuralist -structuralists -structurally -structure -structured -structureless -structures -structuring -strudel -strudels -struggle -struggled -struggles -struggling -strum -strummed -strumming -strumpet -strung -strut -struts -strutted -strutter -strutting -strychnine -stub -stubbed -stubbing -stubble -stubbled -stubbles -stubbly -stubborn -stubbornly -stubbornness -stubby -stubs -stucco -stuccoed -stuck -stuckup -stud -studded -student -students -studentship -studentships -studied -studier -studiers -studies -studio -studios -studious -studiously -studiousness -studs -study -studying -stuff -stuffed -stuffer -stuffier -stuffiest -stuffiness -stuffing -stuffs -stuffy -stultified -stultify -stultifying -stumble -stumbled -stumbles -stumbling -stumblingly -stump -stumped -stumping -stumps -stumpy -stun -stung -stunned -stunner -stunning -stunningly -stuns -stunt -stunted -stunting -stuntman -stunts -stupefaction -stupefied -stupefy -stupefying -stupefyingly -stupendous -stupendously -stupid -stupider -stupidest -stupidities -stupidity -stupidly -stupor -stupors -sturdier -sturdiest -sturdily -sturdy -sturgeon -sturgeons -stutter -stuttered -stuttering -stutters -sty -style -styled -styles -styli -styling -stylisation -stylised -stylish -stylishly -stylishness -stylist -stylistic -stylistically -stylistics -stylists -stylus -styluses -stymie -stymied -styrene -styx -suasion -suave -suavely -sub -subaltern -subalterns -subarctic -subatomic -subbed -subbing -subclass -subclasses -subcommittee -subcommittees -subconscious -subconsciously -subconsciousness -subcontinent -subcontract -subcontracted -subcontracting -subcontractor -subcontractors -subcultural -subculture -subcultures -subcutaneous -subcutaneously -subdivide -subdivided -subdivides -subdividing -subdivision -subdivisions -subducted -subduction -subdue -subdued -subdues -subduing -subeditor -subeditors -subfamily -subgroup -subgroups -subharmonic -subharmonics -subhuman -subject -subjected -subjecting -subjection -subjective -subjectively -subjectivism -subjectivist -subjectivity -subjects -subjugate -subjugated -subjugating -subjugation -subjunctive -sublayer -sublimate -sublimated -sublimation -sublime -sublimed -sublimely -sublimes -sublimest -subliminal -subliminally -sublimity -sublunary -submarine -submarines -submerge -submerged -submergence -submerges -submerging -submersible -submersion -submission -submissions -submissive -submissively -submissiveness -submit -submits -submittable -submitted -submitter -submitters -submitting -subnormal -suboptimal -subordinate -subordinated -subordinates -subordinating -subordination -subplot -subplots -subpoena -subpoenaed -subprogram -subprograms -subregional -subroutine -subroutines -subs -subscribe -subscribed -subscriber -subscribers -subscribes -subscribing -subscript -subscription -subscriptions -subscripts -subsection -subsections -subsequent -subsequently -subservience -subservient -subset -subsets -subside -subsided -subsidence -subsides -subsidiaries -subsidiarity -subsidiary -subsidies -subsiding -subsidise -subsidised -subsidises -subsidising -subsidy -subsist -subsisted -subsistence -subsisting -subsists -subsoil -subsonic -subspace -subspaces -subspecies -substance -substances -substandard -substantial -substantially -substantiate -substantiated -substantiates -substantiating -substantiation -substantive -substantively -substantives -substation -substitutable -substitute -substituted -substitutes -substituting -substitution -substitutions -substrata -substrate -substrates -substratum -substructure -substructures -subsume -subsumed -subsumes -subsuming -subsurface -subsystem -subsystems -subtenants -subtend -subtended -subtending -subtends -subterfuge -subterranean -subtext -subtitle -subtitled -subtitles -subtitling -subtle -subtler -subtlest -subtleties -subtlety -subtly -subtotal -subtotals -subtract -subtracted -subtracting -subtraction -subtractions -subtractive -subtractively -subtracts -subtropical -subtropics -subtype -subtypes -subunit -subunits -suburb -suburban -suburbanisation -suburbanites -suburbia -suburbs -subvention -subventions -subversion -subversive -subversively -subversives -subvert -subverted -subverting -subverts -subway -subways -subzero -succeed -succeeded -succeeding -succeeds -success -successes -successful -successfully -succession -successions -successive -successively -successor -successors -succinct -succinctly -succinctness -succour -succulence -succulent -succumb -succumbed -succumbing -succumbs -such -suchandsuch -suchlike -suck -suckable -sucked -sucker -suckers -sucking -suckle -suckled -suckles -suckling -sucklings -sucks -sucrose -suction -sud -sudan -sudden -suddenly -suddenness -suds -sue -sued -suede -sues -suet -suffer -sufferance -suffered -sufferer -sufferers -suffering -sufferings -suffers -suffice -sufficed -suffices -sufficiency -sufficient -sufficiently -sufficing -suffix -suffixed -suffixes -suffocate -suffocated -suffocates -suffocating -suffocatingly -suffocation -suffrage -suffragette -suffragettes -suffragist -suffuse -suffused -suffuses -suffusing -suffusion -sugar -sugarcoated -sugared -sugaring -sugarplums -sugars -sugary -suggest -suggested -suggester -suggesters -suggestibility -suggestible -suggesting -suggestion -suggestions -suggestive -suggestively -suggestiveness -suggests -sugillate -suicidal -suicidally -suicide -suicides -suing -suit -suitabilities -suitability -suitable -suitableness -suitably -suitcase -suitcases -suite -suited -suites -suiting -suitor -suitors -suits -sulk -sulked -sulkier -sulkiest -sulkily -sulkiness -sulking -sulks -sulky -sullen -sullenly -sullenness -sullied -sully -sullying -sulphate -sulphates -sulphide -sulphides -sulphonamides -sulphur -sulphuric -sulphurous -sultan -sultana -sultanas -sultans -sultry -sum -sumatra -summa -summability -summable -summaries -summarily -summarise -summarised -summariser -summarisers -summarises -summarising -summary -summation -summations -summed -summer -summers -summertime -summery -summing -summit -summits -summon -summoned -summoner -summoning -summonings -summons -summonsed -summonses -summonsing -sumo -sump -sumps -sumptuous -sumptuously -sumptuousness -sums -sun -sunbath -sunbathe -sunbathed -sunbathers -sunbathing -sunbeam -sunbeams -sunbed -sunbeds -sunblock -sunburn -sunburned -sunburns -sunburnt -sunburst -suncream -sundaes -sunday -sundays -sundial -sundials -sundown -sundried -sundries -sundry -sunflower -sunflowers -sung -sunglasses -sunk -sunken -sunking -sunless -sunlight -sunlit -sunlounger -sunned -sunnier -sunniest -sunning -sunny -sunrise -sunrises -sunroof -suns -sunscreen -sunscreens -sunset -sunsets -sunshade -sunshine -sunspot -sunspots -sunstroke -suntan -suntanned -sup -super -superabundance -superabundant -superannuate -superannuated -superannuating -superannuation -superb -superbly -supercharged -supercharger -supercilious -superciliously -superciliousness -supercomputer -supercomputers -supercomputing -superconducting -superconductivity -superconductor -superconductors -supercooled -supercooling -supercritical -superdense -superfamily -superficial -superficiality -superficially -superfix -superfluities -superfluity -superfluous -superfluously -superglue -superheat -superheated -superhero -superhuman -superimpose -superimposed -superimposes -superimposing -superimposition -superintend -superintendence -superintendent -superintendents -superior -superiority -superiors -superlative -superlatively -superlatives -superman -supermarket -supermarkets -supermen -supermodel -supermodels -supernatant -supernatural -supernaturally -supernova -supernovae -supernumerary -superordinate -superpose -superposed -superposition -superpositions -superpower -superpowers -supersaturated -supersaturation -superscript -superscripts -supersede -superseded -supersedes -superseding -supersonic -supersonically -superstar -superstars -superstate -superstates -superstition -superstitions -superstitious -superstitiously -superstore -superstores -superstructure -superstructures -supertanker -supertankers -supervene -supervise -supervised -supervises -supervising -supervision -supervisions -supervisor -supervisors -supervisory -supine -supped -supper -suppers -supping -supplant -supplanted -supplanting -supple -supplement -supplemental -supplementary -supplementation -supplemented -supplementing -supplements -suppleness -suppliant -suppliants -supplicant -supplicants -supplicate -supplicating -supplication -supplications -supplied -supplier -suppliers -supplies -supply -supplying -support -supportability -supportable -supported -supporter -supporters -supporting -supportive -supports -suppose -supposed -supposedly -supposes -supposing -supposition -suppositions -suppositories -suppress -suppressed -suppresses -suppressible -suppressing -suppression -suppressive -suppressor -suppressors -suppurating -supranational -supranationalism -supremacist -supremacy -supremal -supreme -supremely -supremo -sups -surcharge -surcharged -surcharges -surd -sure -surefooted -surely -sureness -surer -surest -sureties -surety -surf -surface -surfaced -surfacer -surfaces -surfacing -surfactant -surfactants -surfboard -surfed -surfeit -surfer -surfers -surfing -surfings -surfs -surge -surged -surgeon -surgeons -surgeries -surgery -surges -surgical -surgically -surging -surliest -surlily -surliness -surly -surmise -surmised -surmises -surmising -surmount -surmountable -surmounted -surmounting -surname -surnames -surpass -surpassed -surpasses -surpassing -surplice -surplus -surpluses -surprise -surprised -surprises -surprising -surprisingly -surreal -surrealism -surrealist -surrealistic -surrealists -surreality -surrender -surrendered -surrendering -surrenders -surreptitious -surreptitiously -surrey -surreys -surrogacy -surrogate -surrogates -surround -surrounded -surrounding -surroundings -surrounds -surtax -surtitles -surveillance -survey -surveyed -surveying -surveyor -surveyors -surveys -survivability -survivable -survival -survivals -survive -survived -survives -surviving -survivor -survivors -susceptibilities -susceptibility -susceptible -sushi -sushis -suspect -suspected -suspecting -suspects -suspend -suspended -suspender -suspenders -suspending -suspends -suspense -suspension -suspensions -suspicion -suspicions -suspicious -suspiciously -sustain -sustainability -sustainable -sustainably -sustained -sustaining -sustains -sustenance -suture -sutures -suzerainty -swab -swabbed -swabbing -swabs -swad -swaddled -swaddling -swads -swag -swagger -swaggered -swaggering -swags -swahili -swains -swallow -swallowed -swallower -swallowing -swallows -swallowtail -swam -swamp -swamped -swampier -swampiest -swamping -swampland -swamplands -swamps -swampy -swan -swans -swansong -swap -swappable -swapped -swapper -swappers -swapping -swaps -sward -swarm -swarmed -swarming -swarms -swarthier -swarthiest -swarthy -swashbuckling -swastika -swastikas -swat -swathe -swathed -swathes -swats -swatted -swatting -sway -swayed -swaying -sways -swazi -swazis -swear -swearer -swearers -swearing -swears -swearword -swearwords -sweat -sweatband -sweated -sweater -sweaters -sweatier -sweatiest -sweatily -sweating -sweats -sweatshirt -sweatshirts -sweatshop -sweatshops -sweaty -swede -sweden -swedish -sweep -sweepable -sweeper -sweepers -sweeping -sweepingly -sweepings -sweeps -sweepstake -sweet -sweetbread -sweetcorn -sweeten -sweetened -sweetener -sweeteners -sweetening -sweetens -sweeter -sweetest -sweetheart -sweethearts -sweetie -sweetish -sweetly -sweetmeat -sweetmeats -sweetness -sweetpea -sweets -sweetshop -swell -swelled -swelling -swellings -swells -sweltering -sweltry -swept -swerve -swerved -swerves -swerving -swift -swifter -swiftest -swiftlet -swiftly -swiftness -swifts -swill -swilled -swilling -swim -swimmer -swimmers -swimming -swimmingly -swims -swimsuit -swimsuits -swimwear -swindle -swindled -swindler -swindlers -swindles -swindling -swine -swines -swing -swingeing -swinger -swingers -swinging -swings -swingy -swipe -swiped -swipes -swirl -swirled -swirling -swirls -swish -swished -swishing -swishy -swiss -switch -switchable -switchback -switchboard -switchboards -switched -switcher -switches -switchgear -switching -swivel -swivelled -swivelling -swivels -swollen -swoon -swooned -swooning -swoons -swoop -swooped -swooping -swoops -swop -swopped -swopping -swops -sword -swordfish -swords -swordsman -swordsmen -swore -sworn -swot -swots -swotted -swotting -swum -swung -sycamore -sycamores -sycophancy -sycophant -sycophantic -sycophantically -sycophants -sydney -syllabary -syllabi -syllabic -syllable -syllables -syllabub -syllabus -syllabuses -syllogism -syllogisms -syllogistic -sylph -sylphs -symbiont -symbiosis -symbiotic -symbiotically -symbol -symbolic -symbolical -symbolically -symbolisation -symbolise -symbolised -symbolises -symbolising -symbolism -symbolist -symbolists -symbols -symmetric -symmetrical -symmetrically -symmetries -symmetrisation -symmetrising -symmetry -sympathetic -sympathetically -sympathies -sympathise -sympathised -sympathiser -sympathisers -sympathises -sympathising -sympathy -symphonic -symphonies -symphonists -symphony -symposia -symposium -symptom -symptomatic -symptomatically -symptomless -symptoms -synagogue -synagogues -synapse -synapses -synaptic -sync -synchronic -synchronicity -synchronisation -synchronise -synchronised -synchronises -synchronising -synchronous -synchronously -synchrony -synchrotron -syncopated -syncopation -syncretic -syndicalism -syndicalist -syndicate -syndicated -syndicates -syndication -syndrome -syndromes -synergism -synergistic -synergy -synod -synodic -synods -synonym -synonymic -synonymous -synonymously -synonyms -synonymy -synopses -synopsis -synoptic -synovial -syntactic -syntactical -syntactically -syntagmatic -syntax -syntheses -synthesis -synthesise -synthesised -synthesiser -synthesisers -synthesises -synthesising -synthetic -synthetically -synthetics -syphilis -syphilitic -syphon -syphoned -syphoning -syphons -syria -syrian -syringe -syringes -syrup -syrups -syrupy -system -systematic -systematically -systematisation -systematise -systemic -systemically -systems -systoles -systolic -taal -tab -tabasco -tabbed -tabbing -tabby -tabernacle -tabernacles -table -tableau -tableaux -tablebay -tablecloth -tablecloths -tabled -tableland -tables -tablespoon -tablespoonfuls -tablespoons -tablet -tablets -tableware -tabling -tabloid -tabloids -taboo -taboos -tabs -tabular -tabulate -tabulated -tabulates -tabulating -tabulation -tabulations -tabulator -tachograph -tachographs -tachycardia -tachyon -tachyons -tacit -tacitly -taciturn -tack -tacked -tackier -tackiest -tackiness -tacking -tackle -tackled -tackler -tackles -tackling -tacks -tacky -tact -tactful -tactfully -tactic -tactical -tactically -tactician -tactics -tactile -tactless -tactlessly -tactlessness -tactual -tadpole -tadpoles -taffeta -tag -tagged -tagging -tags -tahiti -tahr -tail -tailed -tailing -tailless -taillessness -tailor -tailorable -tailored -tailoring -tailormade -tailors -tailpiece -tailplane -tails -tailspin -tailwind -taint -tainted -tainting -taints -taipei -taiwan -take -takeable -takeaway -takeaways -taken -takeover -takeovers -taker -takers -takes -taking -takings -talc -talcum -tale -talent -talented -talentless -talents -tales -talisman -talismans -talk -talkative -talkativeness -talkback -talked -talker -talkers -talkie -talkies -talking -talkings -talks -tall -tallboy -taller -tallest -tallied -tallies -tallish -tallness -tallow -tally -tallyho -tallying -talmud -talon -talons -tambourine -tambourines -tame -tamed -tamely -tameness -tamer -tamers -tames -tamest -taming -tamp -tamped -tamper -tampered -tampering -tampers -tan -tandem -tandems -tang -tangelo -tangent -tangential -tangentially -tangents -tangerine -tangerines -tangible -tangibly -tangle -tangled -tangles -tangling -tango -tangy -tank -tankage -tankard -tankards -tanked -tanker -tankers -tankful -tanking -tanks -tanned -tanner -tanneries -tanners -tannery -tannic -tannin -tanning -tannins -tannoy -tans -tantalise -tantalised -tantalising -tantalisingly -tantalum -tantamount -tantrum -tantrums -tanzania -tap -tapas -tapdance -tapdancing -tape -taped -taper -taperecorded -taperecording -tapered -taperer -tapering -tapers -tapes -tapestries -tapestry -tapeworm -tapeworms -taping -tapioca -tapir -tapped -tappers -tapping -tappings -taproom -taps -tar -taramasalata -tarantula -tarantulas -tardily -tardiness -tardy -tares -target -targeted -targeting -targets -tariff -tariffs -tarmac -tarmacadam -tarn -tarnish -tarnished -tarnishing -tarns -tarot -tarpaulin -tarpaulins -tarragon -tarred -tarried -tarrier -tarriest -tarring -tarry -tarrying -tars -tarsal -tarsus -tart -tartan -tartans -tartar -tartaric -tartly -tartness -tartrate -tarts -tarty -tarzan -task -tasked -tasking -taskmaster -tasks -tasmania -tassel -tasselled -tassels -taste -tasted -tasteful -tastefully -tastefulness -tasteless -tastelessly -tastelessness -taster -tasters -tastes -tastier -tastiest -tasting -tastings -tasty -tat -tattered -tatters -tattle -tattoo -tattooed -tattooing -tattoos -tatty -tau -taught -taunt -taunted -taunter -taunting -tauntingly -taunts -taut -tauter -tautest -tautly -tautness -tautological -tautologically -tautologies -tautologous -tautology -tavern -taverna -tavernas -taverns -tawdry -tawny -tax -taxable -taxation -taxdeductible -taxed -taxes -taxfree -taxi -taxicab -taxidermist -taxidermists -taxidermy -taxied -taxies -taxiing -taxing -taxis -taxman -taxonomic -taxonomical -taxonomies -taxonomist -taxonomists -taxonomy -taxpayer -taxpayers -taxpaying -taylor -tea -teabag -teabags -teach -teachable -teacher -teachers -teaches -teaching -teachings -teacloth -teacup -teacups -teak -teal -team -teamed -teaming -teammate -teammates -teams -teamster -teamwork -teaparty -teapot -teapots -tear -tearaway -teardrop -teardrops -tearful -tearfully -tearfulness -teargas -tearing -tearless -tearoom -tearooms -tears -tearstained -teas -tease -teased -teaser -teasers -teases -teashop -teashops -teasing -teasingly -teaspoon -teaspoonful -teaspoonfuls -teaspoons -teat -teatime -teatimes -teats -tech -technical -technicalities -technicality -technically -technician -technicians -technique -techniques -technocracies -technocracy -technocrat -technocratic -technocrats -technological -technologically -technologies -technologist -technologists -technology -technophiles -technophobia -technophobic -tectonic -tectonically -tectonics -ted -teddies -teddy -tedious -tediously -tediousness -tedium -tediums -teds -tee -teed -teehee -teeing -teem -teemed -teeming -teems -teen -teenage -teenaged -teenager -teenagers -teeniest -teens -teensy -teeny -teenyweeny -teepee -teepees -tees -teeter -teetered -teetering -teeth -teethe -teethed -teethes -teething -teethmarks -teetotal -teetotalism -teetotaller -teetotallers -teheran -telaviv -telecommunication -telecommunications -telecommuting -telecoms -teleconference -telegram -telegrams -telegraph -telegraphed -telegraphic -telegraphing -telegraphs -telegraphy -telekinesis -telemetry -teleological -teleology -telepathic -telepathically -telepathy -telephone -telephoned -telephones -telephonic -telephoning -telephonist -telephonists -telephony -telephoto -teleprinter -teleprinters -telesales -telescope -telescoped -telescopes -telescopic -telescoping -teletext -telethon -teletype -teletypes -televise -televised -televising -television -televisions -televisual -teleworking -telex -telexes -tell -teller -tellers -telling -tellingly -tells -telltale -telly -temerity -temper -tempera -temperament -temperamental -temperamentally -temperaments -temperance -temperate -temperately -temperature -temperatures -tempered -tempering -tempers -tempest -tempests -tempestuous -tempi -template -templates -temple -temples -tempo -temporal -temporality -temporally -temporaries -temporarily -temporary -tempt -temptation -temptations -tempted -tempter -tempters -tempting -temptingly -temptress -tempts -ten -tenability -tenable -tenacious -tenaciously -tenacity -tenancies -tenancy -tenant -tenanted -tenantry -tenants -tench -tend -tended -tendencies -tendency -tendentious -tendentiously -tender -tendered -tenderer -tenderest -tendering -tenderly -tenderness -tenders -tending -tendon -tendons -tendril -tendrils -tends -tenement -tenements -tenet -tenets -tenfold -tenners -tennis -tenon -tenor -tenors -tens -tense -tensed -tensely -tenseness -tenser -tenses -tensest -tensile -tensing -tension -tensional -tensioned -tensions -tensity -tensor -tensors -tent -tentacle -tentacled -tentacles -tentative -tentatively -tented -tenterhooks -tenth -tenths -tents -tenuous -tenuously -tenure -tenured -tenures -tenurial -tepee -tepid -tequila -tercentenary -term -termed -terminal -terminally -terminals -terminate -terminated -terminates -terminating -termination -terminations -terminator -terminators -terming -termini -terminological -terminologies -terminology -terminus -termite -termites -termly -terms -tern -ternary -terns -terrace -terraced -terraces -terracing -terracotta -terraform -terraformed -terrain -terrains -terrapin -terrapins -terrazzo -terrestrial -terrible -terribly -terrier -terriers -terrific -terrifically -terrified -terrifies -terrify -terrifying -terrifyingly -terrine -territorial -territoriality -territorially -territories -territory -terror -terrorise -terrorised -terrorising -terrorism -terrorist -terrorists -terrors -terrorstricken -terry -terse -tersely -terseness -terser -tertiaries -tertiary -tessellated -tessellation -tessellations -tesseral -test -testability -testable -testament -testamentary -testaments -testdrive -testdriving -tested -tester -testers -testes -testicle -testicles -testicular -testier -testiest -testified -testifies -testify -testifying -testily -testimonial -testimonials -testimonies -testimony -testiness -testing -testings -testis -testosterone -tests -testtube -testy -tetanus -tetchily -tetchy -tether -tethered -tethering -tethers -tetra -tetrachloride -tetrahedra -tetrahedral -tetrahedron -tetrahedrons -tetrameters -tetroxide -texan -texans -texas -text -textbook -textbooks -textile -textiles -texts -textual -textuality -textually -textural -texturally -texture -textured -textures -thai -thalamus -thalidomide -thallium -thames -than -thane -thank -thanked -thankful -thankfully -thankfulness -thanking -thankless -thanklessly -thanks -thanksgiving -that -thatch -thatched -thatcher -thatchers -thatching -thaumaturge -thaw -thawed -thawing -thaws -the -theatre -theatres -theatrical -theatricality -theatrically -theatricals -thebes -thee -theft -thefts -their -theirs -theism -theist -theistic -theists -them -themas -thematic -thematically -theme -themed -themes -themselves -then -thence -thenceforth -thenceforward -theocracies -theocracy -theodolite -theodolites -theologian -theologians -theological -theologically -theologies -theologists -theology -theorem -theorems -theoretic -theoretical -theoretically -theoretician -theoreticians -theories -theorisation -theorise -theorised -theorises -theorising -theorist -theorists -theory -theosophy -therapeutic -therapeutically -therapies -therapist -therapists -therapy -there -thereabouts -thereafter -thereby -therefor -therefore -therefrom -therein -thereof -thereon -thereto -thereunder -thereupon -therewith -thermal -thermally -thermals -thermochemical -thermodynamic -thermodynamical -thermodynamically -thermodynamics -thermoelectric -thermometer -thermometers -thermoplastic -thermostat -thermostatic -thermostatically -thermostats -therms -thesauri -thesaurus -these -thesis -thespian -thespians -theta -they -thick -thicken -thickened -thickening -thickens -thicker -thickest -thicket -thickets -thickish -thickly -thickness -thicknesses -thickset -thickskinned -thief -thieve -thieved -thievery -thieves -thieving -thievish -thievishness -thigh -thighs -thimble -thimbleful -thimblefuls -thimbles -thin -thine -thing -things -think -thinkable -thinker -thinkers -thinking -thinks -thinktank -thinly -thinned -thinner -thinners -thinness -thinnest -thinning -thinnish -thins -third -thirdly -thirds -thirst -thirsted -thirstier -thirstiest -thirstily -thirsting -thirsts -thirsty -thirteen -thirteenth -thirties -thirtieth -thirty -this -thistle -thistles -thither -thomas -thong -thongs -thor -thoracic -thorax -thorium -thorn -thornier -thorniest -thorns -thorny -thorough -thoroughbred -thoroughbreds -thoroughfare -thoroughfares -thoroughgoing -thoroughly -thoroughness -those -thou -though -thought -thoughtful -thoughtfully -thoughtfulness -thoughtless -thoughtlessly -thoughtlessness -thoughtprovoking -thoughts -thousand -thousandfold -thousands -thousandth -thousandths -thrall -thrash -thrashed -thrasher -thrashes -thrashing -thrashings -thread -threadbare -threaded -threading -threads -threat -threaten -threatened -threatening -threateningly -threatens -threats -three -threedimensional -threefold -threequarters -threes -threesome -threesomes -thresh -threshed -thresher -threshers -threshing -threshold -thresholds -threw -thrice -thrift -thriftier -thriftiest -thriftless -thrifts -thrifty -thrill -thrilled -thriller -thrillers -thrilling -thrillingly -thrills -thrive -thrived -thrives -thriving -throat -throatier -throatiest -throatily -throats -throaty -throb -throbbed -throbbing -throbs -thromboses -thrombosis -thrombus -throne -throned -thrones -throng -thronged -thronging -throngs -throroughly -throttle -throttled -throttles -throttling -through -throughout -throughput -throw -throwaway -throwback -thrower -throwers -throwing -thrown -throws -thrum -thrush -thrushes -thrust -thruster -thrusters -thrusting -thrusts -thud -thudded -thudding -thuds -thug -thuggery -thuggish -thugs -thumb -thumbed -thumbing -thumbnail -thumbprint -thumbs -thumbscrew -thumbscrews -thump -thumped -thumping -thumps -thunder -thunderbolt -thunderbolts -thunderclap -thunderclaps -thundercloud -thundered -thunderflashes -thundering -thunderous -thunderously -thunders -thunderstorm -thunderstorms -thunderstruck -thundery -thursday -thus -thwack -thwart -thwarted -thwarting -thwarts -thy -thyme -thymus -thyristor -thyristors -thyroid -thyroids -thyself -tiara -tiaras -tibia -tibiae -tic -tick -ticked -ticker -tickers -ticket -ticketed -tickets -ticking -tickle -tickled -tickler -tickles -tickling -ticklish -ticks -tics -tidal -tidbit -tidbits -tiddlers -tiddlywinks -tide -tideless -tides -tideway -tidied -tidier -tidies -tidiest -tidily -tidiness -tiding -tidings -tidy -tidying -tie -tiebreak -tied -tier -tiered -tiers -ties -tiger -tigerish -tigers -tight -tighten -tightened -tightening -tightens -tighter -tightest -tightfisted -tightlipped -tightly -tightness -tightrope -tights -tightwad -tigress -tigris -tikka -tilde -tildes -tile -tiled -tiler -tiles -tiling -tilings -till -tillage -tilled -tiller -tillers -tilling -tills -tilt -tilted -tilting -tilts -timber -timbered -timbre -time -timebase -timeconsuming -timed -timeframe -timehonoured -timekeeper -timekeepers -timekeeping -timelapse -timeless -timelessness -timeliness -timely -timeout -timepiece -timer -timers -times -timescale -timescales -timeshare -timetable -timetabled -timetables -timetabling -timid -timidity -timidly -timing -timings -tin -tincan -tincture -tinctured -tinder -tinderbox -tinfoil -tinge -tinged -tinges -tingle -tingled -tingles -tinglier -tingliest -tingling -tingly -tinier -tiniest -tinker -tinkered -tinkering -tinkers -tinkle -tinkled -tinkling -tinkly -tinned -tinner -tinnier -tinniest -tinnily -tinnitus -tinny -tinopener -tinpot -tins -tinsel -tinsels -tint -tinted -tinting -tintings -tints -tinware -tiny -tip -tipoff -tipoffs -tipped -tipper -tipping -tipple -tippling -tips -tipster -tipsters -tipsy -tiptoe -tiptoed -tiptoeing -tiptoes -tiptop -tirade -tirades -tire -tired -tiredly -tiredness -tireless -tirelessly -tires -tiresome -tiresomely -tiring -tiro -tissue -tissues -tit -titan -titanic -titanically -titanium -titans -titbit -titbits -titfortat -tithe -tithes -tithing -titillate -titillated -titillating -titillation -title -titled -titles -titling -titrated -titration -titre -titres -tits -titter -tittered -tittering -titters -titular -to -toad -toadies -toads -toadstool -toadstools -toady -toast -toasted -toaster -toasters -toasting -toasts -toasty -tobacco -tobacconist -tobacconists -tobago -toboggan -tobogganing -toby -toccata -tocsin -today -toddle -toddled -toddler -toddlers -toddling -toddy -todies -toe -toed -toehold -toeing -toeless -toenail -toenails -toes -toffee -toffees -toffy -tofu -tog -toga -togas -together -togetherness -toggle -toggled -toggles -toggling -togo -togs -toil -toiled -toiler -toilet -toileting -toiletries -toiletry -toilets -toilette -toiling -toils -toitoi -tokamak -token -tokenism -tokenistic -tokens -tokyo -tolbooth -told -toledo -tolerable -tolerably -tolerance -tolerances -tolerant -tolerantly -tolerate -tolerated -tolerates -tolerating -toleration -toll -tolled -tollgate -tolling -tolls -toluene -tomahawk -tomahawks -tomato -tomb -tombola -tomboy -tomboys -tombs -tombstone -tombstones -tomcat -tome -tomes -tomfoolery -tomography -tomorrow -tomorrows -tomtom -ton -tonal -tonalities -tonality -tonally -tone -toned -tonedeaf -toneless -tonelessly -toner -toners -tones -tonga -tongs -tongue -tongueincheek -tongues -tonguetied -tonguetwister -tonguetwisters -tonic -tonics -tonight -toning -tonnage -tonnages -tonne -tonnes -tons -tonsil -tonsillectomy -tonsillitis -tonsils -tonsure -tony -too -took -tool -toolbox -toolboxes -tooled -tooling -toolmaker -toolmaking -tools -toot -tooted -tooth -toothache -toothbrush -toothbrushes -toothed -toothier -toothiest -toothless -toothmarks -toothpaste -toothpick -toothpicks -toothsome -toothy -tooting -tootle -top -topaz -topazes -topcoat -topheavy -topiary -topic -topical -topicality -topically -topics -topless -toplevel -topmost -topnotch -topographic -topographical -topographically -topography -topological -topologically -topologies -topologist -topologists -topology -topped -topper -topping -toppings -topple -toppled -topples -toppling -tops -topsoil -topspin -topsyturvy -torah -torch -torchbearer -torchbearers -torched -torches -torchlight -torchlit -tore -tori -tories -torment -tormented -tormenting -tormentor -tormentors -torments -torn -tornado -toronto -torpedo -torpedoed -torpid -torpor -torque -torques -torrent -torrential -torrents -torrid -torsion -torsional -torsions -torso -tortoise -tortoises -tortoiseshell -torts -tortuous -tortuously -torture -tortured -torturer -torturers -tortures -torturing -torturous -torus -tory -toss -tossed -tossers -tosses -tossing -tossup -tossups -tot -total -totalising -totalitarian -totalitarianism -totality -totalled -totalling -totally -totals -totem -totemic -totems -tots -totted -totter -tottered -tottering -totters -totting -toucans -touch -touchandgo -touchdown -touchdowns -touche -touched -toucher -touches -touchier -touchiest -touchiness -touching -touchingly -touchy -tough -toughen -toughened -toughens -tougher -toughest -toughie -toughies -toughly -toughness -toughs -toupee -tour -toured -tourer -tourers -touring -tourism -tourist -touristic -tourists -touristy -tournament -tournaments -tourney -tourniquet -tours -tousled -tousles -tout -touted -touting -touts -tow -toward -towards -towed -towel -towelled -towelling -towels -tower -towered -towering -towers -towing -town -towns -townscape -townscapes -townsfolk -township -townships -townsman -townsmen -townspeople -towpath -towpaths -tows -toxaemia -toxic -toxicity -toxicological -toxicology -toxin -toxins -toy -toyed -toying -toymaker -toys -toyshop -trace -traceability -traceable -traced -traceless -tracer -tracers -tracery -traces -trachea -tracheal -tracheostomy -tracheotomy -tracing -tracings -track -trackbed -tracked -tracker -trackers -tracking -trackless -tracks -tracksuit -tracksuits -trackway -trackways -tract -tractability -tractable -traction -tractor -tractors -tracts -trad -trade -tradeable -traded -tradein -tradeins -trademark -trademarked -trademarks -trader -traders -trades -tradesman -tradesmen -tradespeople -trading -tradings -tradition -traditional -traditionalism -traditionalist -traditionalists -traditionally -traditions -traduced -traducer -traffic -trafficked -trafficker -traffickers -trafficking -tragedian -tragedians -tragedies -tragedy -tragic -tragical -tragically -trail -trailed -trailer -trailers -trailing -trails -train -trained -trainee -trainees -trainer -trainers -training -trainings -trainload -trains -trait -traitor -traitorous -traitorously -traitors -traits -trajectories -trajectory -tram -tramcar -tramcars -tramlines -trammel -tramp -tramped -tramping -trample -trampled -tramples -trampling -trampoline -trampolines -trampolining -trampolinist -tramps -trams -tramway -tramways -trance -trances -tranche -tranches -tranny -tranquil -tranquillise -tranquillised -tranquilliser -tranquillisers -tranquillity -tranquilly -transact -transacted -transacting -transaction -transactional -transactions -transactor -transatlantic -transceiver -transceivers -transcend -transcended -transcendence -transcendent -transcendental -transcendentally -transcendentals -transcending -transcends -transcontinental -transcribe -transcribed -transcriber -transcribers -transcribes -transcribing -transcript -transcription -transcriptional -transcriptions -transcripts -transducer -transducers -transduction -transection -transept -transepts -transfer -transferability -transferable -transferee -transferees -transference -transferral -transferred -transferring -transfers -transfiguration -transfigured -transfinite -transfinitely -transfixed -transform -transformation -transformational -transformations -transformative -transformed -transformer -transformers -transforming -transforms -transfused -transfusing -transfusion -transfusions -transgress -transgressed -transgresses -transgressing -transgression -transgressions -transgressive -transgressor -transgressors -transhipment -transience -transient -transiently -transients -transistor -transistorised -transistors -transit -transition -transitional -transitions -transitive -transitively -transitivity -transitoriness -transitory -transits -translatable -translate -translated -translates -translating -translation -translational -translations -translator -translators -transliterate -transliterated -transliterates -transliterating -transliteration -transliterations -translucence -translucency -translucent -transmigration -transmissible -transmission -transmissions -transmissive -transmit -transmits -transmittable -transmittance -transmitted -transmitter -transmitters -transmitting -transmogrification -transmogrifies -transmogrify -transmutation -transmute -transmuted -transmuting -transnational -transom -transonic -transparencies -transparency -transparent -transparently -transpiration -transpire -transpired -transpires -transplant -transplantation -transplanted -transplanting -transplants -transponder -transponders -transport -transportability -transportable -transportation -transported -transporter -transporters -transporting -transports -transpose -transposed -transposes -transposing -transposition -transpositions -transverse -transversely -transvestism -transvestite -transvestites -trap -trapdoor -trapdoors -trapeze -trappable -trapped -trapper -trappers -trapping -trappings -traps -trash -trashed -trashy -trauma -traumas -traumata -traumatic -traumatise -traumatised -travail -travails -travel -travelled -traveller -travellers -travelling -travelogue -travelogues -travels -traversal -traversals -traverse -traversed -traverses -traversing -travesties -travesty -trawl -trawled -trawler -trawlers -trawling -trawlnet -trawls -tray -trays -treacherous -treacherously -treachery -treacle -tread -treader -treading -treadle -treadmill -treadmills -treads -treason -treasonable -treasonous -treasons -treasure -treasured -treasurer -treasurers -treasurership -treasures -treasuries -treasuring -treasury -treat -treatable -treated -treaties -treating -treatise -treatises -treatment -treatments -treats -treaty -treble -trebled -trebles -trebling -tree -treeless -trees -treetop -treetops -trefoil -trefoils -trek -trekked -trekker -trekkers -trekking -treks -trellis -trellised -trellises -tremble -trembled -trembler -trembles -trembling -tremblingly -tremblings -tremendous -tremendously -tremolo -tremor -tremors -tremulous -tremulously -tremulousness -trench -trenchant -trenchantly -trenched -trencher -trenches -trenching -trend -trendier -trendiest -trendiness -trends -trendy -trepanned -trepidation -trepidations -trespass -trespassed -trespasser -trespassers -trespasses -trespassing -tress -tresses -trestle -trestles -trews -triad -triadic -triads -triage -trial -trials -triangle -triangles -triangular -triangulate -triangulated -triangulating -triangulation -triangulations -triathlon -triatomic -tribal -tribalism -tribally -tribe -tribes -tribesman -tribesmen -tribespeople -tribulation -tribulations -tribunal -tribunals -tribune -tribunes -tributaries -tributary -tribute -tributes -trice -trick -tricked -trickery -trickier -trickiest -trickily -tricking -trickle -trickled -trickles -trickling -tricks -trickster -tricksters -tricky -tricolour -tricolours -tricycle -tricycles -trident -tridents -tried -triennial -trier -tries -triffid -triffids -trifle -trifled -trifler -trifles -trifling -trigger -triggered -triggerhappy -triggering -triggers -triglyceride -trigonometric -trigonometrical -trigonometry -trigram -trigrams -trigs -trikes -trilateral -trilby -trilingual -trill -trilled -trilling -trillion -trillions -trills -trilobite -trilobites -trilogies -trilogy -trim -trimaran -trimmed -trimmer -trimmers -trimming -trimmings -trimodal -trims -trinidad -trinity -trinket -trinkets -trio -trip -tripartite -tripe -triplane -triple -tripled -triples -triplet -triplets -triplex -triplicate -triplication -tripling -triply -tripod -tripods -tripoli -tripped -trippers -tripping -trips -triptych -tripwire -tripwires -trireme -trisecting -trisection -trisector -tristan -trite -triteness -tritium -triumph -triumphal -triumphalism -triumphalist -triumphant -triumphantly -triumphed -triumphing -triumphs -triumvirate -trivia -trivial -trivialisation -trivialisations -trivialise -trivialised -trivialises -trivialising -trivialities -triviality -trivially -trod -trodden -troglodyte -troglodytes -troika -troikas -troll -trolley -trolleys -trolling -trollish -trolls -trombone -trombones -trombonist -trombonists -troop -trooped -trooper -troopers -trooping -troops -troopship -trope -tropes -trophies -trophy -tropic -tropical -tropically -tropics -tropopause -troposphere -tropospheric -trot -trots -trotted -trotter -trotters -trotting -troubadour -troubadours -trouble -troubled -troublemaker -troublemakers -troubles -troubleshooter -troubleshooters -troubleshooting -troublesome -troublesomeness -troubling -trough -troughs -trounce -trounced -trounces -trouncing -troupe -trouper -troupers -troupes -trouser -trousers -trout -trouts -trove -trowel -trowels -troy -truancy -truant -truanting -truants -truce -truces -truck -trucks -truculence -truculent -truculently -trudge -trudged -trudges -trudging -true -trueblue -truer -truest -truffle -truffles -truism -truisms -truly -trump -trumped -trumpery -trumpet -trumpeted -trumpeter -trumpeters -trumpeting -trumpets -trumps -truncate -truncated -truncates -truncating -truncation -truncations -truncheon -truncheons -trundle -trundled -trundles -trundling -trunk -trunking -trunks -trunnion -trunnions -truss -trussed -trusses -trussing -trust -trusted -trustee -trustees -trusteeship -trustful -trustfully -trustfulness -trusties -trusting -trustingly -trusts -trustworthiness -trustworthy -trusty -truth -truthful -truthfully -truthfulness -truths -try -trying -tsetse -tshirt -tsunami -tswana -tswanas -tuareg -tuaregs -tuatara -tub -tuba -tubas -tubby -tube -tubed -tubeless -tuber -tubercular -tuberculosis -tubers -tubes -tubing -tubs -tubular -tubules -tuck -tucked -tucker -tuckers -tucking -tucks -tues -tuesday -tuesdays -tuft -tufted -tufting -tufts -tug -tugela -tugged -tugging -tugs -tuition -tulip -tulips -tumble -tumbled -tumbledown -tumbler -tumblers -tumbles -tumbling -tumbrils -tumescent -tummies -tummy -tumour -tumours -tumult -tumults -tumultuous -tumultuously -tumulus -tun -tuna -tunable -tunas -tundra -tundras -tune -tuned -tuneful -tunefully -tuneless -tunelessly -tuner -tuners -tunes -tungsten -tunic -tunics -tuning -tunings -tunisia -tunisian -tunnel -tunnelled -tunnellers -tunnelling -tunnels -tunny -tuns -tuppence -tuppences -turban -turbans -turbid -turbidity -turbine -turbines -turbo -turbocharged -turbocharger -turboprop -turbot -turbulence -turbulent -tureen -tureens -turf -turfed -turfs -turfy -turgid -turgidity -turgidly -turin -turk -turkey -turkeys -turkish -turks -turmeric -turmoil -turmoils -turn -turnabout -turnaround -turncoat -turncoats -turned -turner -turners -turning -turnings -turnip -turnips -turnkey -turnout -turnouts -turnover -turnovers -turnpike -turnround -turns -turnstile -turnstiles -turntable -turntables -turpentine -turpitude -turquoise -turret -turreted -turrets -turtle -turtleneck -turtles -tuscany -tusk -tusked -tusker -tusks -tussle -tussles -tussling -tussock -tussocks -tussocky -tutelage -tutelary -tutor -tutored -tutorial -tutorials -tutoring -tutors -tutu -tuxedo -twain -twang -twanged -twanging -twangs -tweak -tweaked -tweaking -tweaks -twee -tweed -tweeds -tweedy -tweeness -tweet -tweeter -tweeters -tweets -tweezers -twelfth -twelfths -twelve -twelves -twenties -twentieth -twenty -twice -twiddle -twiddled -twiddler -twiddles -twiddling -twiddly -twig -twigged -twiggy -twigs -twilight -twilit -twill -twin -twine -twined -twines -twinge -twinges -twining -twinkle -twinkled -twinkles -twinkling -twinned -twinning -twins -twirl -twirled -twirling -twirls -twist -twisted -twister -twisters -twisting -twists -twisty -twit -twitch -twitched -twitches -twitching -twitchy -twitter -twittered -twittering -two -twodimensional -twofaced -twofold -twosome -tycoon -tycoons -tying -tyke -tykes -type -typecast -typecasting -typed -typeface -typefaces -typeless -types -typescript -typescripts -typeset -typesets -typesetter -typesetters -typesetting -typewriter -typewriters -typewriting -typewritten -typhoid -typhoon -typhoons -typhus -typical -typicality -typically -typified -typifies -typify -typifying -typing -typings -typist -typists -typographer -typographers -typographic -typographical -typographically -typography -typological -typologically -typologies -typology -tyrannic -tyrannical -tyrannically -tyrannicide -tyrannies -tyrannise -tyrannised -tyrannous -tyranny -tyrant -tyrants -tyre -tyres -uboats -udder -udders -ufo -uganda -ugandan -uglier -ugliest -uglification -ugliness -ugly -uhuh -uke -ukraine -ukulele -ukuleles -ulcer -ulcerate -ulcerated -ulceration -ulcerations -ulcerous -ulcers -ulster -ulsters -ulterior -ultimacy -ultimate -ultimately -ultimatum -ultimatums -ultimo -ultra -ultramarine -ultramontane -ultrasonic -ultrasonics -ultrasound -ultraviolet -umbilical -umbilicus -umbra -umbrae -umbrage -umbrageous -umbras -umbrella -umbrellas -umlaut -umlauts -umpire -umpired -umpires -umpiring -umpteen -umpteenth -unabashed -unabashedly -unabated -unable -unabridged -unabsorbed -unacceptability -unacceptable -unacceptably -unaccepted -unaccommodating -unaccompanied -unaccountability -unaccountable -unaccountably -unaccounted -unaccustomed -unachievable -unacknowledged -unacquainted -unactivated -unadapted -unadaptive -unaddressable -unaddressed -unadjusted -unadorned -unadulterated -unadventurous -unadvertised -unaesthetic -unaffected -unaffectedly -unaffiliated -unaffordable -unafraid -unaided -unaligned -unalike -unallocated -unalloyed -unalterable -unalterably -unaltered -unambiguity -unambiguous -unambiguously -unambitious -unamended -unamused -unanimity -unanimous -unanimously -unannotated -unannounced -unanswerable -unanswered -unanticipated -unapologetic -unappealing -unappeased -unappetising -unappreciated -unappreciative -unapproachable -unapproved -unapt -unarchived -unarguable -unarguably -unarm -unarmed -unarms -unaroused -unarticulated -unary -unashamed -unashamedly -unasked -unassailable -unassailed -unassertive -unassigned -unassisted -unassociated -unassuaged -unassuming -unattached -unattainable -unattainably -unattained -unattended -unattenuated -unattractive -unattractiveness -unattributable -unattributed -unaudited -unauthenticated -unauthorised -unavailability -unavailable -unavailing -unavailingly -unavenged -unavoidable -unavoidably -unawakened -unaware -unawareness -unawares -unawed -unbalance -unbalanced -unbalances -unbalancing -unbanned -unbanning -unbaptised -unbar -unbarred -unbars -unbearable -unbearably -unbeatable -unbeaten -unbecoming -unbeknown -unbeknownst -unbelievability -unbelievable -unbelievably -unbelieved -unbeliever -unbelievers -unbelieving -unbend -unbending -unbent -unbiased -unbiasedly -unbiassed -unbiassedly -unbidden -unbind -unbleached -unblemished -unblinking -unblinkingly -unblock -unblocked -unblocking -unbloodied -unboiled -unbolt -unbolted -unbooked -unborn -unbosom -unbothered -unbound -unbounded -unbowed -unbraced -unbracketed -unbranded -unbreakability -unbreakable -unbridgeable -unbridged -unbridled -unbroken -unbruised -unbuckle -unbuckled -unbuckling -unbundled -unburden -unburdened -unburdening -unburied -unburned -unburnt -unbutton -unbuttoned -unbuttoning -uncalibrated -uncalled -uncancelled -uncannily -uncanny -uncapped -uncared -uncaring -uncased -uncatalogued -uncaught -unceasing -unceasingly -uncelebrated -uncensored -unceremoniously -uncertain -uncertainly -uncertainties -uncertainty -unchain -unchained -unchaining -unchallengeable -unchallenged -unchangeable -unchanged -unchanging -unchaperoned -uncharacteristic -uncharacteristically -uncharged -uncharismatic -uncharitable -uncharitably -uncharted -unchartered -uncheckable -unchecked -unchristened -unchristian -unchronicled -uncircumcised -uncivil -uncivilised -unclad -unclaimed -unclasped -unclasping -unclassifiable -unclassified -uncle -unclean -uncleanliness -uncleanly -unclear -uncleared -unclench -unclenched -unclenching -uncles -unclesam -unclimbable -unclimbed -unclog -unclosed -unclothed -unclouded -uncluttered -uncoil -uncoiled -uncoiling -uncoils -uncollated -uncollected -uncollimated -uncombed -uncomely -uncomfortable -uncomfortableness -uncomfortably -uncommitted -uncommon -uncommonly -uncommunicative -uncompetitive -uncompetitiveness -uncompilable -uncomplaining -uncomplainingly -uncompleted -uncomplicated -uncomplimentary -uncomprehending -uncomprehendingly -uncompressed -uncompromisable -uncompromising -uncompromisingly -unconcern -unconcerned -unconcernedly -unconditional -unconditionally -unconditioned -unconfined -unconfirmed -unconfused -uncongenial -unconnected -unconquerable -unconquered -unconscionable -unconscionably -unconscious -unconsciously -unconsciousness -unconsecrated -unconsidered -unconsoled -unconstitutional -unconstitutionally -unconstrained -unconsumed -uncontainable -uncontaminated -uncontentious -uncontested -uncontrollable -uncontrollably -uncontrolled -uncontroversial -uncontroversially -unconventional -unconventionally -unconverted -unconvinced -unconvincing -unconvincingly -uncooked -uncooperative -uncoordinated -uncorked -uncorrectable -uncorrected -uncorrelated -uncorroborated -uncorrupted -uncountable -uncountably -uncounted -uncouple -uncoupled -uncouth -uncouthness -uncover -uncovered -uncovering -uncovers -uncrackable -uncreased -uncreated -uncreative -uncredited -uncritical -uncritically -uncross -uncrossable -uncrossed -uncrowded -uncrowned -uncrushable -unction -unctuous -unctuously -uncultivated -uncultured -uncured -uncurled -uncut -undamaged -undated -undaunted -undead -undeceived -undecidability -undecidable -undecided -undeclared -undecorated -undefeated -undefended -undefiled -undefinable -undefined -undeliverable -undelivered -undemanding -undemocratic -undemocratically -undemonstrative -undeniable -undeniably -under -underachievement -underachieving -underarm -underbelly -underbody -undercarriage -underclass -underclothes -underclothing -undercoat -undercoating -undercooked -undercover -undercroft -undercurrent -undercurrents -undercut -undercuts -undercutting -underdeveloped -underdevelopment -underdog -underdogs -underdone -undereducated -underemphasis -underemployment -underestimate -underestimated -underestimates -underestimating -underestimation -underexploited -underfed -underfloor -underflow -underfoot -underframe -underfund -underfunded -underfunding -undergarment -undergarments -undergo -undergoes -undergoing -undergone -undergraduate -undergraduates -underground -undergrounds -undergrowth -underhand -underinvestment -underlain -underlay -underlie -underlies -underline -underlined -underlines -underling -underlings -underlining -underlinings -underloaded -underlying -undermanned -undermine -undermined -undermines -undermining -underneath -undernourished -undernourishment -underpaid -underpants -underparts -underpass -underpay -underpaying -underperformance -underperformed -underpin -underpinned -underpinning -underpinnings -underpins -underplay -underplayed -underplays -underpopulated -underpopulation -underpowered -underpriced -underpricing -underprivileged -underrate -underrated -underscored -undersea -underside -undersides -undersigned -undersized -underskirt -understaffed -understand -understandability -understandable -understandably -understander -understanding -understandingly -understandings -understands -understate -understated -understatement -understates -understating -understocked -understood -understorey -understudy -undertake -undertaken -undertaker -undertakers -undertakes -undertaking -undertakings -undertone -undertones -undertook -underutilised -undervalued -undervalues -undervaluing -underwater -underwear -underweight -underwent -underwood -underworld -underwrite -underwriter -underwriters -underwrites -underwriting -underwritten -underwrote -undeserved -undeservedly -undeserving -undesirability -undesirable -undesirables -undesirably -undesired -undetectability -undetectable -undetectably -undetected -undetermined -undeterred -undetonated -undeveloped -undiagnosable -undiagnosed -undid -undifferentiated -undigested -undignified -undiluted -undiminished -undiplomatic -undirected -undiscerning -undisciplined -undisclosed -undiscovered -undiscriminated -undiscriminating -undisguised -undisguisedly -undismayed -undisplayed -undisputed -undissipated -undistinguished -undistorted -undistributed -undisturbed -undivided -undo -undocumented -undoing -undoings -undomesticated -undone -undoubted -undoubtedly -undress -undressed -undressing -undrinkability -undrinkable -undroppable -undue -undulate -undulated -undulates -undulating -undulation -undulations -unduly -undying -unearned -unearth -unearthed -unearthing -unearthly -unearths -unease -uneasier -uneasiest -uneasily -uneasiness -uneasy -uneatable -uneaten -uneconomic -uneconomical -unedifying -unedited -uneducated -unelectable -unelected -unemotional -unemotionally -unemployable -unemployed -unemployment -unencrypted -unencumbered -unending -unendingly -unendurable -unenforceable -unengaged -unenlightened -unenlightening -unentered -unenthusiastic -unenthusiastically -unenviable -unequal -unequalled -unequally -unequivocal -unequivocally -unergonomic -unerring -unerringly -unescorted -unestablished -unethical -unethically -unevaluated -uneven -unevenly -unevenness -uneventful -uneventfully -unexacting -unexamined -unexceptionable -unexceptional -unexcited -unexciting -unexpanded -unexpected -unexpectedly -unexpectedness -unexpired -unexplainable -unexplained -unexploded -unexploited -unexplored -unexpressed -unexpurgated -unfailing -unfailingly -unfair -unfairly -unfairness -unfaithful -unfaithfulness -unfalsifiable -unfamiliar -unfamiliarity -unfancied -unfashionable -unfashionably -unfasten -unfastened -unfastening -unfathomable -unfathomed -unfatigued -unfavourable -unfavourably -unfavoured -unfeasible -unfeasibly -unfed -unfeeling -unfeelingly -unfeigned -unfelt -unfeminine -unfenced -unfertilised -unfetchable -unfettered -unfilled -unfinished -unfired -unfirm -unfit -unfitness -unfits -unfitting -unfix -unfixed -unflagging -unflattering -unflawed -unfledged -unflinching -unflinchingly -unfocused -unfocussed -unfold -unfolded -unfolding -unfolds -unforced -unfordable -unforeseeable -unforeseen -unforgettable -unforgivable -unforgivably -unforgiven -unforgiving -unformed -unforthcoming -unfortunate -unfortunately -unfortunates -unfounded -unfreeze -unfreezing -unfrequented -unfriendlier -unfriendliest -unfriendliness -unfriendly -unfrozen -unfruitful -unfulfillable -unfulfilled -unfunded -unfunny -unfurl -unfurled -unfurling -unfurls -unfurnished -unfussy -ungainly -ungenerous -ungenerously -ungentlemanly -ungerminated -unglamorous -unglazed -ungodly -ungovernable -ungoverned -ungraceful -ungracious -ungraciously -ungrammatical -ungrateful -ungratefully -ungrounded -unguarded -unguessable -unguided -ungulates -unhampered -unhand -unhandy -unhappier -unhappiest -unhappily -unhappiness -unhappy -unharmed -unhealthier -unhealthiest -unhealthily -unhealthy -unheard -unheated -unheeded -unhelpful -unhelpfully -unheralded -unheroic -unhesitating -unhesitatingly -unhidden -unhindered -unhinge -unhinged -unholy -unhonoured -unhook -unhooked -unhooks -unhoped -unhuman -unhurried -unhurriedly -unhurt -unhygienic -unhyphenated -unicameral -unicellular -unicorn -unicorns -unicycle -unicycles -unicyclist -unicyclists -unideal -unidentifiable -unidentified -unidirectional -unifiable -unification -unified -unifier -unifies -uniform -uniformed -uniformity -uniformly -uniforms -unify -unifying -unilateral -unilateralism -unilateralist -unilaterally -unillustrated -unimaginable -unimaginably -unimaginative -unimaginatively -unimagined -unimpaired -unimpeachable -unimpeded -unimplementable -unimplemented -unimportance -unimportant -unimpressed -unimpressive -unimproved -unincorporated -uninfected -uninfluenced -uninformative -uninformatively -uninformed -uninhabitable -uninhabited -uninhibited -uninhibitedly -uninitialised -uninitiated -uninjured -uninspired -uninspiring -uninsulated -uninsurable -uninsured -unintellectual -unintelligent -unintelligible -unintended -unintentional -unintentionally -uninterested -uninterestedly -uninteresting -uninterpretable -uninterpreted -uninterrupted -uninterruptedly -unintuitive -uninvented -uninvited -uninviting -uninvolved -union -unionisation -unionised -unionism -unionist -unionists -unions -unipolar -unique -uniquely -uniqueness -unisex -unison -unisons -unissued -unit -unitary -unite -united -unites -unities -uniting -units -unity -universal -universalism -universalist -universality -universally -universals -universe -universes -universities -university -unjam -unjammed -unjamming -unjaundiced -unjust -unjustifiable -unjustifiably -unjustified -unjustly -unjustness -unkempt -unkept -unkind -unkindest -unkindly -unkindness -unknightly -unknowable -unknowing -unknowingly -unknown -unknowns -unlabelled -unlace -unlaced -unlacing -unladen -unladylike -unlamented -unlatching -unlawful -unlawfully -unlawfulness -unleaded -unlearn -unlearned -unleash -unleashed -unleashes -unleashing -unleavened -unless -unlicensed -unlike -unlikeable -unlikeliest -unlikelihood -unlikeliness -unlikely -unlimited -unlined -unlink -unlinked -unlisted -unlit -unload -unloaded -unloading -unloads -unlock -unlocked -unlocking -unlocks -unloose -unlovable -unloved -unlovely -unloving -unluckier -unluckiest -unluckily -unlucky -unmade -unmagnified -unmaintainable -unmaintained -unmaking -unmanageable -unmanageably -unmanly -unmanned -unmannerly -unmapped -unmarked -unmarried -unmask -unmasked -unmasks -unmatchable -unmatched -unmeasurable -unmechanised -unmeetable -unmelodious -unmemorable -unmemorised -unmentionable -unmentionables -unmentioned -unmercifully -unmerited -unmet -unmissable -unmistakable -unmistakably -unmistakeable -unmistakeably -unmitigated -unmixed -unmnemonic -unmodifiable -unmodified -unmolested -unmonitored -unmotivated -unmounted -unmoved -unmoving -unmusical -unmusically -unmutilated -unmuzzled -unnamed -unnatural -unnaturally -unnavigable -unnecessarily -unnecessary -unneeded -unnerve -unnerved -unnerving -unnervingly -unnoted -unnoticeable -unnoticed -unnumbered -unobjectionable -unobliging -unobservable -unobservant -unobserved -unobstructed -unobtainable -unobtrusive -unobtrusively -unoccupied -unofficial -unofficially -unopened -unopposed -unoptimised -unordered -unorganised -unoriginal -unoriginality -unorthodox -unorthodoxy -unowned -unpack -unpacked -unpackers -unpacking -unpacks -unpaid -unpainted -unpaired -unpalatable -unparalleled -unpardonable -unparodied -unpasted -unpasteurised -unpatriotic -unpaved -unpeeled -unperceived -unpersonalised -unpersuaded -unpersuasive -unperturbed -unphysical -unpick -unpicked -unpicking -unplaced -unplanned -unplayability -unplayable -unpleasant -unpleasantly -unpleasantness -unpleasing -unploughed -unplug -unplugged -unplugging -unpoetical -unpolished -unpolluted -unpopular -unpopularity -unpopulated -unportable -unpractical -unpractised -unprecedented -unprecedentedly -unpredictability -unpredictable -unpredictably -unpredicted -unprejudiced -unpremeditated -unprepared -unpreparedness -unprepossessing -unpressurised -unpretending -unpretentious -unprincipled -unprintable -unprinted -unprivileged -unproblematic -unprocessed -unproductive -unprofessional -unprofitable -unprofitably -unpromising -unprompted -unpronounceable -unpronounced -unprotected -unprovable -unproved -unproven -unprovoked -unpublicised -unpublishable -unpublished -unpunctual -unpunctuality -unpunished -unqualified -unquantifiable -unquantified -unquenchable -unquestionable -unquestionably -unquestioned -unquestioning -unquestioningly -unquiet -unquote -unquoted -unraisable -unravel -unravelled -unravelling -unravels -unreachable -unreached -unread -unreadability -unreadable -unready -unreal -unrealisable -unrealised -unrealistic -unrealistically -unreality -unreasonable -unreasonableness -unreasonably -unreasoned -unreasoning -unreceived -unreceptive -unrecognisable -unrecognisably -unrecognised -unrecommended -unreconciled -unreconstructed -unrecorded -unrecoverable -unredeemed -unreduced -unrefereed -unreferenced -unreferencing -unrefined -unreflected -unreformed -unrefreshed -unrefrigerated -unregarded -unregenerate -unregistered -unregulated -unrehearsed -unrelated -unreleasable -unreleased -unrelenting -unrelentingly -unreliability -unreliable -unreliably -unrelieved -unremarkable -unremarked -unremembered -unremitting -unremittingly -unrepairable -unrepeatability -unrepeatable -unrepeated -unrepentant -unrepentantly -unreported -unrepresentable -unrepresentative -unrepresented -unreproducible -unrequested -unrequited -unreserved -unreservedly -unresisting -unresistingly -unresolvable -unresolved -unresponsive -unresponsiveness -unrest -unrestrained -unrestricted -unrests -unrevealed -unrevealing -unrevised -unrewarded -unrewarding -unriddle -unripe -unrivalled -unroll -unrolled -unrolling -unromantic -unruffled -unruliness -unruly -unsaddled -unsafe -unsafely -unsafeness -unsaid -unsaleable -unsalted -unsanitary -unsatisfactorily -unsatisfactoriness -unsatisfactory -unsatisfiable -unsatisfied -unsatisfying -unsaturated -unsaved -unsavory -unsavoury -unscaled -unscathed -unscheduled -unscientific -unscramble -unscrambled -unscrambles -unscrambling -unscratched -unscrew -unscrewed -unscrewing -unscripted -unscrupulous -unseal -unsealable -unsealed -unsealing -unseasonable -unseasonably -unseasonal -unseat -unseated -unseaworthiness -unsecured -unseeded -unseeing -unseeingly -unseemly -unseen -unselected -unselfconscious -unselfconsciously -unselfish -unselfishly -unselfishness -unsellable -unsensational -unsent -unsentimental -unserviceable -unserviced -unset -unsettle -unsettled -unsettling -unshackled -unshaded -unshakable -unshakeable -unshaken -unshaped -unshapen -unsharable -unshared -unshaved -unshaven -unsheathed -unshielded -unshockable -unshod -unshorn -unshrinking -unsighted -unsightly -unsigned -unsimplified -unsinkable -unskilful -unskilled -unsliced -unsmiling -unsmilingly -unsmooth -unsociable -unsocial -unsoiled -unsold -unsolder -unsolicited -unsolvable -unsolved -unsophisticated -unsophistication -unsorted -unsought -unsound -unsoundness -unspanned -unspeakable -unspeakably -unspecialised -unspecific -unspecified -unspectacular -unspent -unspoiled -unspoilt -unspoken -unsporting -unstable -unstack -unstacked -unstacking -unstained -unstamped -unstated -unsteadily -unsteadiness -unsteady -unsterilised -unsticking -unstimulated -unstinting -unstintingly -unstirred -unstoppable -unstoppably -unstopped -unstrapped -unstressed -unstretchable -unstructured -unstuck -unsubdued -unsubsidised -unsubstantial -unsubstantiated -unsubstituted -unsubtle -unsubtly -unsuccessful -unsuccessfully -unsuitability -unsuitable -unsuitableness -unsuitably -unsuited -unsullied -unsung -unsupervised -unsupportable -unsupported -unsuppressed -unsure -unsureness -unsurfaced -unsurpassable -unsurpassed -unsurprised -unsurprising -unsurprisingly -unsurvivable -unsuspected -unsuspecting -unsustainable -unswappable -unsweetened -unswerving -unswervingly -unsympathetic -unsympathetically -unsystematic -untactful -untagged -untainted -untalented -untamed -untangle -untangled -untangling -untapped -untarnished -untasted -untaught -untaxed -untaxing -untempered -untenability -untenable -untended -unterminated -untestable -untested -untethered -untextured -unthinkable -unthinkably -unthinking -unthinkingly -unthoughtful -untidier -untidiest -untidily -untidiness -untidy -untie -untied -unties -until -untimely -untiring -untitled -unto -untold -untouchable -untouchables -untouched -untoward -untraceable -untraced -untrained -untrammelled -untransformed -untranslatable -untranslated -untransportable -untrappable -untreatable -untreated -untried -untrodden -untroubled -untrue -untrusted -untrustworthy -untrusty -untruth -untruthful -untruthfully -untruths -unturned -untutored -untwist -untwisted -untying -untyped -untypical -untypically -unusable -unusably -unused -unusual -unusually -unutterable -unutterably -unvalidated -unvalued -unvanquished -unvarnished -unvarying -unvaryingly -unveil -unveiled -unveiling -unveils -unventilated -unverifiable -unverified -unversed -unvisitable -unvisited -unvoiced -unwanted -unwarily -unwarmed -unwarned -unwarrantable -unwarrantably -unwarranted -unwary -unwashed -unwatchable -unwatched -unwavering -unwaveringly -unweaned -unwearied -unweary -unwed -unwedded -unwedge -unweighted -unwelcome -unwelcoming -unwell -unwholesome -unwieldy -unwilling -unwillingly -unwillingness -unwind -unwindable -unwinding -unwinds -unwisdom -unwise -unwisely -unwisest -unwitting -unwittingly -unwontedly -unworkability -unworkable -unworldly -unworn -unworried -unworthily -unworthiness -unworthy -unwound -unwounded -unwrap -unwrapped -unwrapping -unwraps -unwritten -unyielding -unzip -unzipped -unzipping -unzips -up -upbeat -upbraid -upbraided -upbraiding -upbraids -upbringing -upbringings -upcast -upcoming -updatability -update -updated -updater -updates -updating -upended -upfield -upfront -upgradable -upgrade -upgradeable -upgraded -upgrades -upgrading -upgradings -upheaval -upheavals -upheld -uphill -uphold -upholder -upholders -upholding -upholds -upholster -upholstered -upholsterer -upholsterers -upholstery -upkeep -upland -uplands -uplift -uplifted -uplifting -uplifts -uplink -uplinks -upload -uploaded -uploads -upmarket -upmost -upon -upped -upper -uppercase -upperclass -uppercut -uppermost -uppers -upraised -uprate -uprated -uprating -upright -uprightly -uprightness -uprights -uprise -uprising -uprisings -upriver -uproar -uproarious -uproariously -uproars -uproo -uproot -uprooted -uprooting -uproots -ups -upset -upsets -upsetting -upshot -upside -upsidedown -upsilon -upstage -upstaged -upstages -upstaging -upstairs -upstanding -upstart -upstarts -upstream -upsurge -upsurges -upswing -uptake -upthrust -uptotheminute -uptown -upturn -upturned -upward -upwardly -upwards -upwind -uranium -uranus -urban -urbane -urbanely -urbanisation -urbanise -urbanised -urbanising -urbanites -urbanity -urchin -urchins -urea -ureter -ureters -urethane -urethra -urethrae -urethral -urethras -urethritis -urge -urged -urgency -urgent -urgently -urges -urging -urgings -urinary -urine -urn -urns -urologist -ursine -urticaria -uruguay -us -usability -usable -usage -usages -usances -use -useable -used -useful -usefully -usefulness -useless -uselessly -uselessness -user -userfriendliness -userfriendly -users -uses -usher -ushered -usherette -ushering -ushers -using -usual -usually -usurer -usurers -usurious -usurp -usurpation -usurped -usurper -usurping -usury -utah -utensil -utensils -uteri -uterine -uterus -utilisation -utilise -utilised -utilises -utilising -utilitarian -utilitarianism -utilitarians -utilities -utility -utmost -utopia -utopian -utopians -utopias -utter -utterance -utterances -uttered -utterer -uttering -utterly -uttermost -utters -uturns -uvula -uvular -vacancies -vacancy -vacant -vacantly -vacate -vacated -vacates -vacating -vacation -vacations -vaccinate -vaccinated -vaccinating -vaccination -vaccinations -vaccine -vaccines -vacillate -vacillating -vacillation -vacillations -vacua -vacuity -vacuole -vacuoles -vacuous -vacuously -vacuum -vacuums -vaduz -vagabond -vagabonds -vagrancy -vagrant -vagrants -vague -vaguely -vagueness -vaguer -vaguest -vain -vainer -vainest -vainglorious -vainglory -vainly -valance -vale -valediction -valedictory -valence -valencies -valency -valentine -vales -valet -valets -valhalla -valiant -valiantly -valid -validate -validated -validates -validating -validation -validity -validly -valise -valley -valleys -valour -valuable -valuables -valuation -valuations -value -valueadded -valued -valueformoney -valueless -valuer -valuers -values -valuing -valuta -valve -valves -vamp -vamped -vamper -vamping -vampire -vampires -vamps -van -vanadium -vandal -vandalise -vandalised -vandalising -vandalism -vandals -vane -vaned -vanes -vangogh -vanguard -vanilla -vanish -vanished -vanishes -vanishing -vanishingly -vanities -vanity -vanquish -vanquished -vanquishing -vans -vantage -vapid -vaporisation -vaporise -vaporised -vaporising -vaporous -vapour -vapours -variability -variable -variables -variably -variance -variances -variant -variants -variate -variates -variation -variational -variations -varicose -varied -variegated -varies -varietal -varieties -variety -various -variously -varnish -varnished -varnishes -varnishing -varsity -vary -varying -vascular -vase -vasectomies -vasectomy -vaseline -vases -vassal -vassalage -vassals -vast -vaster -vastly -vastness -vat -vatican -vats -vault -vaulted -vaulting -vaults -vaunted -vaunting -veal -vector -vectored -vectoring -vectorisation -vectorised -vectors -veer -veered -veering -veers -veg -vegan -vegans -vegetable -vegetables -vegetarian -vegetarianism -vegetarians -vegetate -vegetated -vegetating -vegetation -vegetational -vegetative -vegetive -veggies -vehemence -vehement -vehemently -vehicle -vehicles -vehicular -veil -veiled -veiling -veils -vein -veined -veins -velar -veld -veldt -vellum -velocipede -velocities -velocity -velodrome -velour -velum -velvet -velveteen -velveteens -velvets -velvety -venal -venality -vend -venders -vendetta -vendettas -vending -vendor -vendors -vends -veneer -veneered -veneers -venerable -venerate -venerated -venerates -venerating -veneration -venereal -venetian -vengeance -vengeful -vengefully -venial -venice -venison -venom -venomous -venomously -venoms -venose -venous -vent -vented -ventilate -ventilated -ventilating -ventilation -ventilator -ventilators -venting -ventings -ventral -ventrally -ventricle -ventricles -ventricular -ventriloquism -ventriloquist -ventriloquists -ventriloquy -vents -venture -ventured -venturer -ventures -venturesome -venturing -venue -venues -venus -veracity -veranda -verandah -verandahs -verandas -verb -verbal -verbalise -verbally -verbals -verbatim -verbiage -verbose -verbosely -verboseness -verbosity -verbs -verdant -verdict -verdicts -verdigris -verdure -verge -verged -verger -verges -verging -verifiability -verifiable -verification -verifications -verified -verifier -verifiers -verifies -verify -verifying -verily -verisimilitude -veritable -veritably -verities -verity -vermilion -vermin -verminous -vernacular -vernal -vernier -verona -versatile -versatility -verse -versed -verses -versicle -versification -versifier -version -versions -versus -vertebra -vertebrae -vertebral -vertebrate -vertebrates -vertex -vertical -verticality -vertically -verticals -vertices -vertiginous -vertigo -verve -very -vesicle -vesicles -vesicular -vespers -vessel -vessels -vest -vestal -vested -vestibular -vestibule -vestibules -vestige -vestiges -vestigial -vesting -vestment -vestments -vestry -vests -vesuvius -vet -veteran -veterans -veterinary -veto -vetoed -vetoing -vets -vetted -vetting -vex -vexation -vexations -vexatious -vexed -vexes -vexing -via -viability -viable -viably -viaduct -viaducts -vial -vials -vibes -vibrancy -vibrant -vibrantly -vibrate -vibrated -vibrates -vibrating -vibration -vibrational -vibrationally -vibrations -vibrato -vibrator -vibrators -vibratory -vicar -vicarage -vicarages -vicarious -vicariously -vicars -vice -vicechancellor -vicechancellors -vicepresidency -vicepresident -vicepresidential -vicepresidents -viceroy -viceroys -vices -vicinities -vicinity -vicious -viciously -viciousness -vicissitude -vicissitudes -victim -victimisation -victimise -victimised -victimises -victimising -victimless -victims -victor -victoria -victories -victorious -victoriously -victors -victory -victualling -victuals -video -videoconferencing -videodisc -videoed -videoing -videophone -videos -videotape -videotaped -videotapes -videotaping -vie -vied -vienna -vier -vies -view -viewable -viewed -viewer -viewers -viewfinder -viewfinders -viewing -viewings -viewpoint -viewpoints -views -vigil -vigilance -vigilant -vigilante -vigilantes -vigilantly -vigils -vignette -vignettes -vigorous -vigorously -vigour -viking -vikings -vile -vilely -vileness -viler -vilest -vilification -vilified -vilify -vilifying -villa -village -villager -villagers -villages -villain -villainous -villains -villainy -villas -vim -vims -vindicate -vindicated -vindicates -vindicating -vindication -vindictive -vindictively -vindictiveness -vine -vinegar -vinegars -vines -vineyard -vineyards -vino -vintage -vintages -vintner -vinyl -vinyls -viol -viola -violas -violate -violated -violates -violating -violation -violations -violator -violators -violence -violent -violently -violet -violets -violin -violinist -violinists -violins -violist -viper -vipers -virago -viral -virgil -virgin -virginal -virginia -virginity -virgins -virile -virility -virology -virtual -virtually -virtue -virtues -virtuosi -virtuosic -virtuosity -virtuoso -virtuous -virtuously -virulence -virulent -virulently -virus -viruses -visa -visage -visas -viscose -viscosity -viscount -viscounts -viscous -vise -visibilities -visibility -visible -visibly -vision -visionaries -visionary -visions -visit -visitable -visitant -visitation -visitations -visited -visiting -visitor -visitors -visits -visor -visors -vista -vistas -visual -visualisation -visualise -visualised -visualising -visually -visuals -vital -vitalise -vitality -vitally -vitals -vitamin -vitamins -vitiate -vitiated -vitiates -vitiating -vitreous -vitrified -vitriol -vitriolic -vituperate -vituperation -vituperative -viva -vivacious -vivaciously -vivacity -vivid -vividly -vividness -vivified -vivisected -vivisection -vivisectionist -vivisectionists -vixen -vixens -vizier -vocabularies -vocabulary -vocal -vocalisation -vocalisations -vocalise -vocalised -vocalising -vocalist -vocalists -vocally -vocals -vocation -vocational -vocationally -vocations -vocative -vociferous -vociferously -vodka -vogue -voice -voiced -voiceless -voices -voicing -voicings -void -voidable -voided -voiding -voids -voile -volatile -volatiles -volatility -volcanic -volcanically -volcanism -volcano -vole -voles -volga -volition -volley -volleyball -volleyed -volleying -volleys -volt -voltage -voltages -voltmeter -volts -volubility -voluble -volubly -volume -volumes -volumetric -voluminous -voluntarily -voluntary -volunteer -volunteered -volunteering -volunteers -voluptuous -voluptuously -voluptuousness -volute -vomit -vomited -vomiting -vomits -voodoo -voracious -voraciously -voracity -vortex -vortexes -vortices -vorticity -vote -voted -voteless -voter -voters -votes -voting -votive -vouch -vouched -voucher -vouchers -vouches -vouchsafe -vouchsafed -vouchsafing -vow -vowed -vowel -vowels -vowing -vows -voyage -voyaged -voyager -voyagers -voyages -voyaging -voyeur -voyeurism -voyeuristic -voyeurs -vulcan -vulcanise -vulcanised -vulcanism -vulcanologist -vulgar -vulgarities -vulgarity -vulgarly -vulgate -vulnerabilities -vulnerability -vulnerable -vulpine -vulture -vultures -vulva -vying -wackier -wacky -wad -wadding -waddle -waddled -waddles -waddling -wade -waded -wader -waders -wades -wadi -wading -wadings -wadis -wads -wafer -wafers -waffle -waffled -waffles -waft -wafted -wafting -wafts -wafture -wag -wage -waged -wager -wagered -wagerer -wagers -wages -wagged -waggery -wagging -waggish -waggishly -waggle -waggled -waggles -waggling -waggly -waggoners -waggons -waging -wagon -wagons -wags -wagtail -wagtails -waif -waifs -wail -wailed -wailer -wailing -wails -wainscot -wainscoting -waist -waistband -waistcoat -waistcoats -waistline -waists -wait -waited -waiter -waiters -waiting -waitress -waitresses -waits -waive -waived -waiver -waivers -waives -waiving -wake -waked -wakeful -wakefulness -waken -wakened -wakening -wakens -wakes -waking -wales -walk -walkable -walkabout -walkabouts -walked -walker -walkers -walkietalkie -walkietalkies -walking -walkout -walkover -walks -walkway -walkways -wall -wallabies -wallaby -wallchart -walled -wallet -wallets -wallflower -wallflowers -walling -wallop -wallow -wallowed -wallowing -wallows -wallpaper -wallpapering -wallpapers -walls -walltowall -walnut -walnuts -walrus -walruses -waltz -waltzed -waltzes -waltzing -wan -wand -wander -wandered -wanderer -wanderers -wandering -wanderings -wanderlust -wanders -wands -wane -waned -wanes -waning -wanly -want -wanted -wanting -wanton -wantonly -wantonness -wants -wapiti -wapitis -war -warble -warbled -warbler -warblers -warbles -warbling -ward -warded -warden -wardens -warder -warders -warding -wardrobe -wardrobes -wards -wardship -ware -warehouse -warehoused -warehouseman -warehousemen -warehouses -warehousing -wares -warfare -warhead -warheads -warhorse -warhorses -wariest -warily -wariness -waring -warlike -warlock -warlocks -warlord -warlords -warm -warmblooded -warmed -warmer -warmers -warmest -warmhearted -warmheartedness -warming -warmish -warmly -warmness -warmonger -warms -warmth -warmup -warn -warned -warners -warning -warningly -warnings -warns -warp -warpaint -warpath -warped -warping -warplanes -warps -warrant -warranted -warranties -warranting -warrants -warranty -warred -warren -warrens -warring -warrior -warriors -wars -warsaw -warship -warships -wart -warthog -warthogs -wartime -warts -warty -wary -was -wash -washable -washbasin -washbasins -washboard -washday -washed -washer -washers -washerwoman -washerwomen -washes -washing -washings -washington -washout -washstand -washy -wasp -waspish -waspishly -wasps -waspwaisted -wast -wastage -wastages -waste -wasted -wasteful -wastefully -wastefulness -wasteland -wastelands -wastepaper -waster -wasters -wastes -wasting -wastings -wastrel -watch -watchable -watchdog -watchdogs -watched -watcher -watchers -watches -watchful -watchfully -watchfulness -watching -watchmaker -watchmakers -watchman -watchmen -watchtower -watchtowers -watchword -watchwords -water -waterbed -waterbeds -watercolour -watercolourists -watercolours -watercooled -watercourse -watercourses -watercress -watered -waterfall -waterfalls -waterfowl -waterfront -waterglass -waterhole -waterholes -watering -waterless -waterline -waterlogged -waterloo -waterman -watermark -watermarks -watermelon -watermelons -watermen -watermill -watermills -waterproof -waterproofed -waterproofing -waterproofs -waterresistant -waters -watershed -watersheds -waterside -waterskiing -watersoluble -waterspouts -watertable -watertight -waterway -waterways -waterwheel -waterwheels -waterworks -watery -watt -wattage -wattle -watts -wave -waveband -wavebands -waved -waveform -waveforms -wavefront -waveguide -waveguides -wavelength -wavelengths -wavelet -wavelets -wavelike -waver -wavered -waverers -wavering -wavers -waves -wavier -waviest -wavily -waving -wavings -wavy -wax -waxed -waxen -waxes -waxing -waxpaper -waxwork -waxworks -waxy -way -wayout -ways -wayside -wayward -waywardly -waywardness -we -weak -weaken -weakened -weakening -weakens -weaker -weakest -weakish -weakkneed -weakling -weaklings -weakly -weakminded -weakness -weaknesses -weal -wealth -wealthier -wealthiest -wealthy -wean -weaned -weaning -weanling -weans -weapon -weaponry -weapons -wear -wearable -wearer -wearers -wearied -wearier -wearies -weariest -wearily -weariness -wearing -wearisome -wears -weary -wearying -wearyingly -weasel -weaselling -weaselly -weasels -weather -weatherbeaten -weatherbound -weathercock -weathercocks -weathered -weathering -weatherman -weathermen -weatherproof -weathers -weathervane -weatherworn -weave -weaved -weaver -weavers -weaves -weaving -weavings -web -webbed -webbing -webby -webfoot -webs -website -wed -wedded -wedding -weddings -wedge -wedged -wedges -wedging -wedlock -weds -wee -weed -weeded -weedier -weediest -weeding -weedkiller -weedkillers -weeds -weedy -week -weekday -weekdays -weekend -weekenders -weekends -weeklies -weekly -weeks -ween -weeny -weep -weeper -weeping -weepings -weeps -weepy -weevil -weevils -weigh -weighbridge -weighed -weighing -weighs -weight -weighted -weightier -weightiest -weightily -weighting -weightings -weightless -weightlessly -weightlessness -weightlifter -weightlifters -weightlifting -weights -weighty -weir -weird -weirder -weirdest -weirdly -weirdness -weirdo -weirs -welcome -welcomed -welcomer -welcomes -welcoming -weld -welded -welder -welders -welding -welds -welfare -well -welladjusted -wellbalanced -wellbehaved -wellbeing -wellbeloved -wellborn -wellbred -wellbuilt -wellchosen -wellconnected -welldefined -welldeserved -welldesigned -welldeveloped -welldisposed -welldressed -wellearned -welled -welleducated -wellendowed -wellequipped -wellestablished -wellfed -wellformed -wellfounded -wellgrounded -wellhead -wellinformed -welling -wellington -wellingtons -wellintentioned -wellkept -wellknown -wellliked -wellloved -wellmade -wellmannered -wellmarked -wellmatched -wellmeaning -wellmeant -welloff -wellordered -wellorganised -wellpaid -wellplaced -wellprepared -wellpreserved -wellread -wellreceived -wellrounded -wells -wellspoken -wellstructured -wellsupported -welltaken -wellthoughtout -welltimed -welltodo -welltried -wellused -wellwisher -wellwishers -wellworn -welly -welsh -welshman -welt -welter -weltering -welters -welterweight -welts -wench -wenches -wend -wended -wending -wends -went -wept -were -werewolf -werewolves -west -westbound -westerly -western -westerner -westerners -westernisation -westernised -westernmost -westerns -westward -westwards -wet -wether -wetland -wetlands -wetly -wetness -wets -wetsuit -wetsuits -wettable -wetted -wetter -wettest -wetting -whack -whacked -whacker -whacko -whacks -whale -whalebone -whaler -whalers -whales -whaling -wham -whap -wharf -wharfs -wharves -what -whatever -whatnot -whatsoever -wheals -wheat -wheatears -wheaten -wheatgerm -wheats -whee -wheedle -wheedled -wheedling -wheel -wheelbarrow -wheelbarrows -wheelbase -wheelchair -wheelchairs -wheeled -wheeler -wheelers -wheelhouse -wheelie -wheeling -wheels -wheelwright -wheelwrights -wheeze -wheezed -wheezes -wheezing -wheezy -whelk -whelked -whelks -whelp -when -whence -whenever -where -whereabouts -whereas -whereby -wherefore -wherefores -wherein -whereof -whereon -wheresoever -whereto -whereupon -wherever -wherewith -wherewithal -wherry -whet -whether -whetstone -whetstones -whetted -whetting -whey -which -whichever -whiff -whiffs -while -whiled -whiles -whiling -whilst -whim -whimper -whimpered -whimpering -whimpers -whims -whimsical -whimsically -whimsy -whine -whined -whines -whining -whinnied -whinny -whinnying -whip -whipcord -whiplash -whipped -whipper -whippet -whippets -whipping -whippy -whips -whir -whirl -whirled -whirligig -whirling -whirlpool -whirlpools -whirls -whirlwind -whirlwinds -whirr -whirred -whirring -whisk -whisked -whisker -whiskers -whiskery -whiskey -whiskeys -whiskies -whisking -whisks -whisky -whisper -whispered -whisperers -whispering -whisperings -whispers -whist -whistle -whistled -whistler -whistles -whistling -whists -white -whitebait -whiteboards -whitecollar -whitely -whiten -whitened -whitener -whiteness -whitening -whitens -whiter -whites -whitest -whitewash -whitewashed -whitewashing -whither -whiting -whitish -whittle -whittled -whittling -whizkids -whizz -whizzkid -who -whoa -whodunit -whodunnit -whoever -whole -wholefood -wholegrain -wholehearted -wholeheartedly -wholemeal -wholeness -wholes -wholesale -wholesaler -wholesalers -wholesaling -wholesome -wholesomely -wholesomeness -wholewheat -wholly -whom -whomever -whomsoever -whoop -whooped -whooping -whoops -whoosh -whop -whore -whorehouse -whores -whoring -whorled -whorls -whose -whosoever -why -whys -wick -wicked -wickedest -wickedly -wickedness -wicker -wickerwork -wicket -wicketkeeper -wicketkeepers -wicketkeeping -wickets -wicks -wide -wideeyed -widely -widen -widened -wideness -widening -widens -wideopen -wider -wideranging -wides -widescreen -widespread -widest -widgeon -widget -widow -widowed -widower -widowers -widowhood -widows -width -widths -wield -wielded -wielder -wielding -wields -wife -wifeless -wifely -wig -wigeon -wigeons -wigging -wiggle -wiggled -wiggler -wiggles -wiggling -wigs -wigwam -wigwams -wild -wildcat -wildcats -wildebeest -wilder -wilderness -wildernesses -wildest -wildeyed -wildfire -wildfires -wildfowl -wildlife -wildly -wildness -wildoats -wilds -wile -wiles -wilful -wilfully -wilfulness -wilier -wiliest -wiling -will -willed -willing -willingly -willingness -willow -willows -willowy -willpower -wills -willynilly -wilt -wilted -wilting -wilts -wily -wimp -wimple -wimpy -win -wince -winced -winces -winch -winched -winches -winching -wincing -wind -windbag -windbags -windbreak -windcheater -windcheaters -winded -winder -winders -windfall -windfalls -windier -windiest -windily -winding -windings -windlass -windless -windmill -windmills -window -windowed -windowing -windowless -windows -windowshop -windowshopping -windpipe -winds -windscreen -windscreens -windsock -windsor -windsurf -windsurfer -windsurfers -windsurfing -windswept -windward -windy -wine -wined -wineglass -wineglasses -winemakers -winery -wines -wineskin -wing -winged -winger -wingers -winging -wingless -wings -wingspan -wining -wink -winked -winker -winkers -winking -winkle -winkled -winkles -winks -winnable -winner -winners -winning -winningly -winnings -winnow -winnowing -wins -winsome -winter -wintered -wintering -winters -wintertime -wintery -wintrier -wintriest -wintry -wipe -wiped -wiper -wipers -wipes -wiping -wire -wired -wireless -wirer -wires -wirier -wiriest -wiring -wirings -wiry -wisdom -wisdoms -wise -wisecracks -wiseguys -wisely -wiser -wisest -wish -wishbone -wished -wishes -wishful -wishfully -wishing -wishywashy -wisp -wisps -wispy -wistful -wistfully -wistfulness -wit -witch -witchcraft -witchdoctor -witchdoctors -witchery -witches -witchhunt -witchhunts -witchlike -with -withdraw -withdrawal -withdrawals -withdrawing -withdrawn -withdraws -withdrew -wither -withered -withering -witheringly -withers -withheld -withhold -withholding -withholds -within -without -withstand -withstanding -withstands -withstood -witless -witness -witnessed -witnesses -witnessing -wits -witter -wittering -witticism -witticisms -wittier -wittiest -wittily -wittiness -witting -wittingly -witty -wives -wizard -wizardry -wizards -wizened -woad -wobble -wobbled -wobbler -wobbles -wobblier -wobbliest -wobbling -wobbly -wodan -wodge -woe -woebegone -woeful -woefully -woes -wok -woke -woken -woks -wold -wolds -wolf -wolfcubs -wolfed -wolfhound -wolfhounds -wolfish -wolfishly -wolfwhistles -wolves -woman -womanhood -womanise -womaniser -womanish -womanising -womankind -womanliness -womanly -womans -womb -wombat -wombats -wombs -women -womenfolk -won -wonder -wondered -wonderful -wonderfully -wonderfulness -wondering -wonderingly -wonderland -wonderment -wonders -wondrous -wondrously -wont -woo -wood -woodbine -woodcock -woodcocks -woodcut -woodcuts -woodcutter -woodcutters -wooded -wooden -woodenly -woodenness -woodland -woodlands -woodlice -woodlouse -woodman -woodmen -woodpecker -woodpeckers -woodpile -woods -woodshed -woodsman -woodsmoke -woodwind -woodwork -woodworker -woodworkers -woodworking -woodworm -woody -wooed -wooer -woof -woofer -woofers -wooing -wool -woollen -woollens -woollier -woollies -woollike -woolliness -woolly -wools -wooly -woos -word -wordage -worded -wordgame -wordier -wordiest -wordiness -wording -wordings -wordless -wordlessly -wordplay -wordprocessing -words -wordsmith -wordy -wore -work -workability -workable -workaday -workbench -workbook -workbooks -workday -workdays -worked -worker -workers -workfare -workforce -workforces -workhorse -workhorses -workhouse -workhouses -working -workings -workless -workload -workloads -workman -workmanlike -workmanship -workmate -workmates -workmen -workout -workouts -workpeople -workpiece -workpieces -workplace -workplaces -workroom -workrooms -works -worksheet -worksheets -workshop -workshops -workshy -workspace -workstation -workstations -worktop -worktops -workweek -world -worldclass -worldfamous -worldliness -worldly -worlds -worldwar -worldwide -worm -wormhole -wormholes -worming -wormlike -worms -wormy -worn -worried -worriedly -worrier -worriers -worries -worrisome -worry -worrying -worryingly -worse -worsen -worsened -worsening -worsens -worser -worship -worshipful -worshipped -worshipper -worshippers -worshipping -worships -worst -worsted -worth -worthier -worthies -worthiest -worthily -worthiness -worthless -worthlessness -worthwhile -worthy -would -wound -wounded -wounding -wounds -wove -woven -wow -wowed -wows -wrack -wracked -wraith -wraiths -wrangle -wrangled -wrangler -wrangles -wrangling -wrap -wraparound -wrapped -wrapper -wrappers -wrapping -wrappings -wraps -wrasse -wrath -wrathful -wrathfully -wraths -wreak -wreaked -wreaking -wreaks -wreath -wreathe -wreathed -wreathes -wreathing -wreaths -wreck -wreckage -wrecked -wrecker -wreckers -wrecking -wrecks -wren -wrench -wrenched -wrenches -wrenching -wrens -wrest -wrested -wresting -wrestle -wrestled -wrestler -wrestlers -wrestles -wrestling -wretch -wretched -wretchedly -wretchedness -wretches -wriggle -wriggled -wriggles -wriggling -wriggly -wright -wring -wringer -wringing -wrings -wrinkle -wrinkled -wrinkles -wrinkling -wrinkly -wrist -wristband -wristbands -wrists -wristwatch -writ -writable -write -writer -writers -writes -writhe -writhed -writhes -writhing -writing -writings -writs -written -wrong -wrongdoer -wrongdoers -wrongdoing -wrongdoings -wronged -wronger -wrongest -wrongful -wrongfully -wronging -wrongly -wrongness -wrongs -wrote -wrought -wroughtiron -wrung -wry -wryly -wryness -wunderkind -xenon -xenophobe -xenophobia -xenophobic -xerography -xhosa -xhosas -xmas -xray -xrayed -xraying -xrays -xylophone -xylophonist -yacht -yachting -yachts -yachtsman -yachtsmen -yak -yaks -yale -yalelock -yam -yams -yank -yankee -yankees -yanks -yap -yapping -yaps -yard -yardage -yards -yardstick -yardsticks -yarn -yarns -yaw -yawed -yawl -yawls -yawn -yawned -yawning -yawningly -yawns -yaws -ye -yea -yeah -yeaned -year -yearbook -yearbooks -yearling -yearlings -yearlong -yearly -yearn -yearned -yearning -yearningly -yearnings -yearns -years -yeas -yeast -yeasts -yeasty -yell -yelled -yelling -yellings -yellow -yellowed -yellower -yellowing -yellowish -yellows -yellowy -yells -yelp -yelped -yelping -yelpings -yelps -yemen -yen -yens -yeoman -yeomanry -yeomen -yep -yes -yesterday -yesterdays -yesteryear -yet -yeti -yetis -yew -yews -yiddish -yield -yielded -yielding -yields -yip -yippee -yodel -yodelled -yodeller -yodelling -yodels -yoga -yogi -yoke -yoked -yokel -yokels -yokes -yolk -yolks -yon -yonder -yore -york -yorker -yorkers -you -young -younger -youngest -youngish -youngster -youngsters -your -yours -yourself -yourselves -youth -youthful -youthfulness -youths -yowl -yoyo -yrs -yttrium -yuck -yukon -yule -yuletide -yummiest -yummy -yuppie -yuppies -zag -zaire -zambezi -zambia -zambian -zambians -zaniest -zany -zanzibar -zap -zapping -zappy -zaps -zeal -zealot -zealotry -zealots -zealous -zealously -zealousness -zeals -zebra -zebras -zebu -zebus -zees -zenith -zeniths -zeolite -zeolites -zephyr -zephyrs -zeppelin -zero -zeroed -zeroing -zest -zestfully -zesty -zeta -zeus -zig -zigzag -zigzagged -zigzagging -zigzags -zillion -zillions -zimbabwe -zinc -zion -zionism -zionist -zionists -zip -zipped -zipper -zippers -zipping -zippy -zips -zither -zithers -zombi -zombie -zombies -zonal -zonation -zone -zoned -zones -zoning -zoo -zookeepers -zoological -zoologist -zoologists -zoology -zoom -zoomed -zooming -zooms -zooplankton -zoos -zulu -zulus diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/AggregateLight.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/AggregateLight.scala deleted file mode 100644 index 2eaddd7572..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/AggregateLight.scala +++ /dev/null @@ -1,39 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - -import scala.collection.parallel.benchmarks._ -import scala.collection.parallel.mutable.ParArray -import extra166y.{ParallelArray => JSR166Array} - - -object AggregateLight extends Companion { - def benchName = "aggregate-light"; - def apply(sz: Int, parallelism: Int, what: String) = new AggregateLight(sz, parallelism, what) - override def comparisons = List() - override def defaultSize = 200000 - - val seqop = (a: Cont, b: Cont) => b - val combop = (a: Cont, b: Cont) => a -} - - -class AggregateLight(sz: Int, p: Int, what: String) -extends Resettable[Cont](sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) { - def companion = AggregateLight - override def repetitionsPerRun = 350 - override val runs = 20 - - def runpar = pa.aggregate(new Cont(0))(companion.seqop, companion.combop) - def runseq = sequentialReduce(companion.seqop, sz, new Cont(0)) - override def comparisonMap = collection.Map() -} - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/Companion.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/Companion.scala deleted file mode 100644 index f5d6c75abb..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/Companion.scala +++ /dev/null @@ -1,9 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - -import scala.collection.parallel.benchmarks._ - - -trait Companion extends BenchCompanion { - def collectionName = "ParArray" -} diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/CopyToArray.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/CopyToArray.scala deleted file mode 100644 index 033921d451..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/CopyToArray.scala +++ /dev/null @@ -1,21 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - - - -object CopyToArray extends Companion { - def benchName = "copytoarray"; - def apply(sz: Int, parallelism: Int, what: String) = new CopyToArray(sz, parallelism, what) - override def comparisons = List() - override def defaultSize = 200000 -} - -class CopyToArray(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) { - def companion = CopyToArray - val destarr = new Array[Any](sz) - - def runpar = pa.copyToArray(destarr, 0, sz) - def runseq = sequentialCopyToArray(destarr, 0, sz) - def comparisonMap = collection.Map() -} diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/Corresponds.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/Corresponds.scala deleted file mode 100644 index c9b3f07ff3..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/Corresponds.scala +++ /dev/null @@ -1,47 +0,0 @@ -package scala.collection.parallel.benchmarks -package parallel_array - - - - - - - -class Corresponds(sz: Int, p: Int, what: String) -extends Resettable[Cont](sz, p, what, (i: Int) => new Cont(i), new Array[Any](_), classOf[Cont]) -with HavingResult[Boolean] { - def companion = Corresponds - override def repetitionsPerRun = 400 - - val same = { - val p = new collection.parallel.mutable.ParArray[Cont](sz) - for (i <- 0 until sz) p(i) = what match { - case "seq" => arr(i).asInstanceOf[Cont] - case "par" => pa(i) - } - p - } - - def runpar = runresult = pa.corresponds(same)(corr) - def runseq = runresult = sequentialCorresponds(same, corr, sz) - override def comparisonMap = collection.Map() - - val corr = (a: Cont, b: Cont) => a.in == b.in -} - -object Corresponds extends Companion { - def benchName = "corresponds"; - def apply(sz: Int, p: Int, what: String) = new Corresponds(sz, p, what) - override def comparisons = List() -} - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/CountHeavy.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/CountHeavy.scala deleted file mode 100644 index 7438be8447..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/CountHeavy.scala +++ /dev/null @@ -1,36 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - - - -object CountHeavy extends Companion { - def benchName = "count-heavy"; - def apply(sz: Int, parallelism: Int, what: String) = new CountHeavy(sz, parallelism, what) - override def comparisons = List("jsr") - override def defaultSize = 16 - - val pred = (a: Cont) => heavyCheck(a) - val predjsr = new extra166y.Ops.Predicate[Cont] { - def op(a: Cont) = heavyCheck(a) - } - - def heavyCheck(a: Cont) = { - val n = a.in - (n until (n + 200)).map(checkPrime(_)).reduceLeft(_ && _) - } - def checkPrime(n: Int) = { - var isPrime = true - for (i <- 2 until (scala.math.sqrt(n).toInt + 1)) if (n % i == 0) isPrime = false - isPrime - } -} - -class CountHeavy(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) { - def companion = CountHeavy - - def runpar = pa.count(CountHeavy.pred) - def runseq = sequentialCount(CountHeavy.pred, sz) - def runjsr = jsrarr.withFilter(CountHeavy.predjsr).size - def comparisonMap = collection.Map("jsr" -> runjsr _) -} diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/CountLight.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/CountLight.scala deleted file mode 100644 index 21c64358b4..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/CountLight.scala +++ /dev/null @@ -1,22 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - - - -object CountLight extends Companion { - def benchName = "count-light"; - def apply(sz: Int, parallelism: Int, what: String) = new CountLight(sz, parallelism, what) - override def comparisons = List("jsr") - override def defaultSize = 200000 -} - -class CountLight(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) { - def companion = CountLight - - def runpar = pa.count(Cont.pred) - def runseq = sequentialCount(Cont.pred, sz) - def runjsr = jsrarr.withFilter(Cont.predjsr).size - def comparisonMap = collection.Map("jsr" -> runjsr _) -} - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/CountList.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/CountList.scala deleted file mode 100644 index 9c6ac19229..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/CountList.scala +++ /dev/null @@ -1,30 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - - - -object CountList extends Companion { - def benchName = "count-list"; - def apply(sz: Int, parallelism: Int, what: String) = new CountList(sz, parallelism, what) - override def comparisons = List("jsr") - override def defaultSize = 1000 - - val listCreator = (i: Int) => (0 until (i % 50 + 50)).toList - val pred = (lst: List[Int]) => check(lst) - val predjsr = new extra166y.Ops.Predicate[List[Int]] { - def op(lst: List[Int]) = check(lst) - } - - def check(lst: List[Int]) = lst.foldLeft(0)((sum, n) => sum + n * n) % 2 == 0 -} - -class CountList(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, CountList.listCreator, new Array[Any](_), classOf[List[Int]]) { - def companion = CountList - override def repetitionsPerRun = 250 - - def runpar = pa.count(CountList.pred) - def runseq = sequentialCount(CountList.pred, sz) - def runjsr = jsrarr.withFilter(CountList.predjsr).size - def comparisonMap = collection.Map("jsr" -> runjsr _) -} diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/DiffHalf.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/DiffHalf.scala deleted file mode 100644 index 4b27569239..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/DiffHalf.scala +++ /dev/null @@ -1,48 +0,0 @@ -package scala.collection.parallel.benchmarks -package parallel_array - - - - - - - -class DiffHalf(sz: Int, p: Int, what: String) -extends Resettable[Cont](sz, p, what, (i: Int) => new Cont(i), new Array[Any](_), classOf[Cont]) -with HavingResult[Int] { - def companion = DiffHalf - override def repetitionsPerRun = 400 - - val similar = { - val p = new collection.parallel.mutable.ParArray[Cont](sz) - for (i <- 0 until sz) p(i) = what match { - case "seq" => arr(i).asInstanceOf[Cont] - case "par" => pa(i) - } - p.drop(p.size / 2) - } - - def runpar = runresult = pa.diff(similar).size - def runseq = runresult = sequentialDiff(similar, sz).size - override def comparisonMap = collection.Map() - - val corr = (a: Cont, b: Cont) => a.in == b.in -} - -object DiffHalf extends Companion { - def benchName = "diff-half"; - def apply(sz: Int, p: Int, what: String) = new DiffHalf(sz, p, what) - override def comparisons = List() - override def defaultSize = 10000 -} - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/DropMany.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/DropMany.scala deleted file mode 100644 index 443ef2b500..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/DropMany.scala +++ /dev/null @@ -1,47 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - -import scala.collection.parallel.benchmarks._ - - -object DropMany extends Companion { - def benchName = "drop-many"; - def apply(sz: Int, parallelism: Int, what: String) = new DropMany(sz, parallelism, what) - override def comparisons = Nil - override def defaultSize = 50000 -} - -class DropMany(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) -with HavingResult[Int] { - def companion = DropMany - override def repetitionsPerRun = 400 - runresult = -1 - - def runpar = runresult = pa.drop(pa.size / 2).size - def runseq = runresult = sequentialDrop(sz / 2, sz).size - def comparisonMap = collection.Map() -} - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ExistsLight.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ExistsLight.scala deleted file mode 100644 index 2749216735..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ExistsLight.scala +++ /dev/null @@ -1,49 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - -import scala.collection.parallel.benchmarks._ - - -object ExistsLight extends Companion { - def benchName = "exists-light"; - def apply(sz: Int, parallelism: Int, what: String) = new ExistsLight(sz, parallelism, what) - override def comparisons = List("jsr") - override def defaultSize = 200000 - - val pred = (a: Cont) => a.in < 0 - val predjsr = new extra166y.Ops.Predicate[Cont] { - def op(a: Cont) = a.in < 0 - } -} - -class ExistsLight(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) -with HavingResult[Boolean] { - def companion = ExistsLight - runresult = false - - def runpar = runresult = pa.exists(ExistsLight.pred) - def runseq = runresult = sequentialExists(ExistsLight.pred, sz) - def runjsr = runresult = jsrarr.withFilter(ExistsLight.predjsr).size > 0 - def comparisonMap = collection.Map("jsr" -> runjsr _) -} - - - - - - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/FilterLight.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/FilterLight.scala deleted file mode 100644 index d4c8395951..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/FilterLight.scala +++ /dev/null @@ -1,64 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - -import scala.collection.parallel.benchmarks._ - - -object FilterLight extends Companion { - def benchName = "filter-light"; - def apply(sz: Int, parallelism: Int, what: String) = new FilterLight(sz, parallelism, what) - override def comparisons = List("jsr") - override def defaultSize = 10000 - - val pred = (a: Cont) => check(a.in) - val predjsr = new extra166y.Ops.Predicate[Cont] { - def op(a: Cont) = check(a.in) - } - - def check(n: Int) = { - var res = n -// var i = 1 -// while (i < 10) { -// res += n % i -// i += 1 -// } - res % 2 == 0 - } -} - -class FilterLight(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) -with HavingResult[Int] { - def companion = FilterLight - override def repetitionsPerRun = 250 - override val runs = 30 - runresult = -1 - - def runpar = runresult = pa.filter(FilterLight.pred).size - def runseq = runresult = sequentialFilter(FilterLight.pred, sz).size - def runjsr = runresult = { jsrarr.withFilter(FilterLight.predjsr).all.size } - def comparisonMap = collection.Map("jsr" -> runjsr _) -} - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/FindLight.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/FindLight.scala deleted file mode 100644 index f08ddf29e3..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/FindLight.scala +++ /dev/null @@ -1,52 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - -import scala.collection.parallel.benchmarks._ - - -object FindLight extends Companion { - def benchName = "find-light"; - def apply(sz: Int, parallelism: Int, what: String) = new FindLight(sz, parallelism, what) - override def comparisons = List("jsr") - override def defaultSize = 200000 - - val pred = (a: Cont) => a.in < -10 - val predjsr = new extra166y.Ops.Predicate[Cont] { - def op(a: Cont) = a.in < -10 - } -} - -class FindLight(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) -with HavingResult[Option[Cont]] { - def companion = FindLight - runresult = None - - def runpar = runresult = pa.find(FindLight.pred) - def runseq = runresult = sequentialFind(FindLight.pred, sz) - def runjsr = runresult = { jsrarr.withFilter(FindLight.predjsr).size > 0; None } - def comparisonMap = collection.Map("jsr" -> runjsr _) -} - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/FlatMapLight.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/FlatMapLight.scala deleted file mode 100644 index 01ecbbf016..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/FlatMapLight.scala +++ /dev/null @@ -1,24 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - - - - - -object FlatMapLight extends Companion { - def benchName = "flatmap-light"; - def apply(sz: Int, parallelism: Int, what: String) = new FlatMapLight(sz, parallelism, what) - override def comparisons = List("jsr") - override def defaultSize = 10000 - - def fun = (a: Cont) => { List(1, 2, 3, 4, a.in) } -} - -class FlatMapLight(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) { - def companion = FlatMapLight - - def runpar = pa.flatMap(FlatMapLight.fun) - def runseq = sequentialFlatMap(FlatMapLight.fun, sz) - def comparisonMap = collection.Map() -} diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ForallHeavy.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ForallHeavy.scala deleted file mode 100644 index 0d61e5aeb5..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ForallHeavy.scala +++ /dev/null @@ -1,59 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - - - -object ForallHeavy extends Companion { - def benchName = "forall-heavy"; - def apply(sz: Int, parallelism: Int, what: String) = new ForallHeavy(sz, parallelism, what) - override def comparisons = List("jsr") - override def defaultSize = 16 - - val pred = (a: Cont) => heavyCheck(a) - val predjsr = new extra166y.Ops.Predicate[Cont] { - def op(a: Cont) = heavyCheck(a) - } - - def heavyCheck(a: Cont) = { - val init = a.in + 1 - var cnt = init - var i = 0 - while (i < 10000) { - cnt = -2 * cnt - cnt /= 2 - i += 1 - } - cnt += init * 5 + 10 - cnt >= 0 - } -} - -class ForallHeavy(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) { - def companion = ForallHeavy - - def runpar = pa.forall(ForallHeavy.pred) - def runseq = sequentialForall(ForallHeavy.pred, sz) - def runjsr = jsrarr.withFilter(ForallHeavy.predjsr).size == sz - def comparisonMap = collection.Map("jsr" -> runjsr _) -} - - - - - - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ForallLight.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ForallLight.scala deleted file mode 100644 index 19671d2bc4..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ForallLight.scala +++ /dev/null @@ -1,46 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - - - -object ForallLight extends Companion { - def benchName = "forall-light"; - def apply(sz: Int, parallelism: Int, what: String) = new ForallLight(sz, parallelism, what) - override def comparisons = List("jsr") - override def defaultSize = 200000 - - val pred = (a: Cont) => a.in >= 0 - val predjsr = new extra166y.Ops.Predicate[Cont] { - def op(a: Cont) = a.in >= 0 - } -} - -class ForallLight(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) { - def companion = ForallLight - - def runpar = pa.forall(ForallLight.pred) - def runseq = sequentialForall(ForallLight.pred, sz) - def runjsr = jsrarr.withFilter(ForallLight.predjsr).size == sz - def comparisonMap = collection.Map("jsr" -> runjsr _) -} - - - - - - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ForallQuickStop.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ForallQuickStop.scala deleted file mode 100644 index 624266e49d..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ForallQuickStop.scala +++ /dev/null @@ -1,46 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - -import scala.collection.parallel.benchmarks._ - - -object ForallQuickStop extends Companion { - def benchName = "forall-quickstop"; - def apply(sz: Int, parallelism: Int, what: String) = new ForallQuickStop(sz, parallelism, what) - override def defaultSize = 200000 - - val pred = (a: Cont) => a.in != 50 - val predjsr = new extra166y.Ops.Predicate[Cont] { - def op(a: Cont) = a.in != 50 - } -} - -class ForallQuickStop(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) -with HavingResult[Boolean] { - def companion = ForallQuickStop - - def runpar = runresult = pa.forall(ForallQuickStop.pred) - def runseq = runresult = sequentialForall(ForallQuickStop.pred, sz) - def comparisonMap = collection.Map() -} - - - - - - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ForallStop80k.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ForallStop80k.scala deleted file mode 100644 index c7462ed04b..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ForallStop80k.scala +++ /dev/null @@ -1,46 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - -import scala.collection.parallel.benchmarks._ - - -object ForallStop80k extends Companion { - def benchName = "forall-stop80k"; - def apply(sz: Int, parallelism: Int, what: String) = new ForallStop80k(sz, parallelism, what) - override def defaultSize = 100000 - - val pred = (a: Cont) => a.in != 80000 - val predjsr = new extra166y.Ops.Predicate[Cont] { - def op(a: Cont) = a.in != 80000 - } -} - -class ForallStop80k(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) -with HavingResult[Boolean] { - def companion = ForallStop80k - - def runpar = runresult = pa.forall(ForallStop80k.pred) - def runseq = runresult = sequentialForall(ForallStop80k.pred, sz) - def comparisonMap = collection.Map() -} - - - - - - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ForeachHeavy.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ForeachHeavy.scala deleted file mode 100644 index d1a3f8085c..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ForeachHeavy.scala +++ /dev/null @@ -1,45 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - - - -object ForeachHeavy extends Companion { - def benchName = "foreach-heavy"; - def apply(sz: Int, parallelism: Int, what: String) = new ForeachHeavy(sz, parallelism, what) - override def comparisons = List("jsr") - override def defaultSize = 2048 - - @volatile var z = 0 - - val fun = (a: Cont) => heavyOperation(a) - val funjsr = new extra166y.Ops.Procedure[Cont] { - def op(a: Cont) = heavyOperation(a) - } - - def heavyOperation(a: Cont) { - checkPrime(a.in + 1000000000) - } - - def checkPrime(n: Int) = { - var isPrime = true - var i = 2 - val until = 550 - while (i < until) { - if (n % i == 0) isPrime = false - i += 1 - } - if (isPrime && (n.toString == z)) z += 1 - isPrime - } -} - -class ForeachHeavy(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) { - def companion = ForeachHeavy - override def repetitionsPerRun = 250 - - def runpar = pa.pforeach(ForeachHeavy.fun) - def runseq = sequentialForeach(ForeachHeavy.fun, sz) - def runjsr = jsrarr.apply(ForeachHeavy.funjsr) - def comparisonMap = collection.Map("jsr" -> runjsr _) -} diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ForeachLight.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ForeachLight.scala deleted file mode 100644 index 3d0c5c45c4..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ForeachLight.scala +++ /dev/null @@ -1,26 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - - - -object ForeachLight extends Companion { - def benchName = "foreach-light"; - def apply(sz: Int, parallelism: Int, what: String) = new ForeachLight(sz, parallelism, what) - override def comparisons = List("jsr") - override def defaultSize = 200000 - - val fun = (a: Cont) => a.num = a.in - val funjsr = new extra166y.Ops.Procedure[Cont] { - def op(a: Cont) = a.num = a.in - } -} - -class ForeachLight(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) { - def companion = ForeachLight - - def runpar = pa.pforeach(ForeachLight.fun) - def runseq = sequentialForeach(ForeachLight.fun, sz) - def runjsr = jsrarr.apply(ForeachLight.funjsr) - def comparisonMap = collection.Map("jsr" -> runjsr _) -} diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/GroupBy.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/GroupBy.scala deleted file mode 100644 index a90227a6e4..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/GroupBy.scala +++ /dev/null @@ -1,45 +0,0 @@ -package scala.collection.parallel.benchmarks -package parallel_array - - - -object GroupByLight extends Companion { - def benchName = "groupby-light"; - def apply(sz: Int, parallelism: Int, what: String) = new GroupByLight(sz, parallelism, what) - override def comparisons = List() - override def defaultSize = 10000 - - val fun = (a: Cont) => a.in % 32 -} - - -class GroupByLight(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) -with HavingResult[Int] { - def companion = GroupByLight - runresult = -1 - - val array = new Array[Cont](sz) - for (i <- 0 until sz) array(i) = new Cont(i) - - def runpar = runresult = pa.groupBy(GroupByLight.fun).size - def runseq = runresult = array.asInstanceOf[Array[Cont]].groupBy(GroupByLight.fun).size - def comparisonMap = collection.Map() -} - - - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/IndexWhere.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/IndexWhere.scala deleted file mode 100644 index 3a22bdd1db..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/IndexWhere.scala +++ /dev/null @@ -1,47 +0,0 @@ -package scala.collection.parallel.benchmarks -package parallel_array - - - - - - - -class IndexWhere(sz: Int, p: Int, what: String) -extends Resettable[Cont](sz, p, what, (i: Int) => new Cont(i), new Array[Any](_), classOf[Cont]) -with HavingResult[Int] { - def companion = IndexWhere - override def repetitionsPerRun = 400 - - def runpar = runresult = pa.indexWhere(IndexWhere.pred2, 0) - def runseq = runresult = sequentialIndexWhere(IndexWhere.pred2, 0, sz) - override def comparisonMap = collection.Map() -} - -object IndexWhere extends Companion { - def benchName = "index-where"; - def apply(sz: Int, p: Int, what: String) = new IndexWhere(sz, p, what) - override def comparisons = List() - - val pred = (c: Cont) => { - var in = c.in - var i = 2 - while (i < 5) { - if (in % i == 0) in = 0 - i += 1 - } - c.in >= 0 && in == -1 - } - val pred2 = (c: Cont) => c.in == 280000 -} - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/IntersectHalf.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/IntersectHalf.scala deleted file mode 100644 index e429fb288e..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/IntersectHalf.scala +++ /dev/null @@ -1,48 +0,0 @@ -package scala.collection.parallel.benchmarks -package parallel_array - - - - - - - -class IntersectHalf(sz: Int, p: Int, what: String) -extends Resettable[Cont](sz, p, what, (i: Int) => new Cont(i), new Array[Any](_), classOf[Cont]) -with HavingResult[Int] { - def companion = IntersectHalf - override def repetitionsPerRun = 400 - - val similar = { - val p = new collection.parallel.mutable.ParArray[Cont](sz) - for (i <- 0 until sz) p(i) = what match { - case "seq" => arr(i).asInstanceOf[Cont] - case "par" => pa(i) - } - p.drop(p.size / 2) - } - - def runpar = runresult = pa.intersect(similar).size - def runseq = runresult = sequentialIntersect(similar, sz).size - override def comparisonMap = collection.Map() - - val corr = (a: Cont, b: Cont) => a.in == b.in -} - -object IntersectHalf extends Companion { - def benchName = "intersect-half"; - def apply(sz: Int, p: Int, what: String) = new IntersectHalf(sz, p, what) - override def comparisons = List() - override def defaultSize = 10000 -} - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/LastIndexWhere.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/LastIndexWhere.scala deleted file mode 100644 index 427afa5571..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/LastIndexWhere.scala +++ /dev/null @@ -1,47 +0,0 @@ -package scala.collection.parallel.benchmarks -package parallel_array - - - - - - - -class LastIndexWhere(sz: Int, p: Int, what: String) -extends Resettable[Cont](sz, p, what, (i: Int) => new Cont(i), new Array[Any](_), classOf[Cont]) -with HavingResult[Int] { - def companion = LastIndexWhere - override def repetitionsPerRun = 400 - - def runpar = runresult = pa.lastIndexWhere(LastIndexWhere.pred2, pa.size - 1) - def runseq = runresult = sequentialLastIndexWhere(LastIndexWhere.pred2, sz - 1, sz) - override def comparisonMap = collection.Map() -} - -object LastIndexWhere extends Companion { - def benchName = "last-index-where"; - def apply(sz: Int, p: Int, what: String) = new LastIndexWhere(sz, p, what) - override def comparisons = List() - - val pred = (c: Cont) => { - var in = c.in - var i = 2 - while (i < 5) { - if (in % i == 0) in = 0 - i += 1 - } - c.in >= 0 || in == 0 - } - val pred2 = (c: Cont) => c.in == 500 -} - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/MapLight.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/MapLight.scala deleted file mode 100644 index 1451f6a57a..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/MapLight.scala +++ /dev/null @@ -1,27 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - - - -object MapLight extends Companion { - def benchName = "map-light"; - def apply(sz: Int, parallelism: Int, what: String) = new MapLight(sz, parallelism, what) - override def comparisons = List("jsr") - override def defaultSize = 100000 - - def fun = (a: Cont) => { a } - def funjsr = new extra166y.Ops.Op[Cont, Cont] { - def op(a: Cont) = { a } - } -} - -class MapLight(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) { - def companion = MapLight - - def runpar = pa.map(MapLight.fun) - def runseq = sequentialMap(MapLight.fun, sz) -// def runseq = sequentialMapOpt(MapLight.fun, sz) - def runjsr = jsrarr.replaceWithMapping(MapLight.funjsr).all - def comparisonMap = collection.Map("jsr" -> runjsr _) -} diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/MatrixMultiplication.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/MatrixMultiplication.scala deleted file mode 100644 index 6d5b189c3a..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/MatrixMultiplication.scala +++ /dev/null @@ -1,84 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - - -import collection.parallel.immutable.ParRange - - -object MatrixMultiplication extends Companion { - def benchName = "matrix-mult"; - def apply(sz: Int, parallelism: Int, what: String) = new MatrixMultiplication(sz, parallelism, what) - override def comparisons = List() - override def defaultSize = 100 -} - -class MatrixMultiplication(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) { - def companion = MatrixMultiplication - collection.parallel.tasksupport.environment = forkjoinpool - - val a = Matrix.unit[Int](sz) - val b = Matrix.unit[Int](sz) - var c = new Matrix[Int](sz) - - def runpar = c = a * b //{ c.assignProduct(a, b) } //; println("--------"); c.output } - def runseq = throw new UnsupportedOperationException - def comparisonMap = collection.Map() - - class Matrix[T](n: Int)(implicit num: Numeric[T], tag: ClassTag[T]) { - val array = new Array[T](n * n) - - def apply(y: Int, x: Int) = array(y * n + x) - - def update(y: Int, x: Int, elem: T) = array(y * n + x) = elem - - def *(b: Matrix[T]) = { - val m = new Matrix[T](n) - m.assignProduct(this, b) - m - } - - def assignProduct(a: Matrix[T], b: Matrix[T]) = { - val range = ParRange(0, n * n, 1, false) - for (i <- range) this(i / n, i % n) = calcProduct(a, b, i / n, i % n); - } - - private def calcProduct(a: Matrix[T], b: Matrix[T], y: Int, x: Int): T = { - import num._ - var sum = zero - for (i <- 0 until n) sum += a(y, i) * b(i, x) - sum - } - - def output = for (y <- 0 until n) { - for (x <- 0 until n) print(this(y, x)) - println - } - } - - object Matrix { - def unit[T](n: Int)(implicit num: Numeric[T], tag: ClassTag[T]) = { - val m = new Matrix[T](n) - for (i <- 0 until n) m(i, i) = num.one - m - } - } - -} - - - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/MinLight.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/MinLight.scala deleted file mode 100644 index a51b5d6176..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/MinLight.scala +++ /dev/null @@ -1,28 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - - - - -/** Tests reduce method using an operator creating an object as a result. */ -class MinLight(sz: Int, p: Int, what: String) -extends Resettable[Int](sz, p, what, (i: Int) => i, new Array[Any](_), classOf[Int]) { - def companion = MinLight - override def repetitionsPerRun = 400 - - def runpar = pa.min(Ordering[Int]) - def runseq = sequentialMin(sz) - override def comparisonMap = collection.Map() -} - -object MinLight extends Companion { - def benchName = "min-light"; - def apply(sz: Int, p: Int, what: String) = new MinLight(sz, p, what) - override def comparisons = List() -} - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/PadToDouble.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/PadToDouble.scala deleted file mode 100644 index f8a985c349..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/PadToDouble.scala +++ /dev/null @@ -1,53 +0,0 @@ -package scala.collection.parallel.benchmarks -package parallel_array - - - - - - - -class PadToDouble(sz: Int, p: Int, what: String) -extends Resettable[Cont](sz, p, what, (i: Int) => new Cont(i), new Array[Any](_), classOf[Cont]) -with HavingResult[Int] { - def companion = PadToDouble - override def repetitionsPerRun = 400 - - val similar = { - val p = new collection.parallel.mutable.ParArray[Cont](sz) - for (i <- 0 until sz) p(i) = what match { - case "seq" => arr(i).asInstanceOf[Cont] - case "par" => pa(i) - } - p.drop(p.size / 2) - } - - def runpar = runresult = pa.padTo(size * 2, padder).size - def runseq = runresult = sequentialPadTo(size * 2, padder, size).size - override def comparisonMap = collection.Map() - - val padder = new Cont(0) -} - - -object PadToDouble extends Companion { - def benchName = "padto-double"; - def apply(sz: Int, p: Int, what: String) = new PadToDouble(sz, p, what) - override def comparisons = List() - override def defaultSize = 25000 -} - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/PartialMapLight.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/PartialMapLight.scala deleted file mode 100644 index 57f8536b9e..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/PartialMapLight.scala +++ /dev/null @@ -1,24 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - - - -object PartialMapLight extends Companion { - def benchName = "partmap-light"; - def apply(sz: Int, parallelism: Int, what: String) = new PartialMapLight(sz, parallelism, what) - override def comparisons = List() - override def defaultSize = 100000 - - def fun: PartialFunction[Cont, Cont] = { - case c: Cont if c.in >= 0 => c - } -} - -class PartialMapLight(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) { - def companion = PartialMapLight - - def runpar = pa.collect(PartialMapLight.fun) - def runseq = sequentialPartialMap(PartialMapLight.fun, sz) - def comparisonMap = collection.Map() -} diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/PartitionLight.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/PartitionLight.scala deleted file mode 100644 index b99a25b285..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/PartitionLight.scala +++ /dev/null @@ -1,61 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - -import scala.collection.parallel.benchmarks._ - - -object PartitionLight extends Companion { - def benchName = "partition-light"; - def apply(sz: Int, parallelism: Int, what: String) = new PartitionLight(sz, parallelism, what) - override def comparisons = Nil - override def defaultSize = 20000 - - val pred = (a: Cont) => check(a.in) - val predjsr = new extra166y.Ops.Predicate[Cont] { - def op(a: Cont) = check(a.in) - } - - def check(n: Int) = { - var res = n - var i = 1 - while (i < 5) { - res += n % i - i += 1 - } - (res % 2 == 0) && (res % 312 == 0) - } -} - -class PartitionLight(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) -with HavingResult[Int] { - def companion = PartitionLight - runresult = -1 - - def runpar = runresult = pa.partition(PartitionLight.pred)._1.size - def runseq = runresult = sequentialPartition(PartitionLight.pred, sz)._1.size - def comparisonMap = collection.Map() -} - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/PatchHalf.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/PatchHalf.scala deleted file mode 100644 index 55cc71f129..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/PatchHalf.scala +++ /dev/null @@ -1,46 +0,0 @@ -package scala.collection.parallel.benchmarks -package parallel_array - - - - - - - -class PatchHalf(sz: Int, p: Int, what: String) -extends Resettable[Cont](sz, p, what, (i: Int) => new Cont(i), new Array[Any](_), classOf[Cont]) -with HavingResult[Int] { - def companion = PatchHalf - override def repetitionsPerRun = 400 - - val similar = { - val p = new collection.parallel.mutable.ParArray[Cont](sz) - for (i <- 0 until sz) p(i) = what match { - case "seq" => arr(i).asInstanceOf[Cont] - case "par" => pa(i) - } - p.drop(p.size / 2) - } - - def runpar = runresult = pa.patch(size / 2, similar, 0).size - def runseq = runresult = sequentialPatch(size / 2, similar, 0, size).size - override def comparisonMap = collection.Map() -} - -object PatchHalf extends Companion { - def benchName = "patch-half"; - def apply(sz: Int, p: Int, what: String) = new PatchHalf(sz, p, what) - override def comparisons = List() - override def defaultSize = 25000 -} - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/PlusPlus.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/PlusPlus.scala deleted file mode 100644 index 2574621212..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/PlusPlus.scala +++ /dev/null @@ -1,29 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - -import scala.collection.parallel.mutable.ParArray - - -object PlusPlus extends Companion { - def benchName = "plusplus"; - def apply(sz: Int, parallelism: Int, what: String) = new PlusPlus(sz, parallelism, what) - override def comparisons = List() - override def defaultSize = 50000 -} - -class PlusPlus(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) { - def companion = PlusPlus - - val thatarr = new Array[Cont](sz) - val thatpa = new ParArray[Cont](sz) - - def runpar = pa ++ thatpa - def runseq = arr ++ thatarr - def comparisonMap = collection.Map() -} - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ReduceHeavy.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ReduceHeavy.scala deleted file mode 100644 index dd660ba8e0..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ReduceHeavy.scala +++ /dev/null @@ -1,22 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - - - -class ReduceHeavy(sz: Int, p: Int, what: String) -extends Resettable[Cont](sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) { - def companion = ReduceHeavy - override def repetitionsPerRun = 100 - - def runseq = sequentialReduce(Cont.opheavy, sz, new Cont(0)) - def runpar = pa.reduce(Cont.opheavy) - def runjsr = jsrarr.reduce(Cont.reducerheavy, new Cont(0)) - override def comparisonMap = collection.Map("jsr" -> runjsr _) -} - -object ReduceHeavy extends Companion { - def benchName = "reduce-heavy"; - def apply(sz: Int, p: Int, what: String) = new ReduceHeavy(sz, p, what) - override def comparisons = List("jsr") - override def defaultSize = 16 -} diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ReduceLight.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ReduceLight.scala deleted file mode 100644 index f1f2a32403..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ReduceLight.scala +++ /dev/null @@ -1,50 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - -import scala.collection.parallel.benchmarks._ -import scala.collection.parallel.mutable.ParArray -import extra166y.{ParallelArray => JSR166Array} - - -object ReduceLight extends Companion { - def benchName = "reduce-light"; - def apply(sz: Int, parallelism: Int, what: String) = new ReduceLight(sz, parallelism, what) - override def comparisons = List("jsr") - override def defaultSize = 200000 -} - - -class ReduceLight(sz: Int, p: Int, what: String) -extends Resettable[Cont](sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) { - def companion = ReduceLight - override def repetitionsPerRun = 350 - override val runs = 20 - - def runpar = { - pa.reduce(Cont.op) -// updatePar - } - - def runjsr = { - jsrarr.reduce(Cont.reducer, new Cont(0)) -// updateJsr - } - - def runseq = { - sequentialReduce(Cont.op, sz, new Cont(0)) -// updateSeq - } - - override def comparisonMap = collection.Map("jsr" -> runjsr _) - -} - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ReduceList.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ReduceList.scala deleted file mode 100644 index f095797d1c..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ReduceList.scala +++ /dev/null @@ -1,53 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - - - -object ReduceList extends Companion { - def benchName = "reduce-list"; - def apply(sz: Int, p: Int, what: String) = new ReduceList(sz, p, what) - override def comparisons = List("jsr") - override def defaultSize = 20000 -} - -object ListCreator extends (Int => List[Int]) { - def apply(idx: Int) = { - val len = 50 + idx % 100 - (for (i <- 0 until len) yield i).toList - } -} - -object ListOps { - val redop = (a: List[Int], b: List[Int]) => combineLists(a, b) - val reducer = new extra166y.Ops.Reducer[List[Int]] { - def op(a: List[Int], b: List[Int]) = combineLists(a, b) - } - def combineLists(a: List[Int], b: List[Int]) = { - if (a.foldLeft(0)(_ + _) > b.foldLeft(0)(_ + _)) a else b - } -} - -class ReduceList(sz: Int, p: Int, what: String) -extends Resettable[List[Int]](sz, p, what, ListCreator, new Array[Any](_), classOf[List[Int]]) { - def companion = ReduceList - override def repetitionsPerRun = 10 - override val runs = 15 - - def runpar = pa.reduce(ListOps.redop) - def runseq = sequentialReduce(ListOps.redop, sz, List[Int]()) - def runjsr = jsrarr.reduce(ListOps.reducer, List[Int]()) - override def comparisonMap = collection.Map("jsr" -> runjsr _) -} - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ReduceNew.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ReduceNew.scala deleted file mode 100644 index 1cf4f4169a..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ReduceNew.scala +++ /dev/null @@ -1,30 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - - - - -/** Tests reduce method using an operator creating an object as a result. */ -class ReduceNew(sz: Int, p: Int, what: String) -extends Resettable[Cont](sz, p, what, (i: Int) => new Cont(i), - new Array[Any](_), classOf[Cont]) { - def companion = ReduceNew - override def repetitionsPerRun = 200 - - def runpar = pa.reduce(Cont.opnew) - def runseq = sequentialReduce(Cont.opnew, sz, new Cont(0)) - def runjsr = jsrarr.reduce(Cont.reducernew, new Cont(0)) - override def comparisonMap = collection.Map("jsr" -> runjsr _) -} - -object ReduceNew extends Companion { - def benchName = "reduce-new"; - def apply(sz: Int, p: Int, what: String) = new ReduceNew(sz, p, what) - override def comparisons = List("jsr") -} - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ReducePrime.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ReducePrime.scala deleted file mode 100644 index 8fb90981ac..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ReducePrime.scala +++ /dev/null @@ -1,65 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - -import scala.collection.parallel.benchmarks._ - - -object IntWrapCreator extends (Int => IntWrap) { - def apply(idx: Int) = new IntWrap(shiftaround(idx)) - def shiftaround(idx: Int) = idx * 40192 + 717 -} - -case class IntWrap(val num: Int) - -object IntOps { - val op = (a: IntWrap, b: IntWrap) => primereduce(a, b) - val reducer = new extra166y.Ops.Reducer[IntWrap] { - def op(a: IntWrap, b: IntWrap) = primereduce(a, b) - } - - def primereduce(a: IntWrap, b: IntWrap) = { - val check = (checkPrime(a.num), checkPrime(b.num)) - if (a.num > b.num) a else b - } - - def checkPrime(n: Int) = { - var isPrime = true - var i = 2 - val until = scala.math.sqrt(n).toInt + 1 - while (i < until) { - if (n % i == 0) isPrime = false - i += 1 - } - isPrime - } -} - -class ReducePrime(sz: Int, p: Int, what: String) -extends Resettable[IntWrap](sz, p, what, IntWrapCreator, new Array[Any](_), classOf[IntWrap]) -with HavingResult[IntWrap] { - def companion = ReducePrime - - def runseq = runresult = sequentialReduce(IntOps.op, sz, new IntWrap(0)) - def runpar = runresult = pa.reduce(IntOps.op) - def runjsr = runresult = jsrarr.reduce(IntOps.reducer, new IntWrap(0)) - override def comparisonMap = collection.Map("jsr" -> runjsr _) -} - -object ReducePrime extends Companion { - def benchName = "reduce-prime"; - def apply(sz: Int, p: Int, what: String) = new ReducePrime(sz, p, what) - override def comparisons = List("jsr") - override def defaultSize = 100 -} - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/RemoveDuplicates.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/RemoveDuplicates.scala deleted file mode 100644 index feb1bd9466..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/RemoveDuplicates.scala +++ /dev/null @@ -1,44 +0,0 @@ -package scala.collection.parallel.benchmarks -package parallel_array - - - - - - - -class RemoveDuplicates(sz: Int, p: Int, what: String) -extends Resettable[Cont](sz, p, what, (i: Int) => new Cont(i), new Array[Any](_), classOf[Cont]) -with HavingResult[Int] { - def companion = RemoveDuplicates - override def repetitionsPerRun = 400 - - def runpar = runresult = pa.distinct.size - def runseq = runresult = sequentialRemoveDuplicates(size).size - override def comparisonMap = collection.Map() -} - -object RemoveDuplicates extends Companion { - def benchName = "remove-duplicates"; - def apply(sz: Int, p: Int, what: String) = new RemoveDuplicates(sz, p, what) - override def comparisons = List() - override def defaultSize = 10000 -} - - - - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/Resettable.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/Resettable.scala deleted file mode 100644 index b4403fcb9c..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/Resettable.scala +++ /dev/null @@ -1,127 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - -import scala.collection.parallel.benchmarks._ -import scala.collection.parallel.mutable.ParArray -import extra166y.{ParallelArray => JSR166Array} - - -class Cont(val in: Int) { - var num = in - override def toString = in.toString -} - -object Cont { - val pred = (a: Cont) => a.in > 100 - - val predjsr = new extra166y.Ops.Predicate[Cont] { - def op(a: Cont) = a.in > 100 - } - - val op = (a: Cont, b: Cont) => { - b.num = a.in + b.in - b - } - - val opnew = (a: Cont, b: Cont) => new Cont(a.in + b.in) - - val opheavy = (a: Cont, b: Cont) => { - heavyComputation(a, b) - } - - val reducer = new extra166y.Ops.Reducer[Cont] { - def op(a: Cont, b: Cont) = { - b.num = a.in + b.in - b - } - } - - val reducernew = new extra166y.Ops.Reducer[Cont] { - def op(a: Cont, b: Cont) = new Cont(a.in + b.in) - } - - val reducerheavy = new extra166y.Ops.Reducer[Cont] { - def op(a: Cont, b: Cont) = heavyComputation(a, b) - } - - def heavyComputation(a: Cont, b: Cont) = { - val f = a.in - val s = b.in - var i = 0 - var res = f * s - while (i < 50000) { - if ((i + f) % 3 == 0) res += s - else res -= f - i += 1 - } - b.num = res - b - } -} - -abstract class Resettable[T](val size: Int, val parallelism: Int, val runWhat: String, - elemcreator: Int => T, arrcreator: Int => Array[Any], cls: Class[T]) -extends Bench with SequentialOps[T] { - val forkjoinpool = new scala.concurrent.forkjoin.ForkJoinPool(parallelism) - forkjoinpool.setMaximumPoolSize(parallelism) - val papool = new jsr166y.ForkJoinPool(parallelism) - papool.setMaximumPoolSize(parallelism) - - var pa: ParArray[T] = null - var jsrarr: JSR166Array[T] = null - reset - - def reset = runWhat match { - case "seq" => - arr = arrcreator(size) - for (i <- 0 until size) arr(i) = elemcreator(i) - case "par" => - pa = new ParArray[T](size) - collection.parallel.tasksupport.environment = forkjoinpool - for (i <- 0 until size) pa(i) = elemcreator(i) - case "jsr" => - jsrarr = JSR166Array.create(size, cls, papool) - for (i <- 0 until size) jsrarr.set(i, elemcreator(i)) - case _ => throw new IllegalArgumentException("Unknown type: " + runWhat) - } - - var updateCounter = 0 - def incUpdateCounter { - updateCounter += 1 - if (updateCounter > size) updateCounter = 0 - } - - def updateSeq { - val tmp = arr(updateCounter) - arr(updateCounter) = arr(size - updateCounter - 1) - arr(size - updateCounter - 1) = tmp - incUpdateCounter - } - - def updatePar { - val tmp = pa(updateCounter) - pa(updateCounter) = pa(size - updateCounter - 1) - pa(size - updateCounter - 1) = tmp - incUpdateCounter - } - - def updateJsr { - val tmp = jsrarr.get(updateCounter) - jsrarr.set(updateCounter, jsrarr.get(size - updateCounter - 1)) - jsrarr.set(size - updateCounter - 1, tmp) - incUpdateCounter - } - - override def printResults { - println(" --- Fork join pool state --- ") - println("Parallelism: " + forkjoinpool.getParallelism) - println("Active threads: " + forkjoinpool.getActiveThreadCount) - println("Work stealings: " + forkjoinpool.getStealCount) - } -} - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/Reverse.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/Reverse.scala deleted file mode 100644 index ec690d4b2d..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/Reverse.scala +++ /dev/null @@ -1,35 +0,0 @@ -package scala.collection.parallel.benchmarks -package parallel_array - - - - - - - -class Reverse(sz: Int, p: Int, what: String) -extends Resettable[Cont](sz, p, what, (i: Int) => new Cont(i), new Array[Any](_), classOf[Cont]) { - def companion = Reverse - override def repetitionsPerRun = 400 - - def runpar = pa.reverse - def runseq = sequentialReverse(sz) - override def comparisonMap = collection.Map() -} - -object Reverse extends Companion { - def benchName = "reverse"; - def apply(sz: Int, p: Int, what: String) = new Reverse(sz, p, what) - override def comparisons = List() -} - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ReverseMap.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ReverseMap.scala deleted file mode 100644 index 47ae108c45..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ReverseMap.scala +++ /dev/null @@ -1,48 +0,0 @@ -package scala.collection.parallel.benchmarks -package parallel_array - - - - - - - -class ReverseMap(sz: Int, p: Int, what: String) -extends Resettable[Cont](sz, p, what, (i: Int) => new Cont(i), new Array[Any](_), classOf[Cont]) { - def companion = ReverseMap - override def repetitionsPerRun = 100 - - def runpar = pa.reverseMap(compl) - def runseq = sequentialReverseMap(compl, sz) - override def comparisonMap = collection.Map() - - val id = (c: Cont) => c - val compl = (c: Cont) => { - var in = c.in - var i = 2 - while (i < 6) { - if (in % i == 0) in = 0 - i += 1 - } - if (in < 0) null - else c - } -} - -object ReverseMap extends Companion { - def benchName = "reverse-map"; - def apply(sz: Int, p: Int, what: String) = new ReverseMap(sz, p, what) - override def comparisons = List() - override def defaultSize = 100000 -} - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SameElementsLong.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SameElementsLong.scala deleted file mode 100644 index d22c4df661..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SameElementsLong.scala +++ /dev/null @@ -1,45 +0,0 @@ -package scala.collection.parallel.benchmarks -package parallel_array - - - - - - - -class SameElementsLong(sz: Int, p: Int, what: String) -extends Resettable[Cont](sz, p, what, (i: Int) => new Cont(i), new Array[Any](_), classOf[Cont]) -with HavingResult[Boolean] { - def companion = SameElementsLong - override def repetitionsPerRun = 400 - - val same = { - val p = new collection.parallel.mutable.ParArray[Cont](sz) - for (i <- 0 until sz) p(i) = what match { - case "seq" => arr(i).asInstanceOf[Cont] - case "par" => pa(i) - } - p - } - - def runpar = runresult = pa.sameElements(same) - def runseq = runresult = sequentialSameElements(same, sz) - override def comparisonMap = collection.Map() -} - -object SameElementsLong extends Companion { - def benchName = "same-elements-long"; - def apply(sz: Int, p: Int, what: String) = new SameElementsLong(sz, p, what) - override def comparisons = List() -} - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ScanLight.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ScanLight.scala deleted file mode 100644 index d0ddf9f70e..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ScanLight.scala +++ /dev/null @@ -1,46 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - -import scala.collection.parallel.benchmarks._ -import scala.collection.parallel.mutable.ParArray - - -object ScanLight extends Companion { - def benchName = "scan-light"; - def apply(sz: Int, parallelism: Int, what: String) = new ScanLight(sz, parallelism, what) - override def comparisons = List("jsr") - override def defaultSize = 40000 - - val op = (a: Cont, b: Cont) => { - operation(a, b) - } - def operation(a: Cont, b: Cont) = { - val m = if (a.in < 0) 1 else 0 - new Cont(a.in + b.in + m * (0 until 2).reduceLeft(_ + _)) - } -} - - -class ScanLight(sz: Int, p: Int, what: String) -extends Resettable[Cont](sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) { - def companion = ScanLight - override def repetitionsPerRun = 50 - override val runs = 12 - - def runpar = pa.scan(new Cont(0))(ScanLight.op) - def runseq = sequentialScan(new Cont(0), ScanLight.op, sz) - def runjsr = jsrarr.cumulate(new extra166y.Ops.Reducer[Cont] { - def op(a: Cont, b: Cont) = ScanLight.operation(a, b) - }, new Cont(0)) - override def comparisonMap = collection.Map("jsr" -> runjsr _) -} - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ScanMedium.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ScanMedium.scala deleted file mode 100644 index a60ba7aa33..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/ScanMedium.scala +++ /dev/null @@ -1,55 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - -import scala.collection.parallel.benchmarks._ -import scala.collection.parallel.mutable.ParArray - - -object ScanMedium extends Companion { - def benchName = "scan-medium"; - def apply(sz: Int, parallelism: Int, what: String) = new ScanMedium(sz, parallelism, what) - override def comparisons = List("jsr") - override def defaultSize = 5000 - - val op = (a: Cont, b: Cont) => { - operation(a, b) - } - def operation(a: Cont, b: Cont) = { - val m = if (a.in < 0) 1 else 0 - val k = calc(a.in, b.in, m) - new Cont(a.in + b.in + k * m * (0 until 2).reduceLeft(_ + _)) - } - private def calc(x: Int, y: Int, n: Int) = { - var sum = x - for (i <- 0 until 500) { - sum += y + (if (sum % 2 == 0) n * x else y) - if (sum % 5 == 0) sum -= x * y - n * (x + y) - } - sum - } -} - - -class ScanMedium(sz: Int, p: Int, what: String) -extends Resettable[Cont](sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) { - def companion = ScanMedium - override def repetitionsPerRun = 50 - override val runs = 12 - - def runpar = pa.scan(new Cont(0))(ScanMedium.op) - def runseq = sequentialScan(new Cont(0), ScanMedium.op, sz) - def runjsr = jsrarr.cumulate(new extra166y.Ops.Reducer[Cont] { - def op(a: Cont, b: Cont) = ScanMedium.operation(a, b) - }, new Cont(0)) - override def comparisonMap = collection.Map("jsr" -> runjsr _) -} - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SegmentLength.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SegmentLength.scala deleted file mode 100644 index 8fae899b45..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SegmentLength.scala +++ /dev/null @@ -1,42 +0,0 @@ -package scala.collection.parallel.benchmarks -package parallel_array - - - - - - - -class SegmentLength(sz: Int, p: Int, what: String) -extends Resettable[Cont](sz, p, what, (i: Int) => new Cont(i), new Array[Any](_), classOf[Cont]) -with HavingResult[Int] { - def companion = SegmentLength - override def repetitionsPerRun = 400 - - def runpar = runresult = pa.segmentLength(SegmentLength.pred2, 0) - def runseq = runresult = sequentialSegmentLength(SegmentLength.pred2, 0, sz) - override def comparisonMap = collection.Map() -} - -object SegmentLength extends Companion { - def benchName = "segment-length"; - def apply(sz: Int, p: Int, what: String) = new SegmentLength(sz, p, what) - override def comparisons = List() - - val pred = (c: Cont) => { - var in = c.in - var i = 2 - while (i < 5) { - if (in % i == 0) in = 0 - i += 1 - } - c.in >= 0 || in == 0 - } - val pred2 = (c: Cont) => c.in >= 0 -} - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SequentialOps.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SequentialOps.scala deleted file mode 100644 index 9300851b5f..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SequentialOps.scala +++ /dev/null @@ -1,562 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - - -trait SequentialOps[T] { - - var arr: Array[Any] = null - - def sequentialReduce(op: (T, T) => T, sz: Int, init: T) = { - var i = 0 - val until = sz - var sum = init - while (i < until) { - sum = op(sum, arr(i).asInstanceOf[T]) - i += 1 - } - sum - } - - def sequentialScan(z: T, op: (T, T) => T, sz: Int) = { - var outarr = new Array[Any](sz + 1) - outarr(0) = z - var last = z - var i = 0 - var j = 1 - val until = sz - while (i < until) { - last = op(last, arr(i).asInstanceOf[T]) - outarr(j) = last - i += 1 - j += 1 - } - } - - def sequentialCount(pred: T => Boolean, sz: Int) = { - var i = 0 - val until = sz - var sum = 0 - while (i < until) { - if (pred(arr(i).asInstanceOf[T])) sum += 1 - i += 1 - } - sum - } - - def sequentialForeach[U](f: T => U, sz: Int) = { - var i = 0 - val until = sz - var sum = 0 - while (i < until) { - f(arr(i).asInstanceOf[T]) - i += 1 - } - } - - def sequentialSum[U >: T](sz: Int)(implicit num: Numeric[U]) = { - var i = 0 - val until = sz - var sum = num.zero - while (i < until) { - sum = num.plus(sum, arr(i).asInstanceOf[T]) - i += 1 - } - sum - } - - def sequentialMin[U >: T](sz: Int)(implicit ord: Ordering[U]) = { - var i = 1 - val until = sz - var min = arr(0).asInstanceOf[U] - while (i < until) { - val elem = arr(i).asInstanceOf[U] - if (ord.lt(elem, min)) min = elem - i += 1 - } - min - } - - def sequentialForall(pred: T => Boolean, sz: Int) = { - var i = 0 - val until = sz - var all = true - while (i < until) { - if (pred(arr(i).asInstanceOf[T])) i += 1 - else { - all = false - i = until - } - } - all - } - - def sequentialExists(pred: T => Boolean, sz: Int) = { - var i = 0 - val until = sz - var some = false - while (i < until) { - if (pred(arr(i).asInstanceOf[T])) { - some = true - i = until - } else i += 1 - } - some - } - - def sequentialFind(pred: T => Boolean, sz: Int) = { - var i = 0 - val until = sz - var opt: Option[T] = None - while (i < until) { - if (pred(arr(i).asInstanceOf[T])) { - opt = Some(arr(i).asInstanceOf[T]) - i = until - } else i += 1 - } - opt - } - - def sequentialFilter(pred: T => Boolean, sz: Int) = { - var i = 0 - val buff = new collection.mutable.ArrayBuffer[T] - while (i < sz) { - val elem = arr(i).asInstanceOf[T] - if (pred(elem)) buff += elem - i += 1 - } - val resarr = new Array[Any](buff.size) - buff.copyToArray(resarr, 0) - resarr - } - - def sequentialPartition(pred: T => Boolean, sz: Int) = { - var i = 0 - val btrue = new collection.mutable.ArrayBuffer[T] - val bfalse = new collection.mutable.ArrayBuffer[T] - while (i < sz) { - val elem = arr(i).asInstanceOf[T] - if (pred(elem)) btrue += elem - else bfalse += elem - i += 1 - } - val restrue = new Array[Any](btrue.size) - val resfalse = new Array[Any](bfalse.size) - btrue.copyToArray(restrue, 0) - bfalse.copyToArray(resfalse, 0) - (restrue, resfalse) - } - - def sequentialTakeOpt(n: Int, sz: Int) = { - var i = 0 - val until = if (n < sz) n else sz - val res = new Array[Any](until) - Array.copy(arr, 0, res, 0, until) -// while (i < until) { -// res(i) = arr(i) -// i += 1 -// } - res - } - - def sequentialTake(n: Int, sz: Int) = { - var i = 0 - val b = new collection.mutable.ArrayBuffer[T] - val until = if (n < sz) n else sz - b.sizeHint(until) - while (i < until) { - val elem = arr(i).asInstanceOf[T] - b += elem - i += 1 - } - val res = new Array[Any](n) - b.copyToArray(res, 0) - res - } - - def sequentialDrop(n: Int, sz: Int) = { - var i = n - val b = new collection.mutable.ArrayBuffer[T] - b.sizeHint(sz - n) - while (i < sz) { - val elem = arr(i).asInstanceOf[T] - b += elem - i += 1 - } - val res = new Array[Any](n) - b.copyToArray(res, 0) - res - } - - def sequentialSlice(from: Int, until: Int, sz: Int) = { - var i = from - val b = new collection.mutable.ArrayBuffer[T] - b.sizeHint(until - from) - while (i < until) { - val elem = arr(i).asInstanceOf[T] - b += elem - i += 1 - } - val res = new Array[Any](until - from) - b.copyToArray(res, 0) - res - } - - def sequentialSplitAtOpt(n: Int, sz: Int) = { - var i = 0 - val before = new Array[Any](n) - val after = new Array[Any](sz - n) - Array.copy(arr, 0, before, 0, n) - Array.copy(arr, n, after, 0, sz - n) - (before, after) - } - - def sequentialSplitAt(n: Int, sz: Int) = { - var i = 0 - val before = new collection.mutable.ArrayBuffer[T] - before.sizeHint(n) - val after = new collection.mutable.ArrayBuffer[T] - after.sizeHint(sz - n) - while (i < sz) { - if (i < n) before += arr(i).asInstanceOf[T] - else after += arr(i).asInstanceOf[T] - i += 1 - } - val resbef = new Array[Any](n) - val resaft = new Array[Any](sz - n) - before.copyToArray(resbef, 0) - after.copyToArray(resaft, 0) - (resbef, resaft) - } - - def sequentialTakeWhile(p: T => Boolean, sz: Int) = { - var i = 0 - val b = new collection.mutable.ArrayBuffer[T] - while (i < sz) { - val elem = arr(i).asInstanceOf[T] - if (p(elem)) { - b += elem - i += 1 - } else i = sz - } - val res = new Array[Any](sz) - b.copyToArray(res, 0) - res - } - - def sequentialSpan(p: T => Boolean, sz: Int) = { - val bpref = new collection.mutable.ArrayBuffer[T] - val brest = new collection.mutable.ArrayBuffer[T] - var i = 0 - var prefix = true - var pos = sz - while (i < sz) { - val elem = arr(i).asInstanceOf[T] - if (prefix) { - if (p(elem)) bpref += elem - else { - pos = i - prefix = false - brest += elem - } - } else brest += elem - i += 1 - } - val respref = new Array[Any](pos) - val resrest = new Array[Any](sz - pos) - bpref.copyToArray(respref, 0) - brest.copyToArray(resrest, 0) - (respref, resrest) - } - - def sequentialMap(f: T => T, sz: Int) = { - val b = new collection.mutable.ArrayBuffer[T](sz) - - var i = 0 - while (i < sz) { - b += f(arr(i).asInstanceOf[T]) - i += 1 - } - - val res = new Array[Any](sz) - b.copyToArray(res, 0) - res - } - - def sequentialMapOpt(f: T => T, sz: Int) = { - val res = new Array[Any](sz) - - var i = 0 - while (i < sz) { - res(i) = f(arr(i).asInstanceOf[T]) - i += 1 - } - - res - } - - def sequentialPartialMap(f: PartialFunction[T, T], sz: Int) = { - val b = new collection.mutable.ArrayBuffer[T](sz) - - var i = 0 - while (i < sz) { - val elem = arr(i).asInstanceOf[T] - if (f.isDefinedAt(elem)) b += f(elem) - i += 1 - } - - val res = new Array[Any](b.size) - b.copyToArray(res, 0) - res - } - - def sequentialFlatMap(f: T => Traversable[Int], sz: Int) = { - val b = new collection.mutable.ArrayBuffer[Int](sz) - - var i = 0 - while (i < sz) { - val ts = f(arr(i).asInstanceOf[T]) - for (elem <- ts) b += elem - i += 1 - } - - val res = new Array[Any](b.size) - b.copyToArray(res, 0) - res - } - - def sequentialCopyToArray(destarr: Array[Any], pos: Int, sz: Int) = { - Array.copy(arr, 0, destarr, pos, sz) - } - - def sequentialSegmentLength(pred: T => Boolean, from: Int, sz: Int) = { - var i = from - var cnt = 0 - - while (i < sz) { - if (pred(arr(i).asInstanceOf[T])) { - cnt += 1 - i += 1 - } else i = sz - } - - cnt - } - - def sequentialIndexWhere(pred: T => Boolean, from: Int, sz: Int) = { - var i = from - var pos = -1 - - while (i < sz) { - if (pred(arr(i).asInstanceOf[T])) { - pos = i - i = sz - } else i += 1 - } - - pos - } - - def sequentialLastIndexWhere(pred: T => Boolean, end: Int, sz: Int) = { - var i = end - var pos = -1 - - while (i >= 0) { - if (pred(arr(i).asInstanceOf[T])) { - pos = i - i = -1 - } else i -= 1 - } - - pos - } - - def sequentialReverse(sz: Int) = { - val res = new Array[Any](sz) - - var i = sz - 1 - var j = 0 - while (i >= 0) { - res(j) = arr(i) - i -= 1 - j += 1 - } - res - } - - def sequentialReverseMap(f: T => T, sz: Int) = { - val res = new Array[Any](sz) - - var i = sz - 1 - var j = 0 - while (i >= 0) { - res(j) = f(arr(i).asInstanceOf[T]) - i -= 1 - j += 1 - } - res - } - - def sequentialSameElements(sq: Seq[T], sz: Int): Boolean = { - if (sz != sq.length) false - else { - var i = 0 - val jt = sq.iterator - while (i < sz) { - if (arr(i) == jt.next) i += 1 - else i = sz + 1 - } - if (i == sz) true - else false - } - } - - def sequentialCorresponds(sq: Seq[T], f: (T, T) => Boolean, sz: Int): Boolean = { - if (sz != sq.length) false - else { - var i = 0 - val jt = sq.iterator - while (i < sz) { - if (f(arr(i).asInstanceOf[T], jt.next)) i += 1 - else i = sz + 1 - } - if (i == sz) true - else false - } - } - - def sequentialDiff(sq: Seq[T], sz: Int) = { - val occmap = occurrences(sq) - val b = new collection.mutable.ArrayBuffer[T] - - var i = 0 - while (i < sz) { - val elem = arr(i).asInstanceOf[T] - if (occmap(elem) == 0) b += elem - else occmap(elem) -= 1 - i += 1 - } - - val res = new Array[Any](b.size) - b.copyToArray(res, 0) - res - } - - def sequentialIntersect(sq: Seq[T], sz: Int) = { - val occmap = occurrences(sq) - val b = new collection.mutable.ArrayBuffer[T] - - var i = 0 - while (i < sz) { - val elem = arr(i).asInstanceOf[T] - val num = occmap(elem) - if (num > 0) { - b += elem - occmap(elem) = num - 1 - } - i += 1 - } - - val res = new Array[Any](b.size) - b.copyToArray(res, 0) - res - } - - private def occurrences(sq: Seq[T]) = { - val occmap = new collection.mutable.HashMap[T, Int] { override def default(k: T) = 0 } - for (elem <- sq.iterator) occmap(elem) += 1 - occmap - } - - def sequentialRemoveDuplicates(sz: Int) = { - val occ = new collection.mutable.HashSet[T] - val b = new collection.mutable.ArrayBuffer[T] - - var i = 0 - while (i < sz) { - val elem = arr(i).asInstanceOf[T] - if (!occ.contains(elem)) { - b += elem - occ.add(elem) - } - i += 1 - } - - val res = new Array[Any](b.size) - b.copyToArray(res, 0) - res - } - - def sequentialPatch(from: Int, p: Seq[T], replaced: Int, sz: Int) = { - val b = new collection.mutable.ArrayBuffer[T] - b.sizeHint(from + (sz - from - replaced) + p.size) - - var i = 0 - while (i < from) { - b += arr(i).asInstanceOf[T] - i += 1 - } - - val jt = p.iterator - while (jt.hasNext) b += jt.next - - val skipto = from + replaced - while (i < from + replaced) i += 1 - - while (i < sz) { - b += arr(i).asInstanceOf[T] - i += 1 - } - - val res = new Array[Any](b.size) - b.copyToArray(res, 0) - res - } - - def sequentialPadTo(tosize: Int, elem: T, sz: Int) = { - val b = new collection.mutable.ArrayBuffer[T] - b.sizeHint(tosize) - - var i = 0 - while (i < sz) { - b += arr(i).asInstanceOf[T] - i += 1 - } - - while (i < tosize) { - b += elem - i += 1 - } - - val res = new Array[Any](b.size) - b.copyToArray(res, 0) - res - } - -} - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SliceFew.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SliceFew.scala deleted file mode 100644 index 450d640b8d..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SliceFew.scala +++ /dev/null @@ -1,47 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - -import scala.collection.parallel.benchmarks._ - - -object SliceFew extends Companion { - def benchName = "slice-few"; - def apply(sz: Int, parallelism: Int, what: String) = new SliceFew(sz, parallelism, what) - override def comparisons = Nil - override def defaultSize = 50000 -} - -class SliceFew(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) -with HavingResult[Int] { - def companion = SliceFew - override def repetitionsPerRun = 200 - runresult = -1 - - def runpar = runresult = pa.slice(5, 25).size - def runseq = runresult = sequentialSlice(5, 25, sz).size - def comparisonMap = collection.Map() -} - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SliceMany.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SliceMany.scala deleted file mode 100644 index 4a30b60e1f..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SliceMany.scala +++ /dev/null @@ -1,47 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - -import scala.collection.parallel.benchmarks._ - - -object SliceMany extends Companion { - def benchName = "slice-many"; - def apply(sz: Int, parallelism: Int, what: String) = new SliceMany(sz, parallelism, what) - override def comparisons = Nil - override def defaultSize = 50000 -} - -class SliceMany(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) -with HavingResult[Int] { - def companion = SliceMany - override def repetitionsPerRun = 200 - runresult = -1 - - def runpar = runresult = pa.slice(pa.size / 4, pa.size * 3 / 4).size - def runseq = runresult = sequentialSlice(sz / 4, sz * 3 / 4, sz).size - def comparisonMap = collection.Map() -} - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SliceMedium.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SliceMedium.scala deleted file mode 100644 index e16002f15d..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SliceMedium.scala +++ /dev/null @@ -1,47 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - -import scala.collection.parallel.benchmarks._ - - -object SliceMedium extends Companion { - def benchName = "slice-medium"; - def apply(sz: Int, parallelism: Int, what: String) = new SliceMedium(sz, parallelism, what) - override def comparisons = Nil - override def defaultSize = 50000 -} - -class SliceMedium(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) -with HavingResult[Int] { - def companion = SliceMedium - override def repetitionsPerRun = 200 - runresult = -1 - - def runpar = runresult = pa.slice(pa.size / 7, pa.size * 4 / 7).size - def runseq = runresult = sequentialSlice(sz / 7, sz * 4 / 7, sz).size - def comparisonMap = collection.Map() -} - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SpanLight.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SpanLight.scala deleted file mode 100644 index 5f1e631bce..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SpanLight.scala +++ /dev/null @@ -1,62 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - -import scala.collection.parallel.benchmarks._ - - -object SpanLight extends Companion { - def benchName = "span-light"; - def apply(sz: Int, parallelism: Int, what: String) = new SpanLight(sz, parallelism, what) - override def comparisons = Nil - override def defaultSize = 20000 - - val pred = (a: Cont) => check(a.in) - val predjsr = new extra166y.Ops.Predicate[Cont] { - def op(a: Cont) = check(a.in) - } - - def check(n: Int) = { - var res = n - var i = 1 - while (i < 10) { - res += n % i - i += 1 - } - if (n != 10000) res % 2 == 0 || n != 10000 - else false - } -} - -class SpanLight(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) -with HavingResult[Int] { - def companion = SpanLight - runresult = -1 - - def runpar = runresult = pa.span(SpanLight.pred)._1.size - def runseq = runresult = sequentialSpan(SpanLight.pred, sz)._1.size - def comparisonMap = collection.Map() -} - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SplitHalf.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SplitHalf.scala deleted file mode 100644 index ff1e009481..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SplitHalf.scala +++ /dev/null @@ -1,47 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - -import scala.collection.parallel.benchmarks._ - - -object SplitHalf extends Companion { - def benchName = "split-half"; - def apply(sz: Int, parallelism: Int, what: String) = new SplitHalf(sz, parallelism, what) - override def comparisons = Nil - override def defaultSize = 50000 -} - -class SplitHalf(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) -with HavingResult[Int] { - def companion = SplitHalf - override def repetitionsPerRun = 300 - runresult = -1 - - def runpar = runresult = pa.splitAt(pa.size / 2)._1.size - def runseq = runresult = sequentialSplitAtOpt(sz / 2, sz)._1.size - def comparisonMap = collection.Map() -} - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SumLight.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SumLight.scala deleted file mode 100644 index 6ed6d14370..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/SumLight.scala +++ /dev/null @@ -1,28 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - - - - -/** Tests reduce method using an operator creating an object as a result. */ -class SumLight(sz: Int, p: Int, what: String) -extends Resettable[Int](sz, p, what, (i: Int) => i, new Array[Any](_), classOf[Int]) { - def companion = SumLight - override def repetitionsPerRun = 500 - - def runpar = pa.sum - def runseq = sequentialSum(sz) - override def comparisonMap = collection.Map() -} - -object SumLight extends Companion { - def benchName = "sum-light"; - def apply(sz: Int, p: Int, what: String) = new SumLight(sz, p, what) - override def comparisons = List() -} - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/TakeMany.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/TakeMany.scala deleted file mode 100644 index 9ddfb77a9d..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/TakeMany.scala +++ /dev/null @@ -1,47 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - -import scala.collection.parallel.benchmarks._ - - -object TakeMany extends Companion { - def benchName = "take-many"; - def apply(sz: Int, parallelism: Int, what: String) = new TakeMany(sz, parallelism, what) - override def comparisons = Nil - override def defaultSize = 250000 -} - -class TakeMany(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) -with HavingResult[Int] { - def companion = TakeMany - override def repetitionsPerRun = 400 - runresult = -1 - - def runpar = runresult = pa.take(pa.size / 2).size - def runseq = runresult = sequentialTake(sz / 2, sz).size - def comparisonMap = collection.Map() -} - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/TakeWhileLight.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/TakeWhileLight.scala deleted file mode 100644 index a86c67d0d8..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_array/TakeWhileLight.scala +++ /dev/null @@ -1,61 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_array - - -import scala.collection.parallel.benchmarks._ - - -object TakeWhileLight extends Companion { - def benchName = "takewhile-light"; - def apply(sz: Int, parallelism: Int, what: String) = new TakeWhileLight(sz, parallelism, what) - override def comparisons = Nil - override def defaultSize = 10000 - - val pred = (a: Cont) => check(a.in) - val predjsr = new extra166y.Ops.Predicate[Cont] { - def op(a: Cont) = check(a.in) - } - - def check(n: Int) = { - var res = n - var i = 1 - while (i < 10) { - res += n % i - i += 1 - } - res % 2 == 0 || n > 0 - } -} - -class TakeWhileLight(sz: Int, p: Int, what: String) -extends Resettable(sz, p, what, new Cont(_), new Array[Any](_), classOf[Cont]) -with HavingResult[Int] { - def companion = TakeWhileLight - runresult = -1 - - def runpar = runresult = pa.takeWhile(TakeWhileLight.pred).size - def runseq = runresult = sequentialTakeWhile(TakeWhileLight.pred, sz).size - def comparisonMap = collection.Map() -} - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_range/RangeBenches.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_range/RangeBenches.scala deleted file mode 100644 index af852ce992..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_range/RangeBenches.scala +++ /dev/null @@ -1,211 +0,0 @@ -package scala.collection.parallel.benchmarks.parallel_range - - - - - -import scala.collection.parallel.benchmarks.generic._ -import scala.collection.parallel.immutable.ParRange -import scala.collection.parallel.benchmarks.generic.StandardParIterableBenches - - - - - -object RangeBenches extends StandardParIterableBenches[Int, ParRange] { - - def nameOfCollection = "ParRange" - def operators = new IntOperators {} - def comparisonMap = collection.Map() - val forkJoinPool = new scala.concurrent.forkjoin.ForkJoinPool - def createSequential(sz: Int, p: Int) = new collection.immutable.Range(0, sz, 1) - def createParallel(sz: Int, p: Int) = { - val pr = collection.parallel.immutable.ParRange(0, sz, 1, false) - forkJoinPool.setParallelism(p) - collection.parallel.tasksupport.environment = forkJoinPool - pr - } - - object MapLight extends IterableBenchCompanion { - override def defaultSize = 20000 - def benchName = "map-light"; - def apply(sz: Int, p: Int, w: String) = new MapLight(sz, p, w) - } - - class MapLight(val size: Int, val parallelism: Int, val runWhat: String) - extends IterableBench { - def calc(n: Int) = n % 2 + 1 - - def comparisonMap = collection.Map() - def runseq = for (n <- this.seqcoll) yield calc(n) - def runpar = for (n <- this.parcoll) yield calc(n) - def companion = MapLight - } - - object MapMedium extends IterableBenchCompanion { - override def defaultSize = 5000 - def benchName = "map-medium"; - def apply(sz: Int, p: Int, w: String) = new MapMedium(sz, p, w) - } - - class MapMedium(val size: Int, val parallelism: Int, val runWhat: String) - extends IterableBench { - def calc(n: Int) = { - var i = 0 - var sum = n - while (i < 40) { - i += 1 - sum += n % i - } - sum - } - - def comparisonMap = collection.Map() - def runseq = for (n <- this.seqcoll) yield calc(n) - def runpar = for (n <- this.parcoll) yield calc(n) - def companion = MapMedium - } - - object ForeachModify extends IterableBenchCompanion { - override def defaultSize = 150000 - def benchName = "foreach-modify"; - def apply(sz: Int, p: Int, w: String) = new ForeachModify(sz, p, w) - } - - class ForeachModify(val size: Int, val parallelism: Int, val runWhat: String) - extends IterableBench { - val array = new Array[Int](size) - def modify(n: Int) = array(n) += 1 - - def comparisonMap = collection.Map() - def runseq = for (n <- this.seqcoll) modify(n) - def runpar = for (n <- this.parcoll.asInstanceOf[ParRange]) { - modify(n) - () - } - def companion = ForeachModify - } - - object ForeachModifyMedium extends IterableBenchCompanion { - override def defaultSize = 20000 - def benchName = "foreach-modify-medium"; - def apply(sz: Int, p: Int, w: String) = new ForeachModifyMedium(sz, p, w) - } - - class ForeachModifyMedium(val size: Int, val parallelism: Int, val runWhat: String) - extends IterableBench { - val array = new Array[Int](size) - def modify(n: Int) = array(n) = { - var i = 0 - var sum = 0 - while (i < 15) { - sum += i % 3 - i += i + 1 - } - sum - } - - def comparisonMap = collection.Map() - def runseq = for (n <- this.seqcoll) modify(n) - def runpar = for (n <- this.parcoll) modify(n) - def companion = ForeachModifyMedium - } - - object ForeachModifyHeavy extends IterableBenchCompanion { - override def defaultSize = 1000 - def benchName = "foreach-modify-heavy"; - def apply(sz: Int, p: Int, w: String) = new ForeachModifyHeavy(sz, p, w) - } - - class ForeachModifyHeavy(val size: Int, val parallelism: Int, val runWhat: String) - extends IterableBench { - val array = new Array[Int](size) - def modify(n: Int) = array(n) = collatz(10000 + array(n)) - - def comparisonMap = collection.Map() - def runseq = for (n <- this.seqcoll) modify(n) - def runpar = for (n <- this.parcoll) modify(n) - def companion = ForeachModifyHeavy - } - - object ForeachAdd extends IterableBenchCompanion { - override def defaultSize = 10000 - def benchName = "foreach-add"; - def apply(sz: Int, p: Int, w: String) = new ForeachAdd(sz, p, w) - override def comparisons = List("seq-hashmap") - } - - class ForeachAdd(val size: Int, val parallelism: Int, val runWhat: String) - extends IterableBench { - val cmap = new java.util.concurrent.ConcurrentHashMap[Int, Int] - val hmap = new java.util.HashMap[Int, Int] - - override def reset = runWhat match { - case "seq-hashmap" => seqcoll = createSequential(size, parallelism) - case _ => super.reset - } - - def comparisonMap = collection.Map("seq-hashmap" -> runseqhashmap _) - def runseqhashmap = for (i <- seqcoll) hmap put (i, onesum(i)) - def runseq = for (i <- seqcoll) cmap put (i, onesum(i)) - def runpar = for (i <- parcoll) cmap put (i, onesum(i)) - def companion = ForeachAdd - } - - object ForeachAddCollatz extends IterableBenchCompanion { - override def defaultSize = 5000 - def benchName = "foreach-add-collatz"; - def apply(sz: Int, p: Int, w: String) = new ForeachAddCollatz(sz, p, w) - override def comparisons = List("seq-hashmap") - } - - class ForeachAddCollatz(val size: Int, val parallelism: Int, val runWhat: String) - extends IterableBench { - val cmap = new java.util.concurrent.ConcurrentHashMap[Int, Int] - val hmap = new java.util.HashMap[Int, Int] - - override def reset = runWhat match { - case "seq-hashmap" => seqcoll = createSequential(size, parallelism) - case _ => super.reset - } - - def comparisonMap = collection.Map("seq-hashmap" -> runseqhashmap _) - def runseqhashmap = for (i <- seqcoll) hmap put (i, collatz(i)) - def runseq = for (i <- seqcoll) cmap put (i, collatz(i)) - def runpar = for (i <- parcoll) cmap put (i, collatz(i)) - def companion = ForeachAddCollatz - } - - def collatz(n: Int) = { - var curr = n - var sum = 0 - while (curr > 1) { - sum += curr - if (curr % 2 == 0) curr = curr / 2 - else curr = curr * 3 + 1 - } - sum - } - - def onesum(n: Int) = { - var left = n - var sum = 0 - while (left > 0) { - sum += left % 2 - left /= 2 - } - sum - } - -} - - - - - - - - - - - diff --git a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_view/SeqViewBenches.scala b/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_view/SeqViewBenches.scala deleted file mode 100644 index 1c1cd52120..0000000000 --- a/test/benchmarks/src/scala/collection/parallel/benchmarks/parallel_view/SeqViewBenches.scala +++ /dev/null @@ -1,51 +0,0 @@ -package scala.collection.parallel -package benchmarks.parallel_view - - - -import scala.collection.parallel.benchmarks.generic._ -import scala.collection.SeqView - - - - - - - - - - -trait DummyViewBenches -extends ParSeqViewBenches[Dummy, ParSeqView[Dummy, ParSeq[Dummy], Seq[Dummy]], Seq[Dummy]] { - def nameOfCollection = "ParView" - def operators = DummyOperators - def comparisonMap = collection.Map() - val forkJoinPool = new scala.concurrent.forkjoin.ForkJoinPool - def createSequential(sz: Int, p: Int) = { - val s = new Array[Dummy](sz) - for (i <- 0 until sz) s(i) = new Dummy(i) - s - } - def createParallel(sz: Int, p: Int) = { - val pa = new collection.parallel.mutable.ParArray[Dummy](sz) - forkJoinPool.setParallelism(p) - for (i <- 0 until sz) pa(i) = new Dummy(i) - val v = pa.view - collection.parallel.tasksupport.environment = forkJoinPool - v - } - def createSeqView(sz: Int, p: Int) = createSequential(sz, p).view -} - - -object DummyViewBenchList extends DummyViewBenches - - - - - - - - - - diff --git a/test/benchmarks/src/scala/util/HashSpeedTest.scala b/test/benchmarks/src/scala/util/HashSpeedTest.scala deleted file mode 100644 index a4d310e6d1..0000000000 --- a/test/benchmarks/src/scala/util/HashSpeedTest.scala +++ /dev/null @@ -1,253 +0,0 @@ -object HashSpeedTest { - - import System.{ nanoTime => now } - - def time[A](f: => A) = { - val t0 = now - val ans = f - (ans, now - t0) - } - - def ptime[A](f: => A) = { - val (ans, dt) = time(f) - printf("Elapsed: %.3f\n", dt * 1e-9) - ans - } - - object HashHist { - var enabled = true - val counts = new collection.mutable.HashMap[Int, Int] - def add(i: Int) { if (enabled) counts(i) = counts.get(i).getOrElse(0) + 1 } - def resultAndReset = { - var s = 0L - var o = 0L - var m = 0 - counts.valuesIterator.foreach(i => { - s += i - if (i > 0) o += 1 - if (i > m) m = i - }) - counts.clear - (s, o, m) - } - } - - def report(s: String, res: (Long, Long, Int)) { - println("Hash quality of " + s) - printf(" %5.2f%% of entries are collisions\n", 100 * (res._1 - res._2).toDouble / res._1) - printf(" Max of %d entries mapped to the same value\n", res._3) - } - - // If you have MurmurHash3 installed, uncomment below (and in main) - import scala.util.{ MurmurHash3 => MH3 } - - val justCountString: String => Unit = str => { - var s, i = 0 - while (i < str.length) { s += str.charAt(i); i += 1 } - HashHist.add(s) - } - - val defaultHashString: String => Unit = str => HashHist.add(str.hashCode) - - val murmurHashString: String => Unit = str => HashHist.add(MH3.stringHash(str)) - - def makeCharStrings = { - val a = new Array[Byte](4) - val buffer = new collection.mutable.ArrayBuffer[String] - var i: Int = 'A' - while (i <= 'Z') { - a(0) = (i & 0xFF).toByte - var j: Int = 'a' - while (j <= 'z') { - a(1) = (j & 0xFF).toByte - var k: Int = 'A' - while (k <= 'z') { - a(2) = (k & 0xFF).toByte - var l: Int = 'A' - while (l <= 'z') { - a(3) = (l & 0xFF).toByte - buffer += new String(a) - l += 1 - } - k += 1 - } - j += 1 - } - i += 1 - } - buffer.toArray - } - - def hashCharStrings(ss: Array[String], hash: String => Unit) { - var i = 0 - while (i < ss.length) { - hash(ss(i)) - i += 1 - } - } - - def justCountList: List[List[Int]] => Unit = lli => { - var s = 0 - lli.foreach(_.foreach(s += _)) - HashHist.add(s) - } - - def defaultHashList: List[List[Int]] => Unit = lli => HashHist.add(lli.hashCode) - - def makeBinaryLists = { - def singleLists(depth: Int): List[List[Int]] = { - if (depth <= 0) List(Nil) - else { - val set = singleLists(depth - 1) - val longest = set filter (_.length == depth - 1) - set ::: (longest.map(0 :: _)) ::: (longest.map(1 :: _)) - } - } - val buffer = new collection.mutable.ArrayBuffer[List[List[Int]]] - val blocks = singleLists(4).toArray - buffer += List(Nil) - var i = 0 - while (i < blocks.length) { - val li = blocks(i) :: Nil - buffer += li - var j = 0 - while (j < blocks.length) { - val lj = blocks(j) :: li - buffer += lj - var k = 0 - while (k < blocks.length) { - val lk = blocks(k) :: lj - buffer += lk - var l = 0 - while (l < blocks.length) { - val ll = blocks(l) :: lk - buffer += ll - l += 1 - } - k += 1 - } - j += 1 - } - i += 1 - } - buffer.toArray - } - - def hashBinaryLists(ls: Array[List[List[Int]]], hash: List[List[Int]] => Unit) { - var i = 0 - while (i < ls.length) { - hash(ls(i)) - i += 1 - } - } - - def justCountSets: Set[Int] => Unit = si => { - var s = 0 - si.foreach(s += _) - HashHist.add(s) - } - - def defaultHashSets: Set[Int] => Unit = si => HashHist.add(si.hashCode) - - def makeIntSets = { - def sets(depth: Int): List[Set[Int]] = { - if (depth <= 0) List(Set.empty[Int]) - else { - val set = sets(depth - 1) - set ::: set.map(_ + depth) - } - } - sets(20).toArray - } - - def hashIntSets(ss: Array[Set[Int]], hash: Set[Int] => Unit) { - var i = 0 - while (i < ss.length) { - hash(ss(i)) - i += 1 - } - } - - def defaultHashTuples: (Product with Serializable) => Unit = p => HashHist.add(p.hashCode) - - def makeNestedTuples = { - val basic = Array( - (0, 0), - (0, 1), - (1, 0), - (1, 1), - (0, 0, 0), - (0, 0, 1), - (0, 1, 0), - (1, 0, 0), - (0, 0, 0, 0), - (0, 0, 0, 0, 0), - (false, false), - (true, false), - (false, true), - (true, true), - (0.7, true, "fish"), - ((), true, 'c', 400, 9.2, "galactic")) - basic ++ - (for (i <- basic; j <- basic) yield (i, j)) ++ - (for (i <- basic; j <- basic; k <- basic) yield (i, j, k)) ++ - (for (i <- basic; j <- basic; k <- basic) yield ((i, j), k)) ++ - (for (i <- basic; j <- basic; k <- basic) yield (i, (j, k))) ++ - (for (i <- basic; j <- basic; k <- basic; l <- basic) yield (i, j, k, l)) ++ - (for (i <- basic; j <- basic; k <- basic; l <- basic) yield ((i, j), (k, l))) ++ - (for (i <- basic; j <- basic; k <- basic; l <- basic) yield (i, (j, k, l))) ++ - (for (i <- basic; j <- basic; k <- basic; l <- basic; m <- basic) yield (i, j, k, l, m)) ++ - (for (i <- basic; j <- basic; k <- basic; l <- basic; m <- basic) yield (i, (j, (k, (l, m))))) - } - - def hashNestedTuples(ts: Array[Product with Serializable], hash: (Product with Serializable) => Unit) { - var i = 0 - while (i < ts.length) { - hash(ts(i)) - i += 1 - } - } - - def findSpeed[A](n: Int, h: (Array[A], A => Unit) => Unit, aa: Array[A], f: A => Unit) = { - (time { for (i <- 1 to n) { h(aa, f) } }._2, aa.length.toLong * n) - } - - def reportSpeed[A](repeats: Int, xs: List[(String, () => (Long, Long))]) { - val tn = Array.fill(xs.length)((0L, 0L)) - for (j <- 1 to repeats) { - for ((l, i) <- xs zipWithIndex) { - val x = l._2() - tn(i) = (tn(i)._1 + x._1, tn(i)._2 + x._2) - } - } - for (((t, n), (title, _)) <- (tn zip xs)) { - val rate = (n * 1e-6) / (t * 1e-9) - printf("Hash rate for %s: %4.2f million/second\n", title, rate) - } - } - - def main(args: Array[String]) { - val bl = makeBinaryLists - val is = makeIntSets - val nt = makeNestedTuples - // Uncomment the following for string stats if MurmurHash3 available - val cs = makeCharStrings - report("Java String hash for strings", { hashCharStrings(cs, defaultHashString); HashHist.resultAndReset }) - report("MurmurHash3 for strings", { hashCharStrings(cs, murmurHashString); HashHist.resultAndReset }) - HashHist.enabled = false - reportSpeed(3, List( - ("Java string hash", () => findSpeed[String](30, (x, y) => hashCharStrings(x, y), cs, defaultHashString)), - ("MurmurHash3 string hash", () => findSpeed[String](30, (x, y) => hashCharStrings(x, y), cs, murmurHashString)))) - // reportSpeed("Java string hash",30,hashCharStrings.tupled,cs,defaultHashString) - // reportSpeed("MurmurHash3 string hash",30,hashCharStrings.tupled,cs,murmurHashString) - HashHist.enabled = true - report("lists of binary int lists", { hashBinaryLists(bl, defaultHashList); HashHist.resultAndReset }) - report("small integer sets", { hashIntSets(is, defaultHashSets); HashHist.resultAndReset }) - report("small nested tuples", { hashNestedTuples(nt, defaultHashTuples); HashHist.resultAndReset }) - HashHist.enabled = false - reportSpeed(3, List( - ("lists of lists of binary ints", () => findSpeed(20, hashBinaryLists, bl, defaultHashList)), - ("small integer sets", () => findSpeed(10, hashIntSets, is, defaultHashSets)), - ("small nested tuples", () => findSpeed(5, hashNestedTuples, nt, defaultHashTuples)))) - } -} diff --git a/test/disabled/coder/Coder.scala b/test/disabled/coder/Coder.scala index 62b99e0cf0..b116a41a5d 100644 --- a/test/disabled/coder/Coder.scala +++ b/test/disabled/coder/Coder.scala @@ -168,7 +168,7 @@ object Test { /* */ def main(args : Array[String]) { - // import scala.concurrent.forkjoin.ForkJoinPool + // import java.util.concurrent.ForkJoinPool // collection.parallel.tasksupport.environment match { // case fj: ForkJoinPool => fj.setParallelism(1) // } diff --git a/test/disabled/run/applet-prop.scala b/test/disabled/run/applet-prop.scala index 9c29dfd979..7a98c25cab 100644 --- a/test/disabled/run/applet-prop.scala +++ b/test/disabled/run/applet-prop.scala @@ -8,7 +8,7 @@ class S extends javax.swing.JApplet { object Test extends SecurityTest { val s = new S - // lazy val TestKey = sys.SystemProperties.noTraceSupression.key + // lazy val TestKey = sys.SystemProperties.noTraceSuppression.key // def hitPerm() = new Throwable with scala.util.control.ControlThrowable { } // // var throwing = false diff --git a/test/disabled/run/indylambda-specialization.scala b/test/disabled/run/indylambda-specialization.scala new file mode 100644 index 0000000000..2c66073e90 --- /dev/null +++ b/test/disabled/run/indylambda-specialization.scala @@ -0,0 +1,15 @@ +object Test { + def assertApply(expected: Boolean) = { + val frames = Thread.currentThread.getStackTrace.takeWhile(_.getMethodName != "main") + val usesObjectApply = frames.exists(_.getMethodName == "apply") + assert(expected == usesObjectApply, frames.mkString("\n")) + } + def assertSpecialized() = assertApply(false) + def assertUnspecialized() = assertApply(true) + def main(args: Array[String]): Unit = { + ((i: String) => {assertUnspecialized(); i}).apply("") + (() => {assertSpecialized(); 0}).apply() + ((i: Int) => {assertSpecialized(); i}).apply(0) + ((i: Int, j: Int) => {assertSpecialized(); i + j}).apply(0, 0) + } +} diff --git a/test/files/instrumented/InstrumentationTest.check b/test/files/instrumented/InstrumentationTest.check index c82d16bd34..74f9c9d268 100644 --- a/test/files/instrumented/InstrumentationTest.check +++ b/test/files/instrumented/InstrumentationTest.check @@ -1,4 +1,3 @@ -#partest !avian true Method call statistics: 1 Foo1.<init>()V @@ -7,8 +6,5 @@ Method call statistics: 1 instrumented/Foo2.someMethod()I 1 scala/DeprecatedConsole.<init>()V 1 scala/Predef$.println(Ljava/lang/Object;)V - 1 scala/io/AnsiColor$class.$init$(Lscala/io/AnsiColor;)V + 1 scala/io/AnsiColor.$init$()V 1 scala/runtime/BoxesRunTime.boxToBoolean(Z)Ljava/lang/Boolean; -#partest avian -!!!TEST SKIPPED!!! -Instrumentation is not supported on Avian. diff --git a/test/files/instrumented/indy-symbol-literal.scala b/test/files/instrumented/indy-symbol-literal.scala new file mode 100644 index 0000000000..a1c333cf95 --- /dev/null +++ b/test/files/instrumented/indy-symbol-literal.scala @@ -0,0 +1,19 @@ +import scala.tools.partest.instrumented._ +import scala.tools.partest.instrumented.Instrumentation._ + +object Test { + def main(args: Array[String]): Unit = { + 'warmup + startProfiling() + var i = 0; + while (i < 2) { + 'foo.name + i += 1 + } + stopProfiling() + // Only expect a single call to lookup the interned Symbol at each call site the defines + // a single literal. + val Symbol_apply = MethodCallTrace("scala/Symbol$", "apply", "(Ljava/lang/String;)Lscala/Symbol;") + assert(getStatistics.get(Symbol_apply) == Some(1), getStatistics); + } +} diff --git a/test/files/instrumented/inline-in-constructors.flags b/test/files/instrumented/inline-in-constructors.flags index d1ebc4c940..65caa3736e 100644 --- a/test/files/instrumented/inline-in-constructors.flags +++ b/test/files/instrumented/inline-in-constructors.flags @@ -1 +1 @@ --optimise -Ydelambdafy:inline -Ybackend:GenASM +-Yopt:l:classpath diff --git a/test/files/jvm/actor-exceptions.check b/test/files/jvm/actor-exceptions.check deleted file mode 100644 index d86bac9de5..0000000000 --- a/test/files/jvm/actor-exceptions.check +++ /dev/null @@ -1 +0,0 @@ -OK diff --git a/test/files/jvm/actor-exceptions.scala b/test/files/jvm/actor-exceptions.scala deleted file mode 100644 index bdd983a0e8..0000000000 --- a/test/files/jvm/actor-exceptions.scala +++ /dev/null @@ -1,67 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { -import scala.actors.{Actor, Exit} -import Actor._ - -case class MyException(text: String) extends Exception { - override def fillInStackTrace() = this -} - -case class MyOtherException(text: String) extends Exception { - override def fillInStackTrace() = this -} - -object Master extends Actor { - trapExit = true - def act() { - try { - link(Slave) - Slave.start() - for (i <- 0 until 10) Slave ! A - react { - case Exit(from, reason) => - println("OK") - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } -} - -object Slave extends Actor { - override def toString = "Slave" - override def exceptionHandler: PartialFunction[Exception, Unit] = { - case MyException(text) => - case other if !other.isInstanceOf[scala.util.control.ControlThrowable] => super.exceptionHandler(other) - } - def act() { - try { - var cnt = 0 - loop { - react { - case A => - cnt += 1 - if (cnt % 2 != 0) throw MyException("problem") - if (cnt == 10) { - throw MyOtherException("unhandled") - } - } - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] && - !e.isInstanceOf[MyException] && - !e.isInstanceOf[MyOtherException] => - e.printStackTrace() - } - } -} - -case object A - - def main(args: Array[String]) { - Master.start() - } -} diff --git a/test/files/jvm/actor-executor.check b/test/files/jvm/actor-executor.check deleted file mode 100644 index bdbdb5c6a2..0000000000 --- a/test/files/jvm/actor-executor.check +++ /dev/null @@ -1,20 +0,0 @@ -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK diff --git a/test/files/jvm/actor-executor.scala b/test/files/jvm/actor-executor.scala deleted file mode 100644 index 0fc28b4d85..0000000000 --- a/test/files/jvm/actor-executor.scala +++ /dev/null @@ -1,78 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { -import java.util.concurrent.Executors -import scala.actors.{Actor, SchedulerAdapter} -import Actor._ - -trait AdaptedActor extends Actor { - override def scheduler = - Test.scheduler -} - -object One extends AdaptedActor { - def act() { - try { - Two.start() - var i = 0 - loopWhile (i < 10000) { - i += 1 - Two ! 'MsgForTwo - react { - case 'MsgForOne => - if (i % 1000 == 0) - println("One: OK") - if (i == 10000) - Test.executor.shutdown() - } - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } -} - -object Two extends AdaptedActor { - def act() { - try { - var i = 0 - loopWhile (i < 10000) { - i += 1 - react { - case 'MsgForTwo => - if (i % 1000 == 0) - println("Two: OK") - One ! 'MsgForOne - } - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } -} - - val executor = - Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors()) - - val scheduler = - new SchedulerAdapter { - def execute(block: => Unit) { - val task = new Runnable { - def run() { block } - } - try { - executor.execute(task) - } catch { - case ree: java.util.concurrent.RejectedExecutionException => - task.run() - } - } - } - - def main(args: Array[String]) { - One.start() - } -} diff --git a/test/files/jvm/actor-executor2.check b/test/files/jvm/actor-executor2.check deleted file mode 100644 index da78f45836..0000000000 --- a/test/files/jvm/actor-executor2.check +++ /dev/null @@ -1,21 +0,0 @@ -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -One exited diff --git a/test/files/jvm/actor-executor2.scala b/test/files/jvm/actor-executor2.scala deleted file mode 100644 index 5badf2ae7e..0000000000 --- a/test/files/jvm/actor-executor2.scala +++ /dev/null @@ -1,92 +0,0 @@ - - - -@deprecated("Suppress warnings", since="2.11") -object Test { -import scala.actors.{Actor, SchedulerAdapter, Exit} -import Actor._ -import java.util.concurrent.{Executors, RejectedExecutionException} - -object One extends AdaptedActor { - def act() { - try { - Two.start() - var i = 0 - loopWhile (i < Test.NUM_MSG) { - i += 1 - Two ! 'MsgForTwo - react { - case 'MsgForOne => - if (i % (Test.NUM_MSG/10) == 0) - println("One: OK") - } - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } -} - -object Two extends AdaptedActor { - def act() { - try { - var i = 0 - loopWhile (i < Test.NUM_MSG) { - i += 1 - react { - case 'MsgForTwo => - if (i % (Test.NUM_MSG/10) == 0) - println("Two: OK") - One ! 'MsgForOne - } - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } -} - -trait AdaptedActor extends Actor { - override def scheduler = - Test.scheduler -} - - val NUM_MSG = 100000 - - val executor = - Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors()) - - val scheduler = - new SchedulerAdapter { - def execute(block: => Unit) { - val task = new Runnable { - def run() { block } - } - try { - executor.execute(task) - } catch { - case ree: RejectedExecutionException => - task.run() // run task on current thread - } - } - } - - def main(args: Array[String]) { - try { - self.trapExit = true - link(One) - One.start() - - receive { - case Exit(from, reason) => - println("One exited") - Test.executor.shutdown() - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } -} diff --git a/test/files/jvm/actor-executor3.check b/test/files/jvm/actor-executor3.check deleted file mode 100644 index bdbdb5c6a2..0000000000 --- a/test/files/jvm/actor-executor3.check +++ /dev/null @@ -1,20 +0,0 @@ -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK diff --git a/test/files/jvm/actor-executor3.scala b/test/files/jvm/actor-executor3.scala deleted file mode 100644 index f8b57d84b3..0000000000 --- a/test/files/jvm/actor-executor3.scala +++ /dev/null @@ -1,66 +0,0 @@ - - - -@deprecated("Suppress warnings", since="2.11") -object Test { -import scala.actors.Actor -import scala.actors.scheduler.ExecutorScheduler -import java.util.concurrent.Executors - -object One extends AdaptedActor { - def act() { - try { - Two.start() - var i = 0 - loopWhile (i < Test.NUM_MSG) { - i += 1 - Two ! 'MsgForTwo - react { - case 'MsgForOne => - if (i % (Test.NUM_MSG/10) == 0) - println("One: OK") - } - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } -} - -object Two extends AdaptedActor { - def act() { - try { - var i = 0 - loopWhile (i < Test.NUM_MSG) { - i += 1 - react { - case 'MsgForTwo => - if (i % (Test.NUM_MSG/10) == 0) - println("Two: OK") - One ! 'MsgForOne - } - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } -} - -trait AdaptedActor extends Actor { - override def scheduler = - Test.scheduler -} - - val NUM_MSG = 100000 - - val executor = - Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors()) - - val scheduler = ExecutorScheduler(executor) - - def main(args: Array[String]) { - One.start() - } -} diff --git a/test/files/jvm/actor-getstate.check b/test/files/jvm/actor-getstate.check deleted file mode 100644 index 2c94e48371..0000000000 --- a/test/files/jvm/actor-getstate.check +++ /dev/null @@ -1,2 +0,0 @@ -OK -OK diff --git a/test/files/jvm/actor-getstate.scala b/test/files/jvm/actor-getstate.scala deleted file mode 100644 index 425efbe5e6..0000000000 --- a/test/files/jvm/actor-getstate.scala +++ /dev/null @@ -1,87 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { - import scala.actors.{Reactor, Actor, TIMEOUT} - import Actor._ - - def assert(cond: => Boolean, hint: String) { - if (!cond) - println("FAIL ["+hint+"]") - } - - def expectActorState(a: Reactor[T] forSome { type T }, s: Actor.State.Value) { - var done = false - var i = 0 - while (!done) { - i = i + 1 - if (i == 10) { // only wait for 2 seconds total - println("FAIL ["+a+": expected "+s+"]") - done = true - } - - Thread.sleep(200) - if (a.getState == s) // success - done = true - } - } - - def main(args: Array[String]) { - actor { - val a = new Reactor[Any] { - def act() { - assert(getState == Actor.State.Runnable, "runnable1") - react { - case 'go => - println("OK") - } - } - } - expectActorState(a, Actor.State.New) - - a.start() - expectActorState(a, Actor.State.Suspended) - - a ! 'go - expectActorState(a, Actor.State.Terminated) - - val b = new Actor { - def act() { - assert(getState == Actor.State.Runnable, "runnable2: "+getState) - react { - case 'go => - reactWithin(100000) { - case TIMEOUT => - case 'go => - receive { - case 'go => - } - receiveWithin(100000) { - case TIMEOUT => - case 'go => - println("OK") - } - } - } - } - } - expectActorState(b, Actor.State.New) - - b.start() - expectActorState(b, Actor.State.Suspended) - - b ! 'go - expectActorState(b, Actor.State.TimedSuspended) - - b ! 'go - expectActorState(b, Actor.State.Blocked) - - b ! 'go - expectActorState(b, Actor.State.TimedBlocked) - - b ! 'go - expectActorState(b, Actor.State.Terminated) - } - } - -} diff --git a/test/files/jvm/actor-link-getstate.check b/test/files/jvm/actor-link-getstate.check deleted file mode 100644 index 9755447320..0000000000 --- a/test/files/jvm/actor-link-getstate.check +++ /dev/null @@ -1,2 +0,0 @@ -Done -Terminated diff --git a/test/files/jvm/actor-link-getstate.scala b/test/files/jvm/actor-link-getstate.scala deleted file mode 100644 index d8b8ada1e6..0000000000 --- a/test/files/jvm/actor-link-getstate.scala +++ /dev/null @@ -1,65 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { - import scala.actors.{Actor, Exit} - import scala.actors.Actor._ - -case class MyException(text: String) extends Exception(text) { - override def fillInStackTrace() = this -} - -object Slave extends Actor { - def act() { - try { - loop { - react { - case 'doWork => - Console.out.println("Done") - reply('done) - } - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } -} - -object Master extends Actor { - override def toString = "Master" - def act() { - try { - link(Slave) - Slave ! 'doWork - react { - case 'done => - throw new MyException("Master crashed") - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } -} - - - def main(args: Array[String]) { - actor { - try { - self.trapExit = true - link(Slave) - Slave.start() - Master.start() - react { - case Exit(from, reason) if (from == Slave) => - Console.out.println(Slave.getState) - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - } - -} diff --git a/test/files/jvm/actor-looping.check b/test/files/jvm/actor-looping.check deleted file mode 100644 index a6f5c2e73a..0000000000 --- a/test/files/jvm/actor-looping.check +++ /dev/null @@ -1,5 +0,0 @@ -received A -received A -received A -received A -received last A diff --git a/test/files/jvm/actor-looping.scala b/test/files/jvm/actor-looping.scala deleted file mode 100644 index 7bc6f1e5c5..0000000000 --- a/test/files/jvm/actor-looping.scala +++ /dev/null @@ -1,33 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { - import scala.actors.Actor._ - case object A - - def main(args: Array[String]) { - val a = actor { - try { - var cnt = 0 - loop { - react { - case A => - cnt += 1 - if (cnt % 2 != 0) continue - if (cnt < 10) - println("received A") - else { - println("received last A") - exit() - } - } - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - - for (i <- 0 until 10) a ! A - } -} diff --git a/test/files/jvm/actor-normal-exit.check b/test/files/jvm/actor-normal-exit.check deleted file mode 100644 index 6865f83b90..0000000000 --- a/test/files/jvm/actor-normal-exit.check +++ /dev/null @@ -1,2 +0,0 @@ -Done -slave exited for reason 'normal diff --git a/test/files/jvm/actor-normal-exit.scala b/test/files/jvm/actor-normal-exit.scala deleted file mode 100644 index 90495866e2..0000000000 --- a/test/files/jvm/actor-normal-exit.scala +++ /dev/null @@ -1,38 +0,0 @@ - - - -@deprecated("Suppress warnings", since="2.11") -object Test { - import scala.actors.{Actor, Exit} - object Master extends Actor { - trapExit = true - def act() { - try { - Slave.start() - react { - case Exit(from, reason) => - println("slave exited for reason " + reason) - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - } - - object Slave extends Actor { - def act() { - try { - link(Master) - println("Done") - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - } - - def main(args: Array[String]) { - Master.start() - } -} diff --git a/test/files/jvm/actor-receivewithin.check b/test/files/jvm/actor-receivewithin.check deleted file mode 100644 index a6a3e88c61..0000000000 --- a/test/files/jvm/actor-receivewithin.check +++ /dev/null @@ -1,16 +0,0 @@ -'msg -'msg -'msg -'msg -'msg -TIMEOUT -TIMEOUT -TIMEOUT -TIMEOUT -TIMEOUT -'msg2 -'msg2 -'msg2 -'msg2 -'msg2 -TIMEOUT diff --git a/test/files/jvm/actor-receivewithin.scala b/test/files/jvm/actor-receivewithin.scala deleted file mode 100644 index 5982462502..0000000000 --- a/test/files/jvm/actor-receivewithin.scala +++ /dev/null @@ -1,72 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { -import scala.actors.{Actor, TIMEOUT} - -object A extends Actor { - def act() { - receive { - case 'done => - var cnt = 0 - while (cnt < 500) { - cnt += 1 - receiveWithin (0) { - case 'msg => - if (cnt % 100 == 0) - println("'msg") - case TIMEOUT => - // should not happen - println("FAIL1") - } - } - cnt = 0 - while (cnt < 500) { - cnt += 1 - receiveWithin (0) { - case 'msg => - // should not happen - println("FAIL2") - case TIMEOUT => - if (cnt % 100 == 0) - println("TIMEOUT") - } - } - B ! 'next - receive { case 'done => } - cnt = 0 - while (cnt < 501) { - cnt += 1 - receiveWithin (500) { - case 'msg2 => - if (cnt % 100 == 0) - println("'msg2") - case TIMEOUT => - println("TIMEOUT") - } - } - } - } -} - -object B extends Actor { - def act() { - A.start() - for (_ <- 1 to 500) { - A ! 'msg - } - A ! 'done - receive { - case 'next => - for (_ <- 1 to 500) { - A ! 'msg2 - } - A ! 'done - } - } -} - - def main(args:Array[String]) { - B.start() - } -} diff --git a/test/files/jvm/actor-sync-send-timeout.scala b/test/files/jvm/actor-sync-send-timeout.scala deleted file mode 100644 index 66a0b0a6ff..0000000000 --- a/test/files/jvm/actor-sync-send-timeout.scala +++ /dev/null @@ -1,48 +0,0 @@ -@deprecated("Suppress warnings", since="2.11") -object Test { -import scala.actors.Actor - -/* This test is a regression test for SI-4759. - */ - val Runs = 5 - - def main(args: Array[String]) = { - var i = 0 - while (i < Runs) { - i += 1 - A1 ! 1 - Thread.sleep(500) - } - //println("done sending to A1") - } - -object A2 extends Actor { - this.start() - def act() { - loop { - react { - case 'stop => - //println("A2 exiting") - exit() - case _ => - } - } - } -} - -object A1 extends Actor { - this.start() - def act() { - var i = 0 - loopWhile(i < Test.Runs) { - i += 1 - react { - case any => - A2 !? (500, any) - if (i == Test.Runs) - A2 ! 'stop - } - } - } -} -} diff --git a/test/files/jvm/actor-termination.check b/test/files/jvm/actor-termination.check deleted file mode 100644 index e3f44d8b18..0000000000 --- a/test/files/jvm/actor-termination.check +++ /dev/null @@ -1,2 +0,0 @@ -I'm going to make you wait. -Ok, I'm done. diff --git a/test/files/jvm/actor-termination.scala b/test/files/jvm/actor-termination.scala deleted file mode 100644 index 4a6bf92d48..0000000000 --- a/test/files/jvm/actor-termination.scala +++ /dev/null @@ -1,19 +0,0 @@ - -/* Test that an actor that hasn't finished prevents termination */ - -@deprecated("Suppress warnings", since="2.11") -object Test { - import scala.actors.Actor - def main(args: Array[String]) { - Actor.actor { - try { - println("I'm going to make you wait.") - Thread.sleep(5000) - println("Ok, I'm done.") - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - } -} diff --git a/test/files/jvm/actor-uncaught-exception.check b/test/files/jvm/actor-uncaught-exception.check deleted file mode 100644 index 2c94e48371..0000000000 --- a/test/files/jvm/actor-uncaught-exception.check +++ /dev/null @@ -1,2 +0,0 @@ -OK -OK diff --git a/test/files/jvm/actor-uncaught-exception.scala b/test/files/jvm/actor-uncaught-exception.scala deleted file mode 100644 index c28ad2fa3c..0000000000 --- a/test/files/jvm/actor-uncaught-exception.scala +++ /dev/null @@ -1,64 +0,0 @@ -@deprecated("Suppress warnings", since="2.11") -object Test { -import scala.actors.{Actor, Exit} - -class MyException(msg: String) extends Exception(msg) { - override def fillInStackTrace() = this -} - - - case object StartError extends Actor { - def act() { - try { - throw new MyException("I don't want to run!") - } catch { - case e: Throwable if (!e.isInstanceOf[scala.util.control.ControlThrowable] && - !e.isInstanceOf[MyException]) => - e.printStackTrace() - } - } - } - - case object MessageError extends Actor { - def act() { - try { - react { - case _ => throw new MyException("No message for me!") - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - } - - case object Supervisor extends Actor { - def act() { - try { - trapExit = true - link(StartError) - link(MessageError) - StartError.start() - MessageError.start() - - Actor.loop { - react { - case Exit(actor, reason) => - println("OK") - if (actor == StartError) - MessageError ! 'ping - else - exit() - } - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - } - - def main(args: Array[String]) { - Supervisor.start() - } -} diff --git a/test/files/jvm/actor-uncaught-exception2.check b/test/files/jvm/actor-uncaught-exception2.check deleted file mode 100644 index a54f374aed..0000000000 --- a/test/files/jvm/actor-uncaught-exception2.check +++ /dev/null @@ -1,2 +0,0 @@ -UncaughtException(StartError,None,None,Test$MyException: I don't want to run!) -UncaughtException(MessageError,Some('ping),Some(Supervisor),Test$MyException: No message for me!) diff --git a/test/files/jvm/actor-uncaught-exception2.scala b/test/files/jvm/actor-uncaught-exception2.scala deleted file mode 100644 index 8327b4e19d..0000000000 --- a/test/files/jvm/actor-uncaught-exception2.scala +++ /dev/null @@ -1,63 +0,0 @@ -@deprecated("Suppress warnings", since="2.11") -object Test { -import scala.actors.{Actor, Exit, Debug} - -class MyException(msg: String) extends Exception(msg) { - override def fillInStackTrace() = this -} - - case object StartError extends Actor { - def act() { - try { - throw new MyException("I don't want to run!") - } catch { - case e: Throwable if (!e.isInstanceOf[scala.util.control.ControlThrowable] && - !e.isInstanceOf[MyException]) => - e.printStackTrace() - } - } - } - - case object MessageError extends Actor { - def act() { - try { - react { - case _ => throw new MyException("No message for me!") - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - } - - case object Supervisor extends Actor { - def act() { - try { - trapExit = true - link(StartError) - link(MessageError) - StartError.start() - MessageError.start() - - Actor.loop { - react { - case Exit(actor, reason) => - println(reason) - if (actor == StartError) - MessageError ! 'ping - else - exit() - } - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - } - - def main(args: Array[String]) { - Supervisor.start() - } -} diff --git a/test/files/jvm/bytecode-test-example.flags b/test/files/jvm/bytecode-test-example.flags new file mode 100644 index 0000000000..bc22511cff --- /dev/null +++ b/test/files/jvm/bytecode-test-example.flags @@ -0,0 +1 @@ +-Yopt:l:none diff --git a/test/files/jvm/bytecode-test-example/Foo_1.flags b/test/files/jvm/bytecode-test-example/Foo_1.flags deleted file mode 100644 index 49f2d2c4c8..0000000000 --- a/test/files/jvm/bytecode-test-example/Foo_1.flags +++ /dev/null @@ -1 +0,0 @@ --Ybackend:GenASM diff --git a/test/files/jvm/constant-optimization/Foo_1.flags b/test/files/jvm/constant-optimization/Foo_1.flags deleted file mode 100644 index 67a1dbe8da..0000000000 --- a/test/files/jvm/constant-optimization/Foo_1.flags +++ /dev/null @@ -1 +0,0 @@ --Ynooptimise -Yconst-opt -Ybackend:GenASM
\ No newline at end of file diff --git a/test/files/jvm/daemon-actor-termination.check b/test/files/jvm/daemon-actor-termination.check deleted file mode 100644 index b2ff72fd0b..0000000000 --- a/test/files/jvm/daemon-actor-termination.check +++ /dev/null @@ -1,2 +0,0 @@ -MSG1 -MSG2 diff --git a/test/files/jvm/daemon-actor-termination.scala b/test/files/jvm/daemon-actor-termination.scala deleted file mode 100644 index 9bac6340ba..0000000000 --- a/test/files/jvm/daemon-actor-termination.scala +++ /dev/null @@ -1,40 +0,0 @@ - -/* Test that a daemon Actor that hasn't finished does not prevent termination */ - -@deprecated("Suppress warnings", since="2.11") -object Test { - - import scala.actors.{Actor, DaemonActor} - class MyDaemon extends DaemonActor { - def act() { - try { - react { - case 'hello => - println("MSG1") - reply(()) - react { - case 'bye => - println("done") - } - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - } - - def main(args: Array[String]) { - val daemon = new MyDaemon - daemon.start() - Actor.actor { - try { - daemon !? 'hello - println("MSG2") - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - } -} diff --git a/test/files/jvm/future-alarm.check b/test/files/jvm/future-alarm.check deleted file mode 100644 index 01a87d1c4c..0000000000 --- a/test/files/jvm/future-alarm.check +++ /dev/null @@ -1,20 +0,0 @@ -OK -OK -OK -OK -OK -OK -OK -OK -OK -OK -OK -OK -OK -OK -OK -OK -OK -OK -OK -OK diff --git a/test/files/jvm/future-alarm.scala b/test/files/jvm/future-alarm.scala deleted file mode 100644 index 3e71fa681c..0000000000 --- a/test/files/jvm/future-alarm.scala +++ /dev/null @@ -1,23 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { - import scala.actors.Futures - def main(args: Array[String]) { - try { - for (i <- 1 to 100000) { - Futures.alarm(0) - if (i % 10000 == 0) - println("OK") - } - for (_ <- 1 to 10) { - val ft = Futures.alarm(100) - ft() - println("OK") - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } -} diff --git a/test/files/jvm/future-awaitall-zero.check b/test/files/jvm/future-awaitall-zero.check deleted file mode 100644 index d86bac9de5..0000000000 --- a/test/files/jvm/future-awaitall-zero.check +++ /dev/null @@ -1 +0,0 @@ -OK diff --git a/test/files/jvm/future-awaitall-zero.scala b/test/files/jvm/future-awaitall-zero.scala deleted file mode 100644 index 56f4bab16f..0000000000 --- a/test/files/jvm/future-awaitall-zero.scala +++ /dev/null @@ -1,24 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { - import scala.actors.Futures._ - import scala.actors.Actor._ - def main(args: Array[String]) { - try { - val ft1 = future { reactWithin(10000) { - case _ => println("FAIL") - } } - - val ft2 = future { reactWithin(20000) { - case _ => println("FAIL") - } } - - val res = awaitAll(0, ft1, ft2) - println("OK") - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } -} diff --git a/test/files/jvm/future-spec.check b/test/files/jvm/future-spec.check index df1629dd7e..50c5d446af 100644 --- a/test/files/jvm/future-spec.check +++ b/test/files/jvm/future-spec.check @@ -1 +1 @@ -warning: there was one deprecation warning; re-run with -deprecation for details +warning: there were 20 deprecation warnings; re-run with -deprecation for details diff --git a/test/files/jvm/future-spec/FutureTests.scala b/test/files/jvm/future-spec/FutureTests.scala index efe9c59d7a..d0de2f5542 100644 --- a/test/files/jvm/future-spec/FutureTests.scala +++ b/test/files/jvm/future-spec/FutureTests.scala @@ -17,6 +17,19 @@ class FutureTests extends MinimalScalaTest { case "NoReply" => Promise[String]().future } + def fail(msg: String): Nothing = throw new AssertionError(msg) + + def ECNotUsed[T](f: ExecutionContext => T): T = { + val p = Promise[Runnable]() + val unusedEC: ExecutionContext = new ExecutionContext { + def execute(r: Runnable) = p.success(r) + def reportFailure(t: Throwable): Unit = p.failure(t) + } + val t = f(unusedEC) + assert(p.future.value == None, "Future executed logic!") + t + } + val defaultTimeout = 5 seconds /* future specification */ @@ -24,7 +37,7 @@ class FutureTests extends MinimalScalaTest { "A future with custom ExecutionContext" should { "shouldHandleThrowables" in { val ms = new mutable.HashSet[Throwable] with mutable.SynchronizedSet[Throwable] - implicit val ec = scala.concurrent.ExecutionContext.fromExecutorService(new scala.concurrent.forkjoin.ForkJoinPool(), { + implicit val ec = scala.concurrent.ExecutionContext.fromExecutor(new java.util.concurrent.ForkJoinPool(), { t => ms += t }) @@ -64,7 +77,61 @@ class FutureTests extends MinimalScalaTest { Await.ready(waiting, 2000 millis) ms.size mustBe (4) - ec.shutdownNow() + //FIXME should check + } + } + + "Futures" should { + "have proper toString representations" in { + import ExecutionContext.Implicits.global + val s = 5 + val f = new Exception("foo") + val t = Try(throw f) + + val expectFailureString = "Future(Failure("+f+"))" + val expectSuccessString = "Future(Success(5))" + val expectNotCompleteString = "Future(<not completed>)" + + Future.successful(s).toString mustBe expectSuccessString + Future.failed(f).toString mustBe expectFailureString + Future.fromTry(t).toString mustBe expectFailureString + val p = Promise[Int]() + p.toString mustBe expectNotCompleteString + Promise[Int]().success(s).toString mustBe expectSuccessString + Promise[Int]().failure(f).toString mustBe expectFailureString + Await.ready(Future { throw f }, 2000 millis).toString mustBe expectFailureString + Await.ready(Future { s }, 2000 millis).toString mustBe expectSuccessString + + Future.never.toString mustBe "Future(<never>)" + Future.unit.toString mustBe "Future(Success(()))" + } + + "have proper const representation for success" in { + val s = "foo" + val f = Future.successful(s) + + ECNotUsed(ec => f.onFailure({ case _ => fail("onFailure should not have been called") })(ec)) + assert( ECNotUsed(ec => f.recover({ case _ => fail("recover should not have been called")})(ec)) eq f) + assert( ECNotUsed(ec => f.recoverWith({ case _ => fail("flatMap should not have been called")})(ec)) eq f) + assert(f.fallbackTo(f) eq f, "Future.fallbackTo must be the same instance as Future.fallbackTo") + } + + "have proper const representation for failure" in { + val e = new Exception("foo") + val f = Future.failed[Future[String]](e) + + assert(f.mapTo[String] eq f, "Future.mapTo must be the same instance as Future.mapTo") + assert(f.zip(f) eq f, "Future.zip must be the same instance as Future.zip") + assert(f.flatten eq f, "Future.flatten must be the same instance as Future.flatten") + assert(f.failed eq f, "Future.failed must be the same instance as Future.failed") + + ECNotUsed(ec => f.foreach(_ => fail("foreach should not have been called"))(ec)) + ECNotUsed(ec => f.onSuccess({ case _ => fail("onSuccess should not have been called") })(ec)) + assert( ECNotUsed(ec => f.map(_ => fail("map should not have been called"))(ec)) eq f) + assert( ECNotUsed(ec => f.flatMap(_ => fail("flatMap should not have been called"))(ec)) eq f) + assert( ECNotUsed(ec => f.filter(_ => fail("filter should not have been called"))(ec)) eq f) + assert( ECNotUsed(ec => f.collect({ case _ => fail("collect should not have been called")})(ec)) eq f) + assert( ECNotUsed(ec => f.zipWith(f)({ (_,_) => fail("zipWith should not have been called")})(ec)) eq f) } } @@ -85,6 +152,49 @@ class FutureTests extends MinimalScalaTest { Await.result(f, defaultTimeout) mustBe ("foo") Await.result(p.future, defaultTimeout) mustBe (true) } + + "have a unit member representing an already completed Future containing Unit" in { + assert(Future.unit ne null, "Future.unit must not be null") + assert(Future.unit eq Future.unit, "Future.unit must be the same instance as Future.unit") + assert(Future.unit.isCompleted, "Future.unit must already be completed") + assert(Future.unit.value.get == Success(()), "Future.unit must contain a Success(())") + } + + "have a never member representing a never completed Future of Nothing" in { + + val test: Future[Nothing] = Future.never + + //Verify stable identifier + test match { + case Future.`never` => + case _ => fail("Future.never did not match Future.`never`") + } + + assert(test eq Future.never, "Future.never must be the same instance as Future.never") + assert(test ne null, "Future.never must not be null") + assert(!test.isCompleted && test.value.isEmpty, "Future.never must never be completed") + assert(test.failed eq test) + assert(test.asInstanceOf[Future[Future[Nothing]]].flatten eq test) + assert(test.zip(test) eq test) + assert(test.fallbackTo(test) eq test) + assert(test.mapTo[String] eq test) + + ECNotUsed(ec => test.foreach(_ => fail("foreach should not have been called"))(ec)) + ECNotUsed(ec => test.onSuccess({ case _ => fail("onSuccess should not have been called") })(ec)) + ECNotUsed(ec => test.onFailure({ case _ => fail("onFailure should not have been called") })(ec)) + ECNotUsed(ec => test.onComplete({ case _ => fail("onComplete should not have been called") })(ec)) + ECNotUsed(ec => test.transform(identity, identity)(ec) eq test) + ECNotUsed(ec => test.transform(identity)(ec) eq test) + ECNotUsed(ec => test.transformWith(_ => fail("transformWith should not have been called"))(ec) eq test) + ECNotUsed(ec => test.map(identity)(ec) eq test) + ECNotUsed(ec => test.flatMap(_ => fail("flatMap should not have been called"))(ec) eq test) + ECNotUsed(ec => test.filter(_ => fail("filter should not have been called"))(ec) eq test) + ECNotUsed(ec => test.collect({ case _ => fail("collect should not have been called")})(ec) eq test) + ECNotUsed(ec => test.recover({ case _ => fail("recover should not have been called")})(ec) eq test) + ECNotUsed(ec => test.recoverWith({ case _ => fail("recoverWith should not have been called")})(ec) eq test) + ECNotUsed(ec => test.andThen({ case _ => fail("andThen should not have been called")})(ec) eq test) + ECNotUsed(ec => test.zipWith(test)({ (_,_) => fail("zipWith should not have been called")})(ec) eq test) + } } "The default ExecutionContext" should { @@ -128,7 +238,7 @@ class FutureTests extends MinimalScalaTest { "support pattern matching within a for-comprehension" in { case class Req[T](req: T) case class Res[T](res: T) - def async[T](req: Req[T]) = req match { + def async[T](req: Req[T]) = (req: @unchecked) match { case Req(s: String) => Future { Res(s.length) } case Req(i: Int) => Future { Res((i * 2).toString) } } @@ -218,6 +328,142 @@ class FutureTests extends MinimalScalaTest { } mustBe (r) } + "transform results to results" in { + val f1 = Future.successful("foo").transform(_.map(_.toUpperCase)) + val f2 = Future("bar").transform(_.map(_.toUpperCase)) + Await.result(f1, defaultTimeout) mustBe "FOO" + Await.result(f2, defaultTimeout) mustBe "BAR" + } + + "transform failures to failures" in { + val initial = new Exception("Initial") + val expected1 = new Exception("Expected1") + val expected2 = new Exception("Expected2") + val f1 = Future(throw initial) transform { + case Failure(`initial`) => Failure(expected1) + case x => x + } + val f2 = Future.failed(initial) transform { + case Failure(`initial`) => Failure(expected2) + case x => x + } + + intercept[Exception] { Await.result(f1, defaultTimeout) } mustBe expected1 + intercept[Exception] { Await.result(f2, defaultTimeout) } mustBe expected2 + } + + "transform failures to results" in { + val initial1 = new Exception("Initial1") + val initial2 = new Exception("Initial2") + val f1 = Future.failed[String](initial1) transform { + case Failure(`initial1`) => Success("foo") + case x => x + } + val f2 = Future[String](throw initial2) transform { + case Failure(`initial2`) => Success("bar") + case x => x + } + Await.result(f1, defaultTimeout) mustBe "foo" + Await.result(f2, defaultTimeout) mustBe "bar" + } + + "transform results to failures" in { + val expected1 = new Exception("Expected1") + val expected2 = new Exception("Expected2") + val expected3 = new Exception("Expected3") + val f1 = Future.successful("foo") transform { + case Success("foo") => Failure(expected1) + case x => x + } + val f2 = Future("bar") transform { + case Success("bar") => Failure(expected2) + case x => x + } + val f3 = Future("bar") transform { + case Success("bar") => throw expected3 + case x => x + } + intercept[Exception] { Await.result(f1, defaultTimeout) } mustBe expected1 + intercept[Exception] { Await.result(f2, defaultTimeout) } mustBe expected2 + intercept[Exception] { Await.result(f3, defaultTimeout) } mustBe expected3 + } + + "transformWith results" in { + val f1 = Future.successful("foo").transformWith { + case Success(r) => Future(r.toUpperCase) + case f @ Failure(_) => Future.fromTry(f) + } + val f2 = Future("bar").transformWith { + case Success(r) => Future(r.toUpperCase) + case f @ Failure(_) => Future.fromTry(f) + } + Await.result(f1, defaultTimeout) mustBe "FOO" + Await.result(f2, defaultTimeout) mustBe "BAR" + } + + "transformWith failures" in { + val initial = new Exception("Initial") + val expected1 = new Exception("Expected1") + val expected2 = new Exception("Expected2") + val expected3 = new Exception("Expected3") + + val f1 = Future[Int](throw initial).transformWith { + case Failure(`initial`) => Future failed expected1 + case x => Future fromTry x + } + val f2 = Future.failed[Int](initial).transformWith { + case Failure(`initial`) => Future failed expected2 + case x => Future fromTry x + } + val f3 = Future[Int](throw initial).transformWith { + case Failure(`initial`) => throw expected3 + case x => Future fromTry x + } + + intercept[Exception] { Await.result(f1, defaultTimeout) } mustBe expected1 + intercept[Exception] { Await.result(f2, defaultTimeout) } mustBe expected2 + intercept[Exception] { Await.result(f3, defaultTimeout) } mustBe expected3 + } + + "transformWith failures to future success" in { + val initial = new Exception("Initial") + val f1 = Future.failed[String](initial).transformWith { + case Failure(`initial`) => Future("FOO") + case _ => Future failed initial + } + val f2 = Future[String](throw initial).transformWith { + case Failure(`initial`) => Future("BAR") + case _ => Future failed initial + } + Await.result(f1, defaultTimeout) mustBe "FOO" + Await.result(f2, defaultTimeout) mustBe "BAR" + } + + "transformWith results to future failures" in { + val initial = new Exception("Initial") + val expected1 = new Exception("Expected1") + val expected2 = new Exception("Expected2") + val expected3 = new Exception("Expected3") + + val f1 = Future[String]("FOO") transformWith { + case Success("FOO") => Future failed expected1 + case _ => Future successful "FOO" + } + val f2 = Future.successful("FOO") transformWith { + case Success("FOO") => Future failed expected2 + case _ => Future successful "FOO" + } + val f3 = Future.successful("FOO") transformWith { + case Success("FOO") => throw expected3 + case _ => Future successful "FOO" + } + + + intercept[Exception] { Await.result(f1, defaultTimeout) } mustBe expected1 + intercept[Exception] { Await.result(f2, defaultTimeout) } mustBe expected2 + intercept[Exception] { Await.result(f3, defaultTimeout) } mustBe expected3 + } + "andThen like a boss" in { val q = new java.util.concurrent.LinkedBlockingQueue[Int] for (i <- 1 to 1000) { @@ -281,6 +527,33 @@ class FutureTests extends MinimalScalaTest { Await.result(successful, timeout) mustBe (("foo", "foo")) } + "zipWith" in { + val timeout = 10000 millis + val f = new IllegalStateException("test") + intercept[IllegalStateException] { + val failed = Future.failed[String](f).zipWith(Future.successful("foo")) { _ -> _ } + Await.result(failed, timeout) + } mustBe (f) + + intercept[IllegalStateException] { + val failed = Future.successful("foo").zipWith(Future.failed[String](f)) { _ -> _ } + Await.result(failed, timeout) + } mustBe (f) + + intercept[IllegalStateException] { + val failed = Future.failed[String](f).zipWith(Future.failed[String](f)) { _ -> _ } + Await.result(failed, timeout) + } mustBe (f) + + val successful = Future.successful("foo").zipWith(Future.successful("foo")) { _ -> _ } + Await.result(successful, timeout) mustBe (("foo", "foo")) + + val failure = Future.successful("foo").zipWith(Future.successful("foo")) { (_,_) => throw f } + intercept[IllegalStateException] { + Await.result(failure, timeout) + } mustBe (f) + } + "fold" in { val timeout = 10000 millis def async(add: Int, wait: Int) = Future { @@ -543,22 +816,6 @@ class FutureTests extends MinimalScalaTest { Await.ready(f, defaultTimeout).value.get.toString mustBe expected.toString } - "should have a decent toString representation" in { - val i = scala.concurrent.forkjoin.ThreadLocalRandom.current.nextInt() - val e = new Exception(i.toString) - val successString = "Future(Success("+i+"))" - val failureString = "Future(Failure("+e+"))" - val notCompletedString = "Future(<not completed>)" - - Future.successful(i).toString mustBe successString - Future.failed[Int](e).toString mustBe failureString - Promise[Int]().toString mustBe notCompletedString - Promise[Int]().success(i).toString mustBe successString - Promise[Int]().failure(e).toString mustBe failureString - Await.ready(Future(i)(ExecutionContext.global), defaultTimeout).toString mustBe successString - Await.ready(Future(throw e)(ExecutionContext.global), defaultTimeout).toString mustBe failureString - } - } } diff --git a/test/files/jvm/future-termination.check b/test/files/jvm/future-termination.check deleted file mode 100644 index dc335465d4..0000000000 --- a/test/files/jvm/future-termination.check +++ /dev/null @@ -1 +0,0 @@ -I can't wait that long, bye. diff --git a/test/files/jvm/future-termination.scala b/test/files/jvm/future-termination.scala deleted file mode 100644 index 90ea336ce8..0000000000 --- a/test/files/jvm/future-termination.scala +++ /dev/null @@ -1,21 +0,0 @@ - -/* Test that unevaluated futures do not prevent program termination */ - - -@deprecated("Suppress warnings", since="2.11") -object Test { - import scala.actors.Futures - def main(args: Array[String]) { - try { - val meaningOfLife = Futures.future { - Thread.sleep(5000) // pretend this is a harder problem than it is - println("I have the answer!") - 42 - } - println("I can't wait that long, bye.") - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } -} diff --git a/test/files/jvm/innerClassAttribute.check b/test/files/jvm/innerClassAttribute.check deleted file mode 100644 index 41448f359b..0000000000 --- a/test/files/jvm/innerClassAttribute.check +++ /dev/null @@ -1,54 +0,0 @@ -#partest !-Ydelambdafy:method --- A4 -- -A4$$anonfun$f$1 / null / null / 17 -A4$$anonfun$f$1 / null / null / 17 -A4 / f / (Lscala/collection/immutable/List;)Lscala/collection/immutable/List; --- A19 -- -A19$$anonfun$1 / null / null / 17 -A19$$anonfun$2 / null / null / 17 -A19$$anonfun$3 / null / null / 17 -A19$$anonfun$1 / null / null / 17 -A19$$anonfun$2 / null / null / 17 -A19$$anonfun$3 / null / null / 17 -A19 / null / null -A19 / null / null -A19 / null / null --- A20 -- -A20$$anonfun$4 / null / null / 17 -fun1: attribute for itself and the two child closures `() => ()` and `() => () => 1` -A20$$anonfun$4 / null / null / 17 -A20$$anonfun$4$$anonfun$apply$1 / null / null / 17 -A20$$anonfun$4$$anonfun$apply$2 / null / null / 17 -fun2 () => (): itself and the outer closure -A20$$anonfun$4 / null / null / 17 -A20$$anonfun$4$$anonfun$apply$1 / null / null / 17 -fun3 () => () => (): itself, the outer closure and its child closure -A20$$anonfun$4 / null / null / 17 -A20$$anonfun$4$$anonfun$apply$2 / null / null / 17 -A20$$anonfun$4$$anonfun$apply$2$$anonfun$apply$3 / null / null / 17 -fun4: () => 1: itself and the two outer closures -A20$$anonfun$4 / null / null / 17 -A20$$anonfun$4$$anonfun$apply$2 / null / null / 17 -A20$$anonfun$4$$anonfun$apply$2$$anonfun$apply$3 / null / null / 17 -enclosing: nested closures have outer class defined, but no outer method -A20 / null / null -A20$$anonfun$4 / null / null -A20$$anonfun$4 / null / null -A20$$anonfun$4$$anonfun$apply$2 / null / null -#partest -Ydelambdafy:method --- A4 -- -null / null / null --- A19 -- -null / null / null -null / null / null -null / null / null --- A20 -- -fun1: attribute for itself and the two child closures `() => ()` and `() => () => 1` -fun2 () => (): itself and the outer closure -fun3 () => () => (): itself, the outer closure and its child closure -fun4: () => 1: itself and the two outer closures -enclosing: nested closures have outer class defined, but no outer method -null / null / null -null / null / null -null / null / null -null / null / null diff --git a/test/files/jvm/innerClassAttribute/Classes_1.scala b/test/files/jvm/innerClassAttribute/Classes_1.scala index 62c7d94d90..bffc495b4f 100644 --- a/test/files/jvm/innerClassAttribute/Classes_1.scala +++ b/test/files/jvm/innerClassAttribute/Classes_1.scala @@ -13,7 +13,7 @@ object A3 { class A4 { def f(l: List[String]): List[String] = { - l map (_ + "1") + l map (_ + "1") : @noinline // inlining adds a reference to the nested class scala/collection/generic/GenTraversableFactory$GenericCanBuildFrom } } @@ -186,42 +186,31 @@ trait A24 extends A24Base { } } -class SI_9105 { - // the EnclosingMethod attributes depend on the delambdafy strategy (inline vs method) - - // outerClass-inline enclMeth-inline outerClass-method enclMeth-method +class SI_9105 { + // outerClass enclMeth val fun = (s: String) => { - class A // closure null (*) SI_9105 null - def m: Object = { class B; new B } // closure m$1 SI_9105 m$1 - val f: Object = { class C; new C } // closure null (*) SI_9105 null + class A // SI_9105 null + def m: Object = { class B; new B } // SI_9105 m$1 + val f: Object = { class C; new C } // SI_9105 null } def met = (s: String) => { - class D // closure null (*) SI_9105 met - def m: Object = { class E; new E } // closure m$1 SI_9105 m$1 - val f: Object = { class F; new F } // closure null (*) SI_9105 met + class D // SI_9105 met + def m: Object = { class E; new E } // SI_9105 m$1 + val f: Object = { class F; new F } // SI_9105 met } - // (*) the originalOwner chain of A (similar for D) is: SI_9105.fun.$anonfun-value.A - // we can get to the anonfun-class (created by uncurry), but not to the apply method. - // - // for C and F, the originalOwner chain is fun.$anonfun-value.f.C. at later phases, the rawowner of f is - // an apply$sp method of the closure class. we could use that as enclosing method, but it would be unsystematic - // (A / D don't have an encl meth either), and also strange to use the $sp, which is a compilation artifact. - // So using `null` looks more like the situation in the source code: C / F are nested classes of the anon-fun, and - // there's no method in between. - def byName(op: => Any) = 0 val bnV = byName { - class G // closure null (*) SI_9105 null - def m: Object = { class H; new H } // closure m$1 SI_9105 m$1 - val f: Object = { class I; new I } // closure null (*) SI_9105 null + class G // SI_9105 null + def m: Object = { class H; new H } // SI_9105 m$1 + val f: Object = { class I; new I } // SI_9105 null "" } def bnM = byName { - class J // closure null (*) SI_9105 bnM - def m: Object = { class K; new K } // closure m$1 SI_9105 m$1 - val f: Object = { class L; new L } // closure null (*) SI_9105 bnM + class J // SI_9105 bnM + def m: Object = { class K; new K } // SI_9105 m$1 + val f: Object = { class L; new L } // SI_9105 bnM "" } } @@ -233,7 +222,7 @@ trait SI_9124 { def f = new A { def f2 = 0 } // enclosing method is f in the interface SI_9124 - private def g = new A { def f3 = 0 } // only encl class (SI_9124), encl meth is null because the interface SI_9124 doesn't have a method g + private def g: Object = new A { def f3 = 0 } // only encl class (SI_9124), encl meth can be g in 2.12 because the interface SI_9124 now has the method g object O { // member, no encl meth attribute new A { def f4 = 0 } // enclosing class is O$, no enclosing method @@ -280,13 +269,30 @@ class SpecializedClassesAreTopLevel { // } } +object AnonymousClassesMayBeNestedInSpecialized { + abstract class A + class C[@specialized(Int) T] { + def foo(t: T): A = new A { } + } + + // specialization duplicates the anonymous class, one copy is nested in the specialized subclass of C + + // class C$mcI$sp extends C[Int] { + // override def foo(t: Int): A = C$mcI$sp.this.foo$mcI$sp(t); + // override def foo$mcI$sp(t: Int): A = { + // final class $anon extends A { } + // new <$anon: A>() + // } + // } +} + object NestedInValueClass { // note that we can only test anonymous functions, nested classes are not allowed inside value classes class A(val arg: String) extends AnyVal { // A has InnerClass entries for the two closures (and for A and A$). not for B / C def f = { - def g = List().map(x => ((s: String) => x)) // outer class A, no outer method (g is moved to the companion, doesn't exist in A) - g.map(x => ((s: String) => x)) // outer class A, outer method f + def g = List().map(x => ((s: String) => x)): @noinline // outer class A, no outer method (g is moved to the companion, doesn't exist in A) + g.map(x => ((s: String) => x)): @noinline // outer class A, outer method f } // statements and field declarations are not allowed in value classes } diff --git a/test/files/jvm/innerClassAttribute/Test.scala b/test/files/jvm/innerClassAttribute/Test.scala index 3a6737ca46..1b78773d42 100644 --- a/test/files/jvm/innerClassAttribute/Test.scala +++ b/test/files/jvm/innerClassAttribute/Test.scala @@ -23,7 +23,7 @@ object Test extends BytecodeTest { def testInner(cls: String, fs: (InnerClassNode => Unit)*) = { val ns = innerClassNodes(cls) - assert(ns.length == fs.length, ns) + assert(ns.length == fs.length, ns.map(_.name)) (ns zip fs.toList) foreach { case (n, f) => f(n) } } @@ -78,9 +78,9 @@ object Test extends BytecodeTest { println(s"${e.outerClass} / ${e.name} / ${e.descriptor}") } - def lambdaClass(anonfunName: String, lambdaName: String): String = { - if (classpath.findClass(anonfunName).isDefined) anonfunName else lambdaName - } + + val methodHandlesLookup = assertMember(_: InnerClassNode, "java/lang/invoke/MethodHandles", "Lookup", flags = publicStatic | Flags.ACC_FINAL) + def testA1() = { val List(b1) = innerClassNodes("A1") @@ -109,11 +109,7 @@ object Test extends BytecodeTest { } def testA4() = { - println("-- A4 --") - printInnerClassNodes("A4") - val fun = lambdaClass("A4$$anonfun$f$1", "A4$lambda$$f$1") - printInnerClassNodes(fun) - printEnclosingMethod(fun) + testInner("A4", methodHandlesLookup) } def testA5() = { @@ -129,7 +125,6 @@ object Test extends BytecodeTest { def testA6() = { val List(tt1) = innerClassNodes("A6") assertMember(tt1, "A6", "TT", flags = publicAbstractInterface) - val List() = innerClassNodes("A6$class") val List(tt2) = innerClassNodes("A6$TT") assertMember(tt2, "A6", "TT", flags = publicAbstractInterface) } @@ -245,47 +240,11 @@ object Test extends BytecodeTest { } def testA19() = { - println("-- A19 --") - - printInnerClassNodes("A19") - - val fun1 = lambdaClass("A19$$anonfun$1", "A19$lambda$1") - val fun2 = lambdaClass("A19$$anonfun$2", "A19$lambda$2") - val fun3 = lambdaClass("A19$$anonfun$3", "A19$lambda$3") - - printInnerClassNodes(fun1) - printInnerClassNodes(fun2) - printInnerClassNodes(fun3) - - printEnclosingMethod(fun1) - printEnclosingMethod(fun2) - printEnclosingMethod(fun3) + testInner("A19", methodHandlesLookup) } def testA20() = { - println("-- A20 --") - - printInnerClassNodes("A20") - - val fun1 = lambdaClass("A20$$anonfun$4", "A20$lambda$1") - val fun2 = lambdaClass("A20$$anonfun$4$$anonfun$apply$1", "A20$lambda$$$nestedInAnonfun$5$1") - val fun3 = lambdaClass("A20$$anonfun$4$$anonfun$apply$2", "A20$lambda$$$nestedInAnonfun$5$2") - val fun4 = lambdaClass("A20$$anonfun$4$$anonfun$apply$2$$anonfun$apply$3", "A20$lambda$$$nestedInAnonfun$7$1") - - println("fun1: attribute for itself and the two child closures `() => ()` and `() => () => 1`") - printInnerClassNodes(fun1) - println("fun2 () => (): itself and the outer closure") - printInnerClassNodes(fun2) - println("fun3 () => () => (): itself, the outer closure and its child closure") - printInnerClassNodes(fun3) - println("fun4: () => 1: itself and the two outer closures") - printInnerClassNodes(fun4) - - println("enclosing: nested closures have outer class defined, but no outer method") - printEnclosingMethod(fun1) - printEnclosingMethod(fun2) - printEnclosingMethod(fun3) - printEnclosingMethod(fun4) + testInner("A20", methodHandlesLookup) } def testA21() = { @@ -335,70 +294,30 @@ object Test extends BytecodeTest { } def testSI_9105() { - val isDelambdafyMethod = classpath.findClass("SI_9105$lambda$1").isDefined - if (isDelambdafyMethod) { - assertEnclosingMethod ("SI_9105$A$3" , "SI_9105", null , null) - assertEnclosingMethod ("SI_9105$B$5" , "SI_9105", "m$1", "()Ljava/lang/Object;") - assertEnclosingMethod ("SI_9105$C$1" , "SI_9105", null , null) - assertEnclosingMethod ("SI_9105$D$1" , "SI_9105", "met", "()Lscala/Function1;") - assertEnclosingMethod ("SI_9105$E$1" , "SI_9105", "m$3", "()Ljava/lang/Object;") - assertEnclosingMethod ("SI_9105$F$1" , "SI_9105", "met", "()Lscala/Function1;") - assertNoEnclosingMethod("SI_9105$lambda$$met$1") - assertNoEnclosingMethod("SI_9105$lambda$1") - assertNoEnclosingMethod("SI_9105") - - assertLocal(innerClassNodes("SI_9105$A$3").head, "SI_9105$A$3", "A$3") - assertLocal(innerClassNodes("SI_9105$B$5").head, "SI_9105$B$5", "B$5") - assertLocal(innerClassNodes("SI_9105$C$1").head, "SI_9105$C$1", "C$1") - assertLocal(innerClassNodes("SI_9105$D$1").head, "SI_9105$D$1", "D$1") - assertLocal(innerClassNodes("SI_9105$E$1").head, "SI_9105$E$1", "E$1") - assertLocal(innerClassNodes("SI_9105$F$1").head, "SI_9105$F$1", "F$1") - - // by-name - assertEnclosingMethod("SI_9105$G$1", "SI_9105", null , null) - assertEnclosingMethod("SI_9105$H$1", "SI_9105", "m$2", "()Ljava/lang/Object;") - assertEnclosingMethod("SI_9105$I$1", "SI_9105", null , null) - assertEnclosingMethod("SI_9105$J$1", "SI_9105", "bnM", "()I") - assertEnclosingMethod("SI_9105$K$2", "SI_9105", "m$4", "()Ljava/lang/Object;") - assertEnclosingMethod("SI_9105$L$1", "SI_9105", "bnM", "()I") - - assert(innerClassNodes("SI_9105$lambda$$met$1").isEmpty) - assert(innerClassNodes("SI_9105$lambda$1").isEmpty) - assert(innerClassNodes("SI_9105").length == 12) // the 12 local classes - } else { - // comment in innerClassAttribute/Classes_1.scala explains the difference between A / C and D / F. - assertEnclosingMethod ("SI_9105$$anonfun$5$A$3" , "SI_9105$$anonfun$5" , null , null) - assertEnclosingMethod ("SI_9105$$anonfun$5$B$5" , "SI_9105$$anonfun$5" , "m$1" , "()Ljava/lang/Object;") - assertEnclosingMethod ("SI_9105$$anonfun$5$C$1" , "SI_9105$$anonfun$5" , null , null) - assertEnclosingMethod ("SI_9105$$anonfun$met$1$D$1", "SI_9105$$anonfun$met$1", null , null) - assertEnclosingMethod ("SI_9105$$anonfun$met$1$E$1", "SI_9105$$anonfun$met$1", "m$3" , "()Ljava/lang/Object;") - assertEnclosingMethod ("SI_9105$$anonfun$met$1$F$1", "SI_9105$$anonfun$met$1", null , null) - assertEnclosingMethod ("SI_9105$$anonfun$5" , "SI_9105" , null , null) - assertEnclosingMethod ("SI_9105$$anonfun$met$1" , "SI_9105" , "met" , "()Lscala/Function1;") - assertNoEnclosingMethod("SI_9105") - - assertLocal(ownInnerClassNode("SI_9105$$anonfun$5$A$3"), "SI_9105$$anonfun$5$A$3" , "A$3") - assertLocal(ownInnerClassNode("SI_9105$$anonfun$5$B$5"), "SI_9105$$anonfun$5$B$5" , "B$5") - assertLocal(ownInnerClassNode("SI_9105$$anonfun$5$C$1"), "SI_9105$$anonfun$5$C$1" , "C$1") - assertLocal(ownInnerClassNode("SI_9105$$anonfun$met$1$D$1"), "SI_9105$$anonfun$met$1$D$1", "D$1") - assertLocal(ownInnerClassNode("SI_9105$$anonfun$met$1$E$1"), "SI_9105$$anonfun$met$1$E$1", "E$1") - assertLocal(ownInnerClassNode("SI_9105$$anonfun$met$1$F$1"), "SI_9105$$anonfun$met$1$F$1", "F$1") - - // by-name - assertEnclosingMethod("SI_9105$$anonfun$6$G$1", "SI_9105$$anonfun$6", null, null) - assertEnclosingMethod("SI_9105$$anonfun$6$H$1", "SI_9105$$anonfun$6", "m$2", "()Ljava/lang/Object;") - assertEnclosingMethod("SI_9105$$anonfun$6$I$1", "SI_9105$$anonfun$6", null, null) - assertEnclosingMethod("SI_9105$$anonfun$bnM$1$J$1", "SI_9105$$anonfun$bnM$1", null, null) - assertEnclosingMethod("SI_9105$$anonfun$bnM$1$K$2", "SI_9105$$anonfun$bnM$1", "m$4", "()Ljava/lang/Object;") - assertEnclosingMethod("SI_9105$$anonfun$bnM$1$L$1", "SI_9105$$anonfun$bnM$1", null, null) - - assertAnonymous(ownInnerClassNode("SI_9105$$anonfun$5"), "SI_9105$$anonfun$5") - assertAnonymous(ownInnerClassNode("SI_9105$$anonfun$met$1"), "SI_9105$$anonfun$met$1") - - assert(innerClassNodes("SI_9105$$anonfun$5").length == 4) // itself and three of the local classes - assert(innerClassNodes("SI_9105$$anonfun$met$1").length == 4) // itself and three of the local classes - assert(innerClassNodes("SI_9105").length == 4) // the four anon funs - } + assertEnclosingMethod ("SI_9105$A$3" , "SI_9105", null , null) + assertEnclosingMethod ("SI_9105$B$5" , "SI_9105", "m$1", "()Ljava/lang/Object;") + assertEnclosingMethod ("SI_9105$C$1" , "SI_9105", null , null) + assertEnclosingMethod ("SI_9105$D$1" , "SI_9105", "met", "()Lscala/Function1;") + assertEnclosingMethod ("SI_9105$E$1" , "SI_9105", "m$3", "()Ljava/lang/Object;") + assertEnclosingMethod ("SI_9105$F$1" , "SI_9105", "met", "()Lscala/Function1;") + assertNoEnclosingMethod("SI_9105") + + assertLocal(innerClassNodes("SI_9105$A$3").head, "SI_9105$A$3", "A$3") + assertLocal(innerClassNodes("SI_9105$B$5").head, "SI_9105$B$5", "B$5") + assertLocal(innerClassNodes("SI_9105$C$1").head, "SI_9105$C$1", "C$1") + assertLocal(innerClassNodes("SI_9105$D$1").head, "SI_9105$D$1", "D$1") + assertLocal(innerClassNodes("SI_9105$E$1").head, "SI_9105$E$1", "E$1") + assertLocal(innerClassNodes("SI_9105$F$1").head, "SI_9105$F$1", "F$1") + + // by-name + assertEnclosingMethod("SI_9105$G$1", "SI_9105", null , null) + assertEnclosingMethod("SI_9105$H$1", "SI_9105", "m$2", "()Ljava/lang/Object;") + assertEnclosingMethod("SI_9105$I$1", "SI_9105", null , null) + assertEnclosingMethod("SI_9105$J$1", "SI_9105", "bnM", "()I") + assertEnclosingMethod("SI_9105$K$2", "SI_9105", "m$4", "()Ljava/lang/Object;") + assertEnclosingMethod("SI_9105$L$1", "SI_9105", "bnM", "()I") + + assert(innerClassNodes("SI_9105").length == 13) // the 12 local classes, plus MethodHandles$Lookup } def testSI_9124() { @@ -420,7 +339,7 @@ object Test extends BytecodeTest { assertNoEnclosingMethod("SI_9124$A") assertEnclosingMethod(classes("f1"), "SI_9124", null, null) assertEnclosingMethod(classes("f2"), "SI_9124", "f", "()LSI_9124$A;") - assertEnclosingMethod(classes("f3"), "SI_9124", null, null) + assertEnclosingMethod(classes("f3"), "SI_9124", "g", "()Ljava/lang/Object;") assertEnclosingMethod(classes("f4"), "SI_9124$O$", null, null) assertEnclosingMethod(classes("f5"), "SI_9124", null, null) assertEnclosingMethod(classes("f6"), "SI_9124", null, null) @@ -431,25 +350,19 @@ object Test extends BytecodeTest { assertMember(ownInnerClassNode("SI_9124$O$"), "SI_9124", "O$") } + // Note: the new trait encoding removed impl classes, so this test name doesn't make sense. + // But I've left it here as there were some tests remaining that are still relevant. def testImplClassesTopLevel() { val classes = List( "ImplClassesAreTopLevel$$anon$14", "ImplClassesAreTopLevel$$anon$15", "ImplClassesAreTopLevel$$anon$16", - "ImplClassesAreTopLevel$B1$class", "ImplClassesAreTopLevel$B1", - "ImplClassesAreTopLevel$B2$1$class", "ImplClassesAreTopLevel$B2$1", - "ImplClassesAreTopLevel$B3$1$class", "ImplClassesAreTopLevel$B3$1", - "ImplClassesAreTopLevel$B4$class", "ImplClassesAreTopLevel$B4$1", - "ImplClassesAreTopLevel$class", "ImplClassesAreTopLevel") - classes.filter(_.endsWith("$class")).foreach(assertNoEnclosingMethod) - classes.flatMap(innerClassNodes).foreach(icn => assert(!icn.name.endsWith("$class"), icn)) - assertNoEnclosingMethod("ImplClassesAreTopLevel$B1") // member, no encl meth attr // no encl meth, but encl class @@ -471,17 +384,11 @@ object Test extends BytecodeTest { testInner("ImplClassesAreTopLevel$$anon$15", an15, b2) testInner("ImplClassesAreTopLevel$$anon$16", an16, b4) - testInner("ImplClassesAreTopLevel$B1$class", b1) - testInner("ImplClassesAreTopLevel$B2$1$class", b2) - testInner("ImplClassesAreTopLevel$B3$1$class", b3) - testInner("ImplClassesAreTopLevel$B4$class", b4) - testInner("ImplClassesAreTopLevel$B1", b1) testInner("ImplClassesAreTopLevel$B2$1", b2) testInner("ImplClassesAreTopLevel$B3$1", b3) testInner("ImplClassesAreTopLevel$B4$1", b4) - testInner("ImplClassesAreTopLevel$class", an14, an15, an16) testInner("ImplClassesAreTopLevel", an14, an15, an16, b1, b2, b3, b4) } @@ -507,6 +414,11 @@ object Test extends BytecodeTest { List("SpecializedClassesAreTopLevel$T$", "SpecializedClassesAreTopLevel$T$B$mcI$sp", "SpecializedClassesAreTopLevel$T$B").foreach(testInner(_, t, b)) } + def testAnonymousClassesMayBeNestedInSpecialized() { + assertEnclosingMethod("AnonymousClassesMayBeNestedInSpecialized$C$$anon$17", "AnonymousClassesMayBeNestedInSpecialized$C", "foo", "(Ljava/lang/Object;)LAnonymousClassesMayBeNestedInSpecialized$A;") + assertEnclosingMethod("AnonymousClassesMayBeNestedInSpecialized$C$mcI$sp$$anon$18", "AnonymousClassesMayBeNestedInSpecialized$C$mcI$sp", "foo$mcI$sp", "(I)LAnonymousClassesMayBeNestedInSpecialized$A;") + } + def testNestedInValueClass() { List( "NestedInValueClass", @@ -528,37 +440,8 @@ object Test extends BytecodeTest { testInner("NestedInValueClass$A$B", am, b) testInner("NestedInValueClass$A$C$2", am, c) - val isDelambdafyMethod = classpath.findClass("NestedInValueClass$A$lambda$$f$extension$1").isDefined - if (isDelambdafyMethod) { - List( - "NestedInValueClass$A$lambda$$g$2$1", - "NestedInValueClass$A$lambda$$f$extension$1", - "NestedInValueClass$A$lambda$$$nestedInAnonfun$13$1", - "NestedInValueClass$A$lambda$$NestedInValueClass$A$$$nestedInAnonfun$15$1").foreach(assertNoEnclosingMethod) - testInner("NestedInValueClass$A", a, am) - testInner("NestedInValueClass$A$", a, am, b, c) - testInner("NestedInValueClass$A$lambda$$g$2$1", am) - testInner("NestedInValueClass$A$lambda$$f$extension$1", am) - testInner("NestedInValueClass$A$lambda$$$nestedInAnonfun$13$1", am) - testInner("NestedInValueClass$A$lambda$$NestedInValueClass$A$$$nestedInAnonfun$15$1", am) - } else { - assertEnclosingMethod("NestedInValueClass$A$$anonfun$g$2$1" , "NestedInValueClass$A" , null, null) - assertEnclosingMethod("NestedInValueClass$A$$anonfun$g$2$1$$anonfun$apply$4" , "NestedInValueClass$A$$anonfun$g$2$1" , null, null) - assertEnclosingMethod("NestedInValueClass$A$$anonfun$f$extension$1" , "NestedInValueClass$A" , "f", "()Lscala/collection/immutable/List;") - assertEnclosingMethod("NestedInValueClass$A$$anonfun$f$extension$1$$anonfun$apply$5", "NestedInValueClass$A$$anonfun$f$extension$1", null, null) - - val gfun = assertAnonymous(_: I, "NestedInValueClass$A$$anonfun$g$2$1") - val ffun = assertAnonymous(_: I, "NestedInValueClass$A$$anonfun$f$extension$1") - val gfunfun = assertAnonymous(_: I, "NestedInValueClass$A$$anonfun$g$2$1$$anonfun$apply$4") - val ffunfun = assertAnonymous(_: I, "NestedInValueClass$A$$anonfun$f$extension$1$$anonfun$apply$5") - - testInner("NestedInValueClass$A", a, am, ffun, gfun) - testInner("NestedInValueClass$A$", a, am, ffun, gfun, b, c) - testInner("NestedInValueClass$A$$anonfun$g$2$1", a, am, gfun, gfunfun) - testInner("NestedInValueClass$A$$anonfun$g$2$1$$anonfun$apply$4", am, gfun, gfunfun) - testInner("NestedInValueClass$A$$anonfun$f$extension$1", a, am, ffun, ffunfun) - testInner("NestedInValueClass$A$$anonfun$f$extension$1$$anonfun$apply$5", am, ffun, ffunfun) - } + testInner("NestedInValueClass$A", a, am) + testInner("NestedInValueClass$A$", a, am, b, c, methodHandlesLookup) } def show(): Unit = { @@ -588,6 +471,7 @@ object Test extends BytecodeTest { testSI_9124() testImplClassesTopLevel() testSpecializedClassesTopLevel() + testAnonymousClassesMayBeNestedInSpecialized() testNestedInValueClass() } } diff --git a/test/files/jvm/javaReflection.check b/test/files/jvm/javaReflection.check index 8180ecff8a..9e9fe36d14 100644 --- a/test/files/jvm/javaReflection.check +++ b/test/files/jvm/javaReflection.check @@ -1,86 +1,3 @@ -#partest !-Ydelambdafy:method -A$$anonfun$$lessinit$greater$1 / null (canon) / $anonfun$$lessinit$greater$1 (simple) -- declared cls: List() -- enclosing : null (declaring cls) / class A (cls) / public A(int) (constr) / null (meth) -- properties : true (local) / false (member) -A$$anonfun$$lessinit$greater$1$$anonfun$apply$1 / null (canon) / $anonfun$apply$1 (simple) -- declared cls: List() -- enclosing : null (declaring cls) / class A$$anonfun$$lessinit$greater$1 (cls) / null (constr) / null (meth) -- properties : true (local) / false (member) -A$$anonfun$2 / null (canon) / $anonfun$2 (simple) -- declared cls: List() -- enclosing : null (declaring cls) / class A (cls) / null (constr) / null (meth) -- properties : true (local) / false (member) -A$$anonfun$3 / null (canon) / $anonfun$3 (simple) -- declared cls: List() -- enclosing : null (declaring cls) / class A (cls) / null (constr) / null (meth) -- properties : true (local) / false (member) -A$$anonfun$4 / null (canon) / $anonfun$4 (simple) -- declared cls: List() -- enclosing : null (declaring cls) / class A (cls) / null (constr) / null (meth) -- properties : true (local) / false (member) -A$$anonfun$f$1 / null (canon) / $anonfun$f$1 (simple) -- declared cls: List() -- enclosing : null (declaring cls) / class A (cls) / null (constr) / public java.lang.Object A.f() (meth) -- properties : true (local) / false (member) -A$$anonfun$f$2 / null (canon) / $anonfun$f$2 (simple) -- declared cls: List() -- enclosing : null (declaring cls) / class A (cls) / null (constr) / public java.lang.Object A.f() (meth) -- properties : true (local) / false (member) -A$D$$anonfun$1 / null (canon) / anonfun$1 (simple) -- declared cls: List() -- enclosing : null (declaring cls) / class A$D$ (cls) / null (constr) / null (meth) -- properties : true (local) / false (member) -AO$$anonfun$5 / null (canon) / anonfun$5 (simple) -- declared cls: List() -- enclosing : null (declaring cls) / class AO$ (cls) / null (constr) / null (meth) -- properties : true (local) / false (member) -AT$$anonfun$6 / null (canon) / $anonfun$6 (simple) -- declared cls: List() -- enclosing : null (declaring cls) / interface AT (cls) / null (constr) / null (meth) -- properties : true (local) / false (member) -#partest -Ydelambdafy:method -A$D$lambda$1 / A$D$lambda$1 (canon) / A$D$lambda$1 (simple) -- declared cls: List() -- enclosing : null (declaring cls) / null (cls) / null (constr) / null (meth) -- properties : false (local) / false (member) -A$lambda$$$lessinit$greater$1 / A$lambda$$$lessinit$greater$1 (canon) / A$lambda$$$lessinit$greater$1 (simple) -- declared cls: List() -- enclosing : null (declaring cls) / null (cls) / null (constr) / null (meth) -- properties : false (local) / false (member) -A$lambda$$$nestedInAnonfun$7$1 / A$lambda$$$nestedInAnonfun$7$1 (canon) / A$lambda$$$nestedInAnonfun$7$1 (simple) -- declared cls: List() -- enclosing : null (declaring cls) / null (cls) / null (constr) / null (meth) -- properties : false (local) / false (member) -A$lambda$$f$1 / A$lambda$$f$1 (canon) / A$lambda$$f$1 (simple) -- declared cls: List() -- enclosing : null (declaring cls) / null (cls) / null (constr) / null (meth) -- properties : false (local) / false (member) -A$lambda$$f$2 / A$lambda$$f$2 (canon) / A$lambda$$f$2 (simple) -- declared cls: List() -- enclosing : null (declaring cls) / null (cls) / null (constr) / null (meth) -- properties : false (local) / false (member) -A$lambda$1 / A$lambda$1 (canon) / A$lambda$1 (simple) -- declared cls: List() -- enclosing : null (declaring cls) / null (cls) / null (constr) / null (meth) -- properties : false (local) / false (member) -A$lambda$2 / A$lambda$2 (canon) / A$lambda$2 (simple) -- declared cls: List() -- enclosing : null (declaring cls) / null (cls) / null (constr) / null (meth) -- properties : false (local) / false (member) -A$lambda$3 / A$lambda$3 (canon) / A$lambda$3 (simple) -- declared cls: List() -- enclosing : null (declaring cls) / null (cls) / null (constr) / null (meth) -- properties : false (local) / false (member) -AO$lambda$1 / AO$lambda$1 (canon) / AO$lambda$1 (simple) -- declared cls: List() -- enclosing : null (declaring cls) / null (cls) / null (constr) / null (meth) -- properties : false (local) / false (member) -AT$class$lambda$1 / AT$class$lambda$1 (canon) / AT$class$lambda$1 (simple) -- declared cls: List() -- enclosing : null (declaring cls) / null (cls) / null (constr) / null (meth) -- properties : false (local) / false (member) -#partest A / A (canon) / A (simple) - declared cls: List(class A$B, interface A$C, class A$D$) - enclosing : null (declaring cls) / null (cls) / null (constr) / null (meth) @@ -245,15 +162,7 @@ AT$D$ / AT.D$ (canon) / D$ (simple) - declared cls: List() - enclosing : interface AT (declaring cls) / interface AT (cls) / null (constr) / null (meth) - properties : false (local) / true (member) -AT$class / AT$class (canon) / AT$class (simple) -- declared cls: List() -- enclosing : null (declaring cls) / null (cls) / null (constr) / null (meth) -- properties : false (local) / false (member) T / T (canon) / T (simple) - declared cls: List() - enclosing : null (declaring cls) / null (cls) / null (constr) / null (meth) - properties : false (local) / false (member) -T$class / T$class (canon) / T$class (simple) -- declared cls: List() -- enclosing : null (declaring cls) / null (cls) / null (constr) / null (meth) -- properties : false (local) / false (member) diff --git a/test/files/jvm/nooptimise/Foo_1.flags b/test/files/jvm/nooptimise/Foo_1.flags deleted file mode 100644 index f493cf9f3f..0000000000 --- a/test/files/jvm/nooptimise/Foo_1.flags +++ /dev/null @@ -1 +0,0 @@ --Ybackend:GenASM -optimise -Ynooptimise
\ No newline at end of file diff --git a/test/files/jvm/nooptimise/Foo_1.scala b/test/files/jvm/nooptimise/Foo_1.scala deleted file mode 100644 index 896d5695de..0000000000 --- a/test/files/jvm/nooptimise/Foo_1.scala +++ /dev/null @@ -1,8 +0,0 @@ -class Foo_1 { - def foo() { - // optimization will remove this magic 3 from appearing in the source - // so -Ynooptimize should prevent that - val x = 3 - - } -} diff --git a/test/files/jvm/nooptimise/Test.scala b/test/files/jvm/nooptimise/Test.scala deleted file mode 100644 index 7b7ecd6dbd..0000000000 --- a/test/files/jvm/nooptimise/Test.scala +++ /dev/null @@ -1,23 +0,0 @@ -import scala.tools.partest.BytecodeTest -import scala.tools.asm -import asm.tree.InsnList -import scala.collection.JavaConverters._ - -object Test extends BytecodeTest { - def show: Unit = { - val classNode = loadClassNode("Foo_1") - val methodNode = getMethod(classNode, "foo") - // if optimization didn't run then - // there should be some useless instructions - // with the magic constant 3 - val expected = 1 - val got = countMagicThrees(methodNode.instructions) - assert(got == expected, s"expected $expected but got $got magic threes") - } - - def countMagicThrees(insnList: InsnList): Int = { - def isMagicThree(node: asm.tree.AbstractInsnNode): Boolean = - (node.getOpcode == asm.Opcodes.ICONST_3) - insnList.iterator.asScala.count(isMagicThree) - } -} diff --git a/test/files/jvm/patmat_opt_ignore_underscore.check b/test/files/jvm/patmat_opt_ignore_underscore.check deleted file mode 100644 index 43f53aba12..0000000000 --- a/test/files/jvm/patmat_opt_ignore_underscore.check +++ /dev/null @@ -1 +0,0 @@ -bytecode identical diff --git a/test/files/jvm/patmat_opt_ignore_underscore.flags b/test/files/jvm/patmat_opt_ignore_underscore.flags deleted file mode 100644 index 2cd4b38726..0000000000 --- a/test/files/jvm/patmat_opt_ignore_underscore.flags +++ /dev/null @@ -1 +0,0 @@ --optimize -Ybackend:GenASM
\ No newline at end of file diff --git a/test/files/jvm/patmat_opt_ignore_underscore/Analyzed_1.scala b/test/files/jvm/patmat_opt_ignore_underscore/Analyzed_1.scala deleted file mode 100644 index b0506018f6..0000000000 --- a/test/files/jvm/patmat_opt_ignore_underscore/Analyzed_1.scala +++ /dev/null @@ -1,29 +0,0 @@ -// this class's bytecode, compiled under -optimize is analyzed by the test -// method a's bytecode should be identical to method b's bytecode -// this is not the best test for shielding against regressing on this particular issue, -// but it sets the stage for checking the bytecode emitted by the pattern matcher and -// comparing it to manually tuned code using if/then/else etc. -class SameBytecode { - case class Foo(x: Any, y: String) - - def a = - Foo(1, "a") match { - case Foo(_: String, y) => y - } - - // this method's body holds the tree that should be generated by the pattern matcher for method a (-Xprint:patmat) - // the test checks that bytecode for a and b is identical (modulo line numbers) - // we can't diff trees as they are quite different (patmat uses jumps to labels that cannot be expressed in source, for example) - // note that the actual tree is quite bad: we do an unnecessary null check, isInstanceOf and local val (x3) - // some of these will be fixed soon (the initial null check is for the scrutinee, which is harder to fix in patmat) - def b: String = { - val x1 = Foo(1, "a") - if (x1.ne(null)) { - if (x1.x.isInstanceOf[String]) { - return x1.y - } - } - - throw new MatchError(x1) - } -}
\ No newline at end of file diff --git a/test/files/jvm/patmat_opt_ignore_underscore/test.scala b/test/files/jvm/patmat_opt_ignore_underscore/test.scala deleted file mode 100644 index 6179101a7e..0000000000 --- a/test/files/jvm/patmat_opt_ignore_underscore/test.scala +++ /dev/null @@ -1,15 +0,0 @@ -import scala.tools.partest.BytecodeTest - -import scala.tools.nsc.util.JavaClassPath -import java.io.InputStream -import scala.tools.asm -import asm.ClassReader -import asm.tree.{ClassNode, InsnList} -import scala.collection.JavaConverters._ - -object Test extends BytecodeTest { - def show: Unit = { - val classNode = loadClassNode("SameBytecode") - sameBytecode(getMethod(classNode, "a"), getMethod(classNode, "b")) - } -} diff --git a/test/files/jvm/patmat_opt_no_nullcheck.check b/test/files/jvm/patmat_opt_no_nullcheck.check deleted file mode 100644 index 43f53aba12..0000000000 --- a/test/files/jvm/patmat_opt_no_nullcheck.check +++ /dev/null @@ -1 +0,0 @@ -bytecode identical diff --git a/test/files/jvm/patmat_opt_no_nullcheck.flags b/test/files/jvm/patmat_opt_no_nullcheck.flags deleted file mode 100644 index 2cd4b38726..0000000000 --- a/test/files/jvm/patmat_opt_no_nullcheck.flags +++ /dev/null @@ -1 +0,0 @@ --optimize -Ybackend:GenASM
\ No newline at end of file diff --git a/test/files/jvm/patmat_opt_no_nullcheck/Analyzed_1.scala b/test/files/jvm/patmat_opt_no_nullcheck/Analyzed_1.scala deleted file mode 100644 index 1e4d564cdf..0000000000 --- a/test/files/jvm/patmat_opt_no_nullcheck/Analyzed_1.scala +++ /dev/null @@ -1,24 +0,0 @@ -// this class's bytecode, compiled under -optimize is analyzed by the test -// method a's bytecode should be identical to method b's bytecode -case class Foo(x: Any) - -class SameBytecode { - def a = - (Foo(1): Any) match { - case Foo(_: String) => - } - - // there's no null check - def b: Unit = { - val x1: Any = Foo(1) - if (x1.isInstanceOf[Foo]) { - val x3 = x1.asInstanceOf[Foo] - if (x3.x.isInstanceOf[String]) { - val x = () - return - } - } - - throw new MatchError(x1) - } -}
\ No newline at end of file diff --git a/test/files/jvm/patmat_opt_no_nullcheck/test.scala b/test/files/jvm/patmat_opt_no_nullcheck/test.scala deleted file mode 100644 index 2927e763d5..0000000000 --- a/test/files/jvm/patmat_opt_no_nullcheck/test.scala +++ /dev/null @@ -1,8 +0,0 @@ -import scala.tools.partest.BytecodeTest - -object Test extends BytecodeTest { - def show: Unit = { - val classNode = loadClassNode("SameBytecode") - sameBytecode(getMethod(classNode, "a"), getMethod(classNode, "b")) - } -} diff --git a/test/files/jvm/patmat_opt_primitive_typetest.check b/test/files/jvm/patmat_opt_primitive_typetest.check deleted file mode 100644 index 43f53aba12..0000000000 --- a/test/files/jvm/patmat_opt_primitive_typetest.check +++ /dev/null @@ -1 +0,0 @@ -bytecode identical diff --git a/test/files/jvm/patmat_opt_primitive_typetest.flags b/test/files/jvm/patmat_opt_primitive_typetest.flags deleted file mode 100644 index b9bb09167e..0000000000 --- a/test/files/jvm/patmat_opt_primitive_typetest.flags +++ /dev/null @@ -1 +0,0 @@ --optimize -Ybackend:GenASM diff --git a/test/files/jvm/patmat_opt_primitive_typetest/Analyzed_1.scala b/test/files/jvm/patmat_opt_primitive_typetest/Analyzed_1.scala deleted file mode 100644 index c961082fa7..0000000000 --- a/test/files/jvm/patmat_opt_primitive_typetest/Analyzed_1.scala +++ /dev/null @@ -1,24 +0,0 @@ -// this class's bytecode, compiled under -optimize is analyzed by the test -// method a's bytecode should be identical to method b's bytecode -class SameBytecode { - case class Foo(x: Int, y: String) - - def a = - Foo(1, "a") match { - case Foo(_: Int, y) => y - } - - // this method's body holds the tree that should be generated by the pattern matcher for method a (-Xprint:patmat) - // the test checks that bytecode for a and b is identical (modulo line numbers) - // we can't diff trees as they are quite different (patmat uses jumps to labels that cannot be expressed in source, for example) - // note that the actual tree is quite bad: we do an unnecessary null check, and local val (x3) - // some of these will be fixed soon (the initial null check is for the scrutinee, which is harder to fix in patmat) - def b: String = { - val x1 = Foo(1, "a") - if (x1.ne(null)) { - return x1.y - } - - throw new MatchError(x1) - } -}
\ No newline at end of file diff --git a/test/files/jvm/patmat_opt_primitive_typetest/test.scala b/test/files/jvm/patmat_opt_primitive_typetest/test.scala deleted file mode 100644 index 2927e763d5..0000000000 --- a/test/files/jvm/patmat_opt_primitive_typetest/test.scala +++ /dev/null @@ -1,8 +0,0 @@ -import scala.tools.partest.BytecodeTest - -object Test extends BytecodeTest { - def show: Unit = { - val classNode = loadClassNode("SameBytecode") - sameBytecode(getMethod(classNode, "a"), getMethod(classNode, "b")) - } -} diff --git a/test/files/jvm/reactor-exceptionOnSend.check b/test/files/jvm/reactor-exceptionOnSend.check deleted file mode 100644 index 45d62e26a7..0000000000 --- a/test/files/jvm/reactor-exceptionOnSend.check +++ /dev/null @@ -1,2 +0,0 @@ -receiver handles exception -process diff --git a/test/files/jvm/reactor-exceptionOnSend.scala b/test/files/jvm/reactor-exceptionOnSend.scala deleted file mode 100644 index 6d79fc9d13..0000000000 --- a/test/files/jvm/reactor-exceptionOnSend.scala +++ /dev/null @@ -1,58 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { -import scala.actors.Reactor -import scala.actors.Actor._ - -case class MyException(text: String) extends Exception(text) - -object A extends Reactor[Any] { - override def exceptionHandler = { - case MyException(text) => - println("receiver handles exception") - } - - def guard(): Boolean = - if (state == 0) { - state = 1 - throw MyException("illegal state") - } else - true - - var state = 0 - - def act() { - try { - loop { - react { - case 'hello if guard() => - println("process") - exit() - } - } - } catch { - case e: Throwable if (!e.isInstanceOf[scala.util.control.ControlThrowable] && - !e.isInstanceOf[MyException]) => - e.printStackTrace() - } - } -} - -object B extends Reactor[Any] { - def act() { - try { - A.start() - A ! 'hello - A ! 'hello - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } -} - - def main(args: Array[String]) { - B.start() - } -} diff --git a/test/files/jvm/reactor-producer-consumer.check b/test/files/jvm/reactor-producer-consumer.check deleted file mode 100644 index d971cea19e..0000000000 --- a/test/files/jvm/reactor-producer-consumer.check +++ /dev/null @@ -1,10 +0,0 @@ -42 -42 -42 -42 -42 -42 -42 -42 -42 -42 diff --git a/test/files/jvm/reactor-producer-consumer.scala b/test/files/jvm/reactor-producer-consumer.scala deleted file mode 100644 index ec34febe01..0000000000 --- a/test/files/jvm/reactor-producer-consumer.scala +++ /dev/null @@ -1,97 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { - import scala.actors.Reactor - case class Stop() - case class Get(from: Reactor[Any]) - case class Put(x: Int) - - class UnboundedBuffer extends Reactor[Any] { - def act() { - try { - react { - case Stop() => - case Get(from) => - val consumer = from - react { - case msg @ Put(x) => - consumer ! x - act() - } - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - } - - class Producer(buf: UnboundedBuffer, n: Int, delay: Long, parent: Reactor[Any]) extends Reactor[Any] { - def act() { - try { - var i = 0 - while (i < n) { - i += 1 - if (delay > 0) Thread.sleep(delay) - buf ! Put(42) - } - parent ! Stop() - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - } - - class Consumer(buf: UnboundedBuffer, n: Int, delay: Long, parent: Reactor[Any]) extends Reactor[Any] { - val step = n / 10 - var i = 0 - def act() { - try { - if (i < n) { - i += 1 - if (delay > 0) Thread.sleep(delay) - buf ! Get(this) - react { - case res => - if (i % step == 0) - println(res) - act() - } - } else { - parent ! Stop() - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - } - - def main(args: Array[String]) { - val parent = new Reactor[Any] { - def act() { - try { - val buffer = new UnboundedBuffer - buffer.start() - val producer = new Producer(buffer, 10000, 0, this) - producer.start() - val consumer = new Consumer(buffer, 10000, 0, this) - consumer.start() - react { - case Stop() => - react { - case Stop() => - buffer ! Stop() - } - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - } - parent.start() - } -} diff --git a/test/files/jvm/reactor.check b/test/files/jvm/reactor.check deleted file mode 100644 index 7b16085797..0000000000 --- a/test/files/jvm/reactor.check +++ /dev/null @@ -1,22 +0,0 @@ -Pong: ping 0 -Ping: pong -Pong: ping 10000 -Ping: pong -Pong: ping 20000 -Ping: pong -Pong: ping 30000 -Ping: pong -Pong: ping 40000 -Ping: pong -Pong: ping 50000 -Ping: pong -Pong: ping 60000 -Ping: pong -Pong: ping 70000 -Ping: pong -Pong: ping 80000 -Ping: pong -Pong: ping 90000 -Ping: pong -Ping: stop -Pong: stop diff --git a/test/files/jvm/reactor.scala b/test/files/jvm/reactor.scala deleted file mode 100644 index 91ded27f07..0000000000 --- a/test/files/jvm/reactor.scala +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Ping pong example for Reactor. - * - * @author Philipp Haller - */ - -@deprecated("Suppress warnings", since="2.11") -object Test { - -import scala.actors.Reactor - -case class Ping(from: Reactor[Any]) -case object Pong -case object Stop - - def main(args: Array[String]) { - val pong = new PongActor - val ping = new PingActor(100000, pong) - ping.start - pong.start - } - -class PingActor(count: Int, pong: Reactor[Any]) extends Reactor[Any] { - def act() { - try { - var pingsLeft = count - 1 - pong ! Ping(this) - loop { - react { - case Pong => - if (pingsLeft % 10000 == 0) - println("Ping: pong") - if (pingsLeft > 0) { - pong ! Ping(this) - pingsLeft -= 1 - } else { - println("Ping: stop") - pong ! Stop - exit() - } - } - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } -} - -class PongActor extends Reactor[Any] { - def act() { - try { - var pongCount = 0 - loop { - react { - case Ping(from) => - if (pongCount % 10000 == 0) - println("Pong: ping "+pongCount) - from ! Pong - pongCount += 1 - case Stop => - println("Pong: stop") - exit() - } - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } -} -} diff --git a/test/files/jvm/replyablereactor.check b/test/files/jvm/replyablereactor.check deleted file mode 100644 index 0944b17279..0000000000 --- a/test/files/jvm/replyablereactor.check +++ /dev/null @@ -1,5 +0,0 @@ -'hello -'hello -'hello -'hello -'hello diff --git a/test/files/jvm/replyablereactor.scala b/test/files/jvm/replyablereactor.scala deleted file mode 100644 index 4c4e13d9ab..0000000000 --- a/test/files/jvm/replyablereactor.scala +++ /dev/null @@ -1,59 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { -import scala.actors.ReplyReactor - -class MyActor extends ReplyReactor { - def act() { - try { - loop { - react { - case 'hello => - sender ! 'hello - case 'stop => - exit() - } - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } -} - - def main(args: Array[String]) { - val a = new MyActor - a.start() - - val b = new ReplyReactor { - def act() { - try { - react { - case r: MyActor => - var i = 0 - loop { - i += 1 - val ft = r !! 'hello - ft.inputChannel.react { - case msg => - if (i % 10000 == 0) - println(msg) - if (i >= 50000) { - r ! 'stop - exit() - } - } - } - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - } - b.start() - - b ! a - } -} diff --git a/test/files/jvm/replyablereactor2.check b/test/files/jvm/replyablereactor2.check deleted file mode 100644 index 0944b17279..0000000000 --- a/test/files/jvm/replyablereactor2.check +++ /dev/null @@ -1,5 +0,0 @@ -'hello -'hello -'hello -'hello -'hello diff --git a/test/files/jvm/replyablereactor2.scala b/test/files/jvm/replyablereactor2.scala deleted file mode 100644 index 21f33cce56..0000000000 --- a/test/files/jvm/replyablereactor2.scala +++ /dev/null @@ -1,58 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { -import scala.actors._ -import scala.actors.Actor._ - -class MyActor extends ReplyReactor { - def act() { - try { - loop { - react { - case 'hello => - sender ! 'hello - case 'stop => - exit() - } - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } -} - - def main(args: Array[String]) { - val a = new MyActor - a.start() - - val b = new Reactor[Any] { - def act() { - try { - react { - case r: MyActor => - var i = 0 - loop { - i += 1 - val ft = r !! 'hello - val msg = ft() - if (i % 10000 == 0) - println(msg) - if (i >= 50000) { - r ! 'stop - exit() - } - } - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - } - b.start() - - b ! a - } -} diff --git a/test/files/jvm/replyablereactor3.check b/test/files/jvm/replyablereactor3.check deleted file mode 100644 index 0944b17279..0000000000 --- a/test/files/jvm/replyablereactor3.check +++ /dev/null @@ -1,5 +0,0 @@ -'hello -'hello -'hello -'hello -'hello diff --git a/test/files/jvm/replyablereactor3.scala b/test/files/jvm/replyablereactor3.scala deleted file mode 100644 index 5810ed053f..0000000000 --- a/test/files/jvm/replyablereactor3.scala +++ /dev/null @@ -1,57 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { -import scala.actors._ -import scala.actors.Actor._ - -class MyActor extends ReplyReactor { - def act() { - try { - loop { - react { - case 'hello => - sender ! 'hello - case 'stop => - exit() - } - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } -} - - def main(args: Array[String]) { - val a = new MyActor - a.start() - - val b = new Reactor[Any] { - def act() { - try { - react { - case r: MyActor => - var i = 0 - loop { - i += 1 - val msg = r !? 'hello - if (i % 10000 == 0) - println(msg) - if (i >= 50000) { - r ! 'stop - exit() - } - } - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - } - b.start() - - b ! a - } -} diff --git a/test/files/jvm/replyablereactor4.check b/test/files/jvm/replyablereactor4.check deleted file mode 100644 index cac0fffe3b..0000000000 --- a/test/files/jvm/replyablereactor4.check +++ /dev/null @@ -1,5 +0,0 @@ -Some('hello) -Some('hello) -Some('hello) -Some('hello) -Some('hello) diff --git a/test/files/jvm/replyablereactor4.scala b/test/files/jvm/replyablereactor4.scala deleted file mode 100644 index 95d63684dd..0000000000 --- a/test/files/jvm/replyablereactor4.scala +++ /dev/null @@ -1,57 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { -import scala.actors._ -import scala.actors.Actor._ - -class MyActor extends ReplyReactor { - def act() { - try { - loop { - react { - case 'hello => - sender ! 'hello - case 'stop => - exit() - } - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } -} - - def main(args: Array[String]) { - val a = new MyActor - a.start() - - val b = new Reactor[Any] { - def act() { - try { - react { - case r: MyActor => - var i = 0 - loop { - i += 1 - val msg = r !? (500, 'hello) - if (i % 200000 == 0) - println(msg) - if (i >= 1000000) { - r ! 'stop - exit() - } - } - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - } - b.start() - - b ! a - } -} diff --git a/test/files/jvm/replyreactor-react-sender.check b/test/files/jvm/replyreactor-react-sender.check deleted file mode 100644 index d86bac9de5..0000000000 --- a/test/files/jvm/replyreactor-react-sender.check +++ /dev/null @@ -1 +0,0 @@ -OK diff --git a/test/files/jvm/replyreactor-react-sender.scala b/test/files/jvm/replyreactor-react-sender.scala deleted file mode 100644 index fdcea09035..0000000000 --- a/test/files/jvm/replyreactor-react-sender.scala +++ /dev/null @@ -1,53 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { - import scala.actors.ReplyReactor - import scala.actors.Actor._ - - val NUM = 2000 - - def main(args: Array[String]) { - var b: ReplyReactor = null - - val a = new ReplyReactor { - def act() { - try { - var i = 0 - loopWhile (i < NUM) { - i += 1 - react { - case 'hello if sender == this => b ! 'fail - case 'hello if sender == b => // do nothing - } - } andThen { - b ! 'ok - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - } - a.start() - - b = new ReplyReactor { - def act() { - try { - for (_ <- 0 until NUM) - a ! 'hello - react { - case 'fail => println("FAIL") - case 'ok => println("OK") - case other => println(other) - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - } - b.start() - } - -} diff --git a/test/files/jvm/replyreactor.check b/test/files/jvm/replyreactor.check deleted file mode 100644 index 4b2fea867a..0000000000 --- a/test/files/jvm/replyreactor.check +++ /dev/null @@ -1 +0,0 @@ -'hello diff --git a/test/files/jvm/replyreactor.scala b/test/files/jvm/replyreactor.scala deleted file mode 100644 index 7512fb0eb2..0000000000 --- a/test/files/jvm/replyreactor.scala +++ /dev/null @@ -1,43 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { - import scala.actors.ReplyReactor - def main(args: Array[String]) { - val a = new ReplyReactor { - def act() { - try { - react { - case 'hello => - sender ! 'hello - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - } - a.start() - - val b = new ReplyReactor { - def act() { - try { - react { - case r: ReplyReactor => - r ! 'hello - react { - case any => - println(any) - } - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - } - b.start() - - b ! a - } -} diff --git a/test/files/jvm/scala-concurrent-tck.check b/test/files/jvm/scala-concurrent-tck.check new file mode 100644 index 0000000000..9aef07d1e5 --- /dev/null +++ b/test/files/jvm/scala-concurrent-tck.check @@ -0,0 +1 @@ +warning: there were 73 deprecation warnings; re-run with -deprecation for details diff --git a/test/files/jvm/scala-concurrent-tck.scala b/test/files/jvm/scala-concurrent-tck.scala index ce86d4aef0..8069028cf5 100644 --- a/test/files/jvm/scala-concurrent-tck.scala +++ b/test/files/jvm/scala-concurrent-tck.scala @@ -165,6 +165,100 @@ def testTransformFailure(): Unit = once { g onFailure { case e => done(e eq transformed) } } + def testTransformResultToResult(): Unit = once { + done => + Future("foo").transform { + case Success(s) => Success(s.toUpperCase) + case Failure(f) => throw new Exception("test failed") + } onComplete { + case Success("FOO") => done(true) + case _ => done(false) + } + } + + def testTransformResultToFailure(): Unit = once { + done => + val e = new Exception("expected") + Future("foo").transform { + case Success(s) => Failure(e) + case Failure(f) => throw new Exception("test failed") + } onComplete { + case Failure(`e`) => done(true) + case _ => done(false) + } + } + + def testTransformFailureToResult(): Unit = once { + done => + val e = "foo" + Future(throw new Exception("initial")).transform { + case Success(s) => throw new Exception("test failed") + case Failure(f) => Success(e) + } onComplete { + case Success(`e`) => done(true) + case _ => done(false) + } + } + + def testTransformFailureToFailure(): Unit = once { + done => + val e = new Exception("expected") + Future(throw new Exception("initial")).transform { + case Success(s) => throw new Exception("test failed") + case Failure(f) => Failure(e) + } onComplete { + case Failure(`e`) => done(true) + case _ => done(false) + } + } + + def testTransformWithResultToResult(): Unit = once { + done => + Future("foo").transformWith { + case Success(s) => Future(s.toUpperCase) + case Failure(f) => throw new Exception("test failed") + } onComplete { + case Success("FOO") => done(true) + case _ => done(false) + } + } + + def testTransformWithResultToFailure(): Unit = once { + done => + val e = new Exception("expected") + Future("foo").transformWith { + case Success(s) => Future(throw e) + case Failure(f) => throw new Exception("test failed") + } onComplete { + case Failure(`e`) => done(true) + case _ => done(false) + } + } + + def testTransformWithFailureToResult(): Unit = once { + done => + val e = "foo" + Future(throw new Exception("initial")).transformWith { + case Success(s) => throw new Exception("test failed") + case Failure(f) => Future(e) + } onComplete { + case Success(`e`) => done(true) + case _ => done(false) + } + } + + def testTransformWithFailureToFailure(): Unit = once { + done => + val e = new Exception("expected") + Future(throw new Exception("initial")).transformWith { + case Success(s) => throw new Exception("test failed") + case Failure(f) => Future(throw e) + } onComplete { + case Failure(`e`) => done(true) + case _ => done(false) + } + } + def testFoldFailure(): Unit = once { done => val f = Future[Unit] { throw new Exception("expected") } @@ -352,6 +446,14 @@ def testTransformFailure(): Unit = once { h onFailure { case e => done(e eq cause) } } + def testFallbackToThis(): Unit = { + def check(f: Future[Int]) = assert((f fallbackTo f) eq f) + + check(Future { 1 }) + check(Future.successful(1)) + check(Future.failed[Int](new Exception)) + } + testMapSuccess() testMapFailure() testFlatMapSuccess() @@ -373,6 +475,16 @@ def testTransformFailure(): Unit = once { testFallbackToFailure() testTransformSuccess() testTransformSuccessPF() + testTransformFailure() + testTransformFailurePF() + testTransformResultToResult() + testTransformResultToFailure() + testTransformFailureToResult() + testTransformFailureToFailure() + testTransformWithResultToResult() + testTransformWithResultToFailure() + testTransformWithFailureToResult() + testTransformWithFailureToFailure() } @@ -517,7 +629,7 @@ trait BlockContexts extends TestBase { // test BlockContext in our default ExecutionContext def testDefaultFJP(): Unit = { val bc = getBlockContext(BlockContext.current) - assert(bc.isInstanceOf[scala.concurrent.forkjoin.ForkJoinWorkerThread]) + assert(bc.isInstanceOf[java.util.concurrent.ForkJoinWorkerThread]) } // test BlockContext inside BlockContext.withBlockContext @@ -593,6 +705,17 @@ trait Exceptions extends TestBase { } +trait GlobalExecutionContext extends TestBase { + def testNameOfGlobalECThreads(): Unit = once { + done => Future({ + val expectedName = "scala-execution-context-global-"+ Thread.currentThread.getId + done(expectedName == Thread.currentThread.getName) + })(ExecutionContext.global) + } + + testNameOfGlobalECThreads() +} + trait CustomExecutionContext extends TestBase { import scala.concurrent.{ ExecutionContext, Awaitable } @@ -772,6 +895,7 @@ with FutureProjections with Promises with BlockContexts with Exceptions +with GlobalExecutionContext with CustomExecutionContext with ExecutionContextPrepare { diff --git a/test/files/jvm/scheduler-adapter.check b/test/files/jvm/scheduler-adapter.check deleted file mode 100644 index b278674cf0..0000000000 --- a/test/files/jvm/scheduler-adapter.check +++ /dev/null @@ -1,6 +0,0 @@ -before -before -before -Two: received msg -before -One: received msg diff --git a/test/files/jvm/scheduler-adapter.scala b/test/files/jvm/scheduler-adapter.scala deleted file mode 100644 index 1c9cfe7019..0000000000 --- a/test/files/jvm/scheduler-adapter.scala +++ /dev/null @@ -1,54 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { -import scala.actors.{Actor, SchedulerAdapter} - -trait AdaptedActor extends Actor { - override def scheduler = - Test.adapted -} - -object One extends AdaptedActor { - def act() { - try { - Two.start() - Two ! 'MsgForTwo - react { - case 'MsgForOne => - println("One: received msg") - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } -} - -object Two extends AdaptedActor { - def act() { - try { - react { - case 'MsgForTwo => - println("Two: received msg") - One ! 'MsgForOne - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } -} - - val adapted = - new SchedulerAdapter { - def execute(block: => Unit) { - println("before") - block - } - } - - def main(args: Array[String]) { - One.start() - } -} diff --git a/test/files/jvm/t1449.check b/test/files/jvm/t1449.check deleted file mode 100644 index d81cc0710e..0000000000 --- a/test/files/jvm/t1449.check +++ /dev/null @@ -1 +0,0 @@ -42 diff --git a/test/files/jvm/t1449.scala b/test/files/jvm/t1449.scala deleted file mode 100644 index 7917d6f6d5..0000000000 --- a/test/files/jvm/t1449.scala +++ /dev/null @@ -1,28 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { - import scala.actors.Actor._ - import scala.actors.Future - import scala.actors.Futures._ - def main(args: Array[String]) { - val a = actor { - try { - react { - case ft: Future[a] => - println(ft()) - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - try { - val ft = future { 42 } - a ! ft - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } -} diff --git a/test/files/jvm/t1948.scala b/test/files/jvm/t1948.scala deleted file mode 100644 index 95777b8037..0000000000 --- a/test/files/jvm/t1948.scala +++ /dev/null @@ -1,26 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { - import scala.actors._ - import scala.actors.Actor._ - - def main (args: Array[String]) { - val actors = (1 to 1000).toList map { x => actor { - try { - loop { react { - case x: Array[Int] => reply ("OK"); exit }} - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } } - try { - actors foreach { x => x !? new Array[Int] (1000000) } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - -} diff --git a/test/files/jvm/t2359.check b/test/files/jvm/t2359.check deleted file mode 100644 index 8a1218a102..0000000000 --- a/test/files/jvm/t2359.check +++ /dev/null @@ -1,5 +0,0 @@ -1 -2 -3 -4 -5 diff --git a/test/files/jvm/t2359.scala b/test/files/jvm/t2359.scala deleted file mode 100644 index 76b78d44f7..0000000000 --- a/test/files/jvm/t2359.scala +++ /dev/null @@ -1,48 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { - import scala.actors.Futures._ - def main(args: Array[String]) { - val x = future { - try { - System.out.println(1) - future { - try { - System.out.println(2) - future { - try { - System.out.println(3) - future { - try { - System.out.println(4) - future { - try { - System.out.println(5) - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - }() - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - }() - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - }() - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - }() - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - }() - } -} diff --git a/test/files/jvm/t2530.check b/test/files/jvm/t2530.check deleted file mode 100644 index 0f1c02158d..0000000000 --- a/test/files/jvm/t2530.check +++ /dev/null @@ -1,21 +0,0 @@ - Iteration 1 succeeded - Iteration 2 succeeded - Iteration 3 succeeded - Iteration 4 succeeded - Iteration 5 succeeded - Iteration 6 succeeded - Iteration 7 succeeded - Iteration 8 succeeded - Iteration 9 succeeded - Iteration 10 succeeded - Iteration 11 succeeded - Iteration 12 succeeded - Iteration 13 succeeded - Iteration 14 succeeded - Iteration 15 succeeded - Iteration 16 succeeded - Iteration 17 succeeded - Iteration 18 succeeded - Iteration 19 succeeded - Iteration 20 succeeded -Test done with no deadlock. Try again, it will not occur... diff --git a/test/files/jvm/t2530.scala b/test/files/jvm/t2530.scala deleted file mode 100644 index b41661e623..0000000000 --- a/test/files/jvm/t2530.scala +++ /dev/null @@ -1,98 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { - import scala.actors.{Future, Futures} - - def main(args:Array[String]) : Unit = { - //scala.actors.Debug.level = 3 - val size = /*if (args.length > 0) Integer.parseInt(args(0)) else*/ 8 - val (m,n) = (size, size) - def random = (for (i <- 0 until m*n) yield java.lang.Math.random).toArray - val A = Matrix(m, n, random) - val B = Matrix(m, n, random) - val format = new java.text.DecimalFormat("000.00'ms'"); - var iter = 1 - val done = 21 - while (iter < done) { - val start = System.nanoTime() - val result = A * B - val time = System.nanoTime() - start - result match { - case Some(result) => { - printf(" Iteration %2d succeeded %n", iter/*, format.format(time / 1e6)*/) - iter += 1 - } - case None => { - printf(">>>> Iteration %2d failed after %s <<<<< %n", iter, format.format(time / 1e6)) - iter = done - } - } - } - println("Test done with no deadlock. Try again, it will not occur...") - } - -case class Matrix(numRows: Int, numCols: Int, values: Array[Double]) { - - def this(m:Int, n:Int) = this(m, n, new Array[Double](m*n)) - - def offset(i:Int, j:Int) = i * numCols + j - def apply(i:Int, j:Int) = values( offset(i,j) ) - def update(i:Int, j:Int, value:Double) = values(offset(i, j)) = value; - - def *(by:Matrix) = { - val aM = numRows - val aN = numCols - assert(aM == by.numCols) - assert(aN == by.numRows) - val resultMatrix = new Matrix(aM, aM) - val m = aM.asInstanceOf[Int] - val n = aN.asInstanceOf[Int] - - val rows = for (j <- 0 until m) yield { - Futures.future { - try { - val b_j = new Array[Double](n) - var k = 0 - while (k < n) { // sadly, while loops are still faster than for loops - b_j(k) = by(k,j) - k += 1 - } - var i = 0 - while (i < m) { - var s = 0.0d; - k = 0 - while (k < n) { - s += Matrix.this(i,k) * b_j(k) - k += 1 - } - resultMatrix(i,j) = s - i += 1 - } - //printf("future %d of %d completed.%n", j, m) - j - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - } - - // rows.foreach { x=> x() } // This appears to force sequential execution, so use: - // timeout is 10 years; see http://lampsvn.epfl.ch/trac/scala/ticket/2515 - val done: List[Option[Any]] = try { - Futures.awaitAll(10*365*24*60*60*1000, rows.toArray : _*) // list to array, as varargs. - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - List() - } - - if (done.contains(None)) - None - else - Some(resultMatrix) - } - -} -} diff --git a/test/files/jvm/t3102.check b/test/files/jvm/t3102.check deleted file mode 100644 index d705e0b20e..0000000000 --- a/test/files/jvm/t3102.check +++ /dev/null @@ -1,2 +0,0 @@ -42 -OK diff --git a/test/files/jvm/t3102.scala b/test/files/jvm/t3102.scala deleted file mode 100644 index d0e0704859..0000000000 --- a/test/files/jvm/t3102.scala +++ /dev/null @@ -1,39 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { - import scala.actors.{Actor, TIMEOUT} - import Actor._ - - def main(args: Array[String]) { - val a = actor { - try { - react { - case 'hello => - reply(42) - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - - val b = actor { - try { - self.trapExit = true - val ft = a !! 'hello - println(ft()) - // no message should be left over in mailbox - reactWithin(0) { - case TIMEOUT => - println("OK") - case any => - println(any) - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - } -} diff --git a/test/files/jvm/t3356.check b/test/files/jvm/t3356.check deleted file mode 100644 index 25f47b70c9..0000000000 --- a/test/files/jvm/t3356.check +++ /dev/null @@ -1,3 +0,0 @@ -sending download requests -Couldn't download image because of java.lang.Exception: no connection -Couldn't download image because of java.lang.Exception: no connection diff --git a/test/files/jvm/t3356.scala b/test/files/jvm/t3356.scala deleted file mode 100644 index 53bfd737cd..0000000000 --- a/test/files/jvm/t3356.scala +++ /dev/null @@ -1,58 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { -import scala.actors.{Actor, Exit, !, UncaughtException} -import Actor._ - -case class ImageInfo(text: String) { - def downloadImage(): ImageData = { - ImageData(text) - } -} - -case class ImageData(text: String) -case class Download(info: ImageInfo) - - - def scanForImageInfo(url: String): List[ImageInfo] = - List(ImageInfo("A"), ImageInfo("B")) - - def renderImage(data: ImageData) { - println("rendering image "+data.text) - } - - def renderImages(url: String) { - val imageInfos = scanForImageInfo(url) - println("sending download requests") - val dataFutures = for (info <- imageInfos) yield { - val loader = link { - react { case Download(info) => - throw new Exception("no connection") - reply(info.downloadImage()) - }; {} - } - loader !! Download(info) - } - var i = 0 - loopWhile (i < imageInfos.size) { - i += 1 - val FutureInput = dataFutures(i-1).inputChannel - react { - case FutureInput ! (data @ ImageData(_)) => - renderImage(data) - case Exit(from, UncaughtException(_, Some(Download(info)), _, _, cause)) => - println("Couldn't download image because of "+cause) - } - } - println("OK, all images rendered.") - } - - def main(args: Array[String]) { - actor { - self.trapExit = true - renderImages("panorama.epfl.ch") - } - } - -} diff --git a/test/files/jvm/t3365.check b/test/files/jvm/t3365.check deleted file mode 100644 index 0944b17279..0000000000 --- a/test/files/jvm/t3365.check +++ /dev/null @@ -1,5 +0,0 @@ -'hello -'hello -'hello -'hello -'hello diff --git a/test/files/jvm/t3365.scala b/test/files/jvm/t3365.scala deleted file mode 100644 index 8321428093..0000000000 --- a/test/files/jvm/t3365.scala +++ /dev/null @@ -1,68 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { -import scala.actors.{ReplyReactor, Channel, Actor, Future} - -case class ChannelMsg(chan: Channel[Any]) - -class MyActor extends Actor { - def act() { - try { - val chan = new Channel[Any](this) - loop { - react { - case other: ReplyReactor => - other ! ChannelMsg(chan) - loop { - chan.react { - case 'hello => - reply('hello) - case 'stop => - exit() - } - } - } - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } -} - - def main(args: Array[String]) { - val a = new MyActor - a.start() - - val b = new Actor { - def act() { - try { - react { - case ChannelMsg(c) => - var i = 0 - loop { - i += 1 - val ft: Future[Any] = c !! 'hello - ft.inputChannel.react { - case msg => - if (i % 10000 == 0) - println(msg) - if (i >= 50000) { - c ! 'stop - exit() - } - } - } - } - } catch { - case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => - e.printStackTrace() - } - } - } - b.start() - - a ! b - } -} diff --git a/test/files/jvm/t3407.check b/test/files/jvm/t3407.check deleted file mode 100644 index a133c88bbe..0000000000 --- a/test/files/jvm/t3407.check +++ /dev/null @@ -1,10 +0,0 @@ -result: 42 -result: 42 -result: 42 -result: 42 -result: 42 -result: 42 -result: 42 -result: 42 -result: 42 -result: 42 diff --git a/test/files/jvm/t3407.scala b/test/files/jvm/t3407.scala deleted file mode 100644 index 757fa3a438..0000000000 --- a/test/files/jvm/t3407.scala +++ /dev/null @@ -1,21 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { - import scala.actors._, scala.actors.Actor._ - - def main(args: Array[String]) { - for (i <- 1 to 10) { - val ft = Futures.future { 42 } - println("result: " + ft()) - } - - for (i <- 1 to 10) { - receiveWithin(0) { - case TIMEOUT => - case msg => println("unexpected: " + msg) - } - } - } - -} diff --git a/test/files/jvm/t3412-channel.check b/test/files/jvm/t3412-channel.check deleted file mode 100644 index 954c6e835d..0000000000 --- a/test/files/jvm/t3412-channel.check +++ /dev/null @@ -1,10 +0,0 @@ -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 diff --git a/test/files/jvm/t3412-channel.scala b/test/files/jvm/t3412-channel.scala deleted file mode 100644 index af319d2303..0000000000 --- a/test/files/jvm/t3412-channel.scala +++ /dev/null @@ -1,40 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { - import scala.actors._, scala.actors.Actor._, scala.actors.Futures._ - - def main(args: Array[String]) { - - actor { - val C: Channel[Int] = new Channel[Int](self) - - def respondAll(fts: List[Future[Int]], cnt: Int): Unit = - fts match { - case List() => C ! 0 - case ft :: rest => - if (cnt % 100 == 0) - println(ft()) - respondAll(rest, cnt + 1) - } - - actor { - val fts = for (_ <- 1 to 1000) - yield C !! (3, {case x: Int => x}) - - actor { - respondAll(fts.toList, 0) - } - } - - loop { - C.react { - case 0 => exit() - case i => reply(i * 2) - } - } - } - - } - -} diff --git a/test/files/jvm/t3412.check b/test/files/jvm/t3412.check deleted file mode 100644 index 954c6e835d..0000000000 --- a/test/files/jvm/t3412.check +++ /dev/null @@ -1,10 +0,0 @@ -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 diff --git a/test/files/jvm/t3412.scala b/test/files/jvm/t3412.scala deleted file mode 100644 index fde6c04cb7..0000000000 --- a/test/files/jvm/t3412.scala +++ /dev/null @@ -1,34 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { - import scala.actors._, scala.actors.Actor._, scala.actors.Futures._ - - def main(args: Array[String]) { - - val a = actor { - loop { react { - case i: Int => reply(i * 2) - case 'stop => exit() - } } - } - - val fts = for (_ <- 1 to 1000) - yield a !! (3, {case x: Int => x}) - - def respondAll(fts: List[Future[Int]], cnt: Int): Unit = - fts match { - case List() => a ! 'stop - case ft :: rest => - if (cnt % 100 == 0) - println(ft()) - respondAll(rest, cnt + 1) - } - - actor { - respondAll(fts.toList, 0) - } - - } - -} diff --git a/test/files/jvm/t3470.check b/test/files/jvm/t3470.check deleted file mode 100644 index 94cb526756..0000000000 --- a/test/files/jvm/t3470.check +++ /dev/null @@ -1,3 +0,0 @@ -A: started: 1 -A: started: 2 -A: started: 3 diff --git a/test/files/jvm/t3470.scala b/test/files/jvm/t3470.scala deleted file mode 100644 index bcb1d4f8de..0000000000 --- a/test/files/jvm/t3470.scala +++ /dev/null @@ -1,32 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { - import scala.actors._ - - def expectActorState(a: Reactor[T] forSome { type T }, s: Actor.State.Value) { - var done = false - var i = 0 - while (!done) { - i = i + 1 - if (i == 10) { // only wait for 2 seconds total - println("FAIL ["+a+": expected "+s+"]") - done = true - } - - Thread.sleep(200) - if (a.getState == s) // success - done = true - } - } - - def main(args: Array[String]) { - val a = new Actor { var c = 0; def act() = { c += 1; println("A: started: " + c) } } - a.start() - expectActorState(a, Actor.State.Terminated) - a.restart() - expectActorState(a, Actor.State.Terminated) - a.restart() - } - -} diff --git a/test/files/jvm/t3838.check b/test/files/jvm/t3838.check deleted file mode 100644 index 154227a350..0000000000 --- a/test/files/jvm/t3838.check +++ /dev/null @@ -1 +0,0 @@ -caught java.lang.RuntimeException: unhandled timeout diff --git a/test/files/jvm/t3838.scala b/test/files/jvm/t3838.scala deleted file mode 100644 index a1a71d1049..0000000000 --- a/test/files/jvm/t3838.scala +++ /dev/null @@ -1,17 +0,0 @@ - - -@deprecated("Suppress warnings", since="2.11") -object Test { - import scala.actors.Actor._ - def main(args: Array[String]) { - actor { - try { - receiveWithin(1) { - case str: String => println(str) - } - } catch { - case e: Exception => println("caught "+e) - } - } - } -} diff --git a/test/files/jvm/t6941.check b/test/files/jvm/t6941.check deleted file mode 100644 index 43f53aba12..0000000000 --- a/test/files/jvm/t6941.check +++ /dev/null @@ -1 +0,0 @@ -bytecode identical diff --git a/test/files/jvm/t6941.flags b/test/files/jvm/t6941.flags deleted file mode 100644 index 49d036a887..0000000000 --- a/test/files/jvm/t6941.flags +++ /dev/null @@ -1 +0,0 @@ --optimize diff --git a/test/files/jvm/t6941/Analyzed_1.flags b/test/files/jvm/t6941/Analyzed_1.flags deleted file mode 100644 index ad51758c39..0000000000 --- a/test/files/jvm/t6941/Analyzed_1.flags +++ /dev/null @@ -1 +0,0 @@ --nowarn diff --git a/test/files/jvm/t6941/Analyzed_1.scala b/test/files/jvm/t6941/Analyzed_1.scala deleted file mode 100644 index b6951f71ee..0000000000 --- a/test/files/jvm/t6941/Analyzed_1.scala +++ /dev/null @@ -1,11 +0,0 @@ -// this class's bytecode, compiled under -optimize is analyzed by the test -// method a's bytecode should be identical to method b's bytecode -class SameBytecode { - def a(xs: List[Int]) = xs match { - case x :: _ => x - } - - def b(xs: List[Int]) = xs match { - case xs: ::[Int] => xs.head - } -}
\ No newline at end of file diff --git a/test/files/jvm/t6941/test.scala b/test/files/jvm/t6941/test.scala deleted file mode 100644 index fceb54487f..0000000000 --- a/test/files/jvm/t6941/test.scala +++ /dev/null @@ -1,15 +0,0 @@ -import scala.tools.partest.{BytecodeTest, ASMConverters} - -import scala.tools.nsc.util.JavaClassPath -import java.io.InputStream -import scala.tools.asm -import asm.ClassReader -import asm.tree.{ClassNode, InsnList} -import scala.collection.JavaConverters._ - -object Test extends BytecodeTest { - def show: Unit = { - val classNode = loadClassNode("SameBytecode") - similarBytecode(getMethod(classNode, "a"), getMethod(classNode, "b"), ASMConverters.equivalentBytecode(_, _)) - } -} diff --git a/test/files/jvm/t7006.check b/test/files/jvm/t7006.check deleted file mode 100644 index 6294b14d62..0000000000 --- a/test/files/jvm/t7006.check +++ /dev/null @@ -1,29 +0,0 @@ -[running phase parser on Foo_1.scala] -[running phase namer on Foo_1.scala] -[running phase packageobjects on Foo_1.scala] -[running phase typer on Foo_1.scala] -[running phase patmat on Foo_1.scala] -[running phase superaccessors on Foo_1.scala] -[running phase extmethods on Foo_1.scala] -[running phase pickler on Foo_1.scala] -[running phase refchecks on Foo_1.scala] -[running phase uncurry on Foo_1.scala] -[running phase tailcalls on Foo_1.scala] -[running phase specialize on Foo_1.scala] -[running phase explicitouter on Foo_1.scala] -[running phase erasure on Foo_1.scala] -[running phase posterasure on Foo_1.scala] -[running phase lazyvals on Foo_1.scala] -[running phase lambdalift on Foo_1.scala] -[running phase constructors on Foo_1.scala] -[running phase flatten on Foo_1.scala] -[running phase mixin on Foo_1.scala] -[running phase cleanup on Foo_1.scala] -[running phase delambdafy on Foo_1.scala] -[running phase icode on Foo_1.scala] -[running phase inliner on Foo_1.scala] -[running phase inlinehandlers on Foo_1.scala] -[running phase closelim on Foo_1.scala] -[running phase constopt on Foo_1.scala] -[running phase dce on Foo_1.scala] -[running phase jvm on icode] diff --git a/test/files/jvm/t7006/Foo_1.flags b/test/files/jvm/t7006/Foo_1.flags deleted file mode 100644 index 29a9d424f0..0000000000 --- a/test/files/jvm/t7006/Foo_1.flags +++ /dev/null @@ -1 +0,0 @@ --optimise -Ydebug -Xfatal-warnings -Ybackend:GenASM diff --git a/test/files/jvm/t7006/Foo_1.scala b/test/files/jvm/t7006/Foo_1.scala deleted file mode 100644 index 3985557d9f..0000000000 --- a/test/files/jvm/t7006/Foo_1.scala +++ /dev/null @@ -1,10 +0,0 @@ -class Foo_1 { - def foo { - try { - val x = 3 // this will be optimized away, leaving a useless jump only block - } finally { - print("hello") - } - while(true){} // ensure infinite loop doesn't break the algorithm - } -} diff --git a/test/files/jvm/t7006/Test.scala b/test/files/jvm/t7006/Test.scala deleted file mode 100644 index 065a23510e..0000000000 --- a/test/files/jvm/t7006/Test.scala +++ /dev/null @@ -1,19 +0,0 @@ -import scala.tools.partest.BytecodeTest -import scala.tools.asm -import asm.tree.InsnList -import scala.collection.JavaConverters._ - -object Test extends BytecodeTest { - def show: Unit = { - val classNode = loadClassNode("Foo_1") - val methodNode = getMethod(classNode, "foo") - assert(count(methodNode.instructions, asm.Opcodes.NOP) == 0) - assert(count(methodNode.instructions, asm.Opcodes.GOTO) == 1) - } - - def count(insnList: InsnList, opcode: Int): Int = { - def isNop(node: asm.tree.AbstractInsnNode): Boolean = - (node.getOpcode == opcode) - insnList.iterator.asScala.count(isNop) - } -} diff --git a/test/files/jvm/t7146.check b/test/files/jvm/t7146.check index 7c76040205..b2c6e444f7 100644 --- a/test/files/jvm/t7146.check +++ b/test/files/jvm/t7146.check @@ -1,5 +1,4 @@ -should be scala.concurrent.impl.ExecutionContextImpl == true -should be scala.concurrent.forkjoin.ForkJoinPool == true +ExecutionContext.global is a scala.concurrent.impl.ExecutionContextImpl. should have non-null UncaughtExceptionHandler == true -should be a scala.concurrent.impl.ExecutionContextImpl UncaughtExceptionHandler == true -should just print out on uncaught == true +ExecutionContext.global.executor.getUncaughtExceptionHandler is a scala.concurrent.impl.ExecutionContextImpl. +should just print out on uncaught: true diff --git a/test/files/jvm/t7146.scala b/test/files/jvm/t7146.scala index aaa3dc7ca4..89030730a9 100644 --- a/test/files/jvm/t7146.scala +++ b/test/files/jvm/t7146.scala @@ -5,21 +5,21 @@ import scala.concurrent._ import scala.util.control.NoStackTrace object Test { - def main(args: Array[String]) { - println("should be scala.concurrent.impl.ExecutionContextImpl == " + - ExecutionContext.global.toString.startsWith("scala.concurrent.impl.ExecutionContextImpl")) - val i = ExecutionContext.global.asInstanceOf[{ def executor: Executor }] - println("should be scala.concurrent.forkjoin.ForkJoinPool == " + - i.executor.toString.startsWith("scala.concurrent.forkjoin.ForkJoinPool")) - val u = i.executor. + def main(args: Array[String]): Unit = { + val ec = ExecutionContext.global.toString + if (ec startsWith "scala.concurrent.impl.ExecutionContextImpl") + println("ExecutionContext.global is a scala.concurrent.impl.ExecutionContextImpl.") + else println(s"!! ExecutionContext.global == $ec") + + val u = ExecutionContext.global.asInstanceOf[{ def executor: Executor }].executor. asInstanceOf[{ def getUncaughtExceptionHandler: Thread.UncaughtExceptionHandler }]. getUncaughtExceptionHandler - println("should have non-null UncaughtExceptionHandler == " + (u ne null)) - println("should be a scala.concurrent.impl.ExecutionContextImpl UncaughtExceptionHandler == " + - u.toString.startsWith("scala.concurrent.impl.ExecutionContextImpl")) - print("should just print out on uncaught == ") - u.uncaughtException(Thread.currentThread, new Throwable { - override def printStackTrace() { println("true") } - }) + println(s"should have non-null UncaughtExceptionHandler == ${u ne null}") + if (u.toString startsWith "scala.concurrent.impl.ExecutionContextImpl") + println("ExecutionContext.global.executor.getUncaughtExceptionHandler is a scala.concurrent.impl.ExecutionContextImpl.") + else println(s"!! ExecutionContext.global.executor.getUncaughtExceptionHandler == $u") + + print("should just print out on uncaught: ") + u.uncaughtException(Thread.currentThread, new Throwable { override def printStackTrace() { println("true") } }) } } diff --git a/test/files/jvm/t8582.check b/test/files/jvm/t8582.check index e388366270..0e4da90398 100644 --- a/test/files/jvm/t8582.check +++ b/test/files/jvm/t8582.check @@ -1,3 +1,6 @@ +t8582.scala:17: warning: class BeanInfo in package beans is deprecated: the generation of BeanInfo classes is no longer supported + class C1 + ^ getClass on module gives module class class p1.p2.Singleton$Singleton$ diff --git a/test/files/jvm/t8582.flags b/test/files/jvm/t8582.flags new file mode 100644 index 0000000000..dcc59ebe32 --- /dev/null +++ b/test/files/jvm/t8582.flags @@ -0,0 +1 @@ +-deprecation diff --git a/test/files/jvm/t9105.check b/test/files/jvm/t9105.check index 34750833f1..48439ee004 100644 --- a/test/files/jvm/t9105.check +++ b/test/files/jvm/t9105.check @@ -1,4 +1,4 @@ -#partest !-Ydelambdafy:method +#partest -Ydelambdafy:inline (class C$$anonfun$1$A$1,class C$$anonfun$1,null) (class C$$anonfun$1$B$1,class C$$anonfun$1,private final java.lang.Object C$$anonfun$1.m$1()) (class C$$anonfun$1$C$1,class C$$anonfun$1,null) @@ -7,7 +7,7 @@ (class C$$anonfun$met$1$F$1,class C$$anonfun$met$1,private final java.lang.Object C$$anonfun$met$1.m$2()) (class C$$anonfun$met$1$G$1,class C$$anonfun$met$1,null) (class C$$anonfun$met$1$$anonfun$3$H$1,class C$$anonfun$met$1$$anonfun$3,null) -#partest -Ydelambdafy:method +#partest !-Ydelambdafy:inline (class C$A$1,class C,null) (class C$B$1,class C,private final java.lang.Object C.m$1()) (class C$C$1,class C,null) diff --git a/test/files/jvm/try-type-tests.scala b/test/files/jvm/try-type-tests.scala index 962afbd30f..b3926020f0 100644 --- a/test/files/jvm/try-type-tests.scala +++ b/test/files/jvm/try-type-tests.scala @@ -118,6 +118,44 @@ trait TryStandard { assert(f.transform(succ, fail).get == 0) } + def testSuccessEither(): Unit = { + val t = Success(1) + assert(t.toEither.isRight) + } + + def testFailureEither(): Unit = { + val t = Failure(new Exception("foo")) + assert(t.toEither.isLeft) + } + + def testFoldSuccess(): Unit = { + val t = Success(1) + val res = t.fold("Throws " + _, "Returns " + _) + assert(res == "Returns 1") + } + + def testFoldFailure(): Unit = { + val t = Failure(new Exception("foo")) + val res = t.fold("Throws " + _, "Returns " + _) + assert(res == "Throws java.lang.Exception: foo") + } + + def testFoldSuccessFailure(): Unit = { + val t = Success(1) + val res = t.fold("Throws " + _, _ => throw new Exception("foo")) + assert(res == "Throws java.lang.Exception: foo") + } + + def testFoldFailureFailure(): Unit = { + val t = Failure(new Exception("foo")) + val res = try { + t.fold(_ => throw new Exception("bar"), "Returns " + _) + } catch { + case e: Throwable => "Throws " + e + } + assert(res == "Throws java.lang.Exception: bar") + } + testForeachSuccess() testForeachFailure() testFlatMapSuccess() @@ -136,6 +174,11 @@ trait TryStandard { testFailedFailure() testSuccessTransform() testFailureTransform() + testSuccessEither() + testFailureEither() + testFoldSuccess() + testFoldFailure() + testFoldSuccessFailure() } object Test diff --git a/test/files/jvm/unreachable.check b/test/files/jvm/unreachable.check new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/test/files/jvm/unreachable.check diff --git a/test/files/jvm/unreachable/Foo_1.flags b/test/files/jvm/unreachable/Foo_1.flags index ce6e93b3da..ac9438e8d0 100644 --- a/test/files/jvm/unreachable/Foo_1.flags +++ b/test/files/jvm/unreachable/Foo_1.flags @@ -1 +1 @@ --Ynooptimise
\ No newline at end of file +-Yopt:l:default
\ No newline at end of file diff --git a/test/files/neg/beanInfoDeprecation.check b/test/files/neg/beanInfoDeprecation.check new file mode 100644 index 0000000000..788b277818 --- /dev/null +++ b/test/files/neg/beanInfoDeprecation.check @@ -0,0 +1,6 @@ +beanInfoDeprecation.scala:2: warning: class BeanInfo in package beans is deprecated: the generation of BeanInfo classes is no longer supported +class C + ^ +error: No warnings can be incurred under -Xfatal-warnings. +one warning found +one error found diff --git a/test/files/neg/beanInfoDeprecation.flags b/test/files/neg/beanInfoDeprecation.flags new file mode 100644 index 0000000000..c6bfaf1f64 --- /dev/null +++ b/test/files/neg/beanInfoDeprecation.flags @@ -0,0 +1 @@ +-deprecation -Xfatal-warnings diff --git a/test/files/neg/beanInfoDeprecation.scala b/test/files/neg/beanInfoDeprecation.scala new file mode 100644 index 0000000000..c7e3a86202 --- /dev/null +++ b/test/files/neg/beanInfoDeprecation.scala @@ -0,0 +1,2 @@ +@scala.beans.BeanInfo +class C diff --git a/test/files/neg/case-collision.check b/test/files/neg/case-collision.check index 22cf105a4f..7360833a7d 100644 --- a/test/files/neg/case-collision.check +++ b/test/files/neg/case-collision.check @@ -1,12 +1,12 @@ case-collision.scala:5: warning: Class foo.BIPPY differs only in case from foo.Bippy. Such classes will overwrite one another on case-insensitive filesystems. class BIPPY ^ -case-collision.scala:11: warning: Class foo.HyRaX$ differs only in case from foo.Hyrax$. Such classes will overwrite one another on case-insensitive filesystems. -object HyRaX - ^ case-collision.scala:8: warning: Class foo.DINGO$ differs only in case from foo.Dingo$. Such classes will overwrite one another on case-insensitive filesystems. object DINGO ^ +case-collision.scala:11: warning: Class foo.HyRaX$ differs only in case from foo.Hyrax$. Such classes will overwrite one another on case-insensitive filesystems. +object HyRaX + ^ error: No warnings can be incurred under -Xfatal-warnings. three warnings found one error found diff --git a/test/files/neg/case-collision.flags b/test/files/neg/case-collision.flags index 14c1069dee..85d8eb2ba2 100644 --- a/test/files/neg/case-collision.flags +++ b/test/files/neg/case-collision.flags @@ -1 +1 @@ --Ybackend:GenASM -Xfatal-warnings +-Xfatal-warnings diff --git a/test/files/neg/case-collision2.flags b/test/files/neg/case-collision2.flags index bea46902c9..85d8eb2ba2 100644 --- a/test/files/neg/case-collision2.flags +++ b/test/files/neg/case-collision2.flags @@ -1 +1 @@ --Ybackend:GenBCode -Xfatal-warnings +-Xfatal-warnings diff --git a/test/files/neg/compile-time-only-a.check b/test/files/neg/compile-time-only-a.check index b1ed1d24c2..a10f8b6489 100644 --- a/test/files/neg/compile-time-only-a.check +++ b/test/files/neg/compile-time-only-a.check @@ -13,9 +13,15 @@ compile-time-only-a.scala:36: error: C2 compile-time-only-a.scala:38: error: C3 new C3(2) ^ +compile-time-only-a.scala:39: error: C3 + C3(2) + ^ compile-time-only-a.scala:41: error: C4 new C4(2) ^ +compile-time-only-a.scala:42: error: C4 + C4(2) + ^ compile-time-only-a.scala:45: error: C5 2.ext ^ @@ -73,4 +79,4 @@ compile-time-only-a.scala:75: error: placebo compile-time-only-a.scala:75: error: placebo @placebo def x = (2: @placebo) ^ -25 errors found +27 errors found diff --git a/test/files/neg/deprecated-target.check b/test/files/neg/deprecated-target.check new file mode 100644 index 0000000000..307d3d25ab --- /dev/null +++ b/test/files/neg/deprecated-target.check @@ -0,0 +1,4 @@ +warning: -target is deprecated: -target:jvm-1.7 is deprecated, forcing use of jvm-1.8 +error: No warnings can be incurred under -Xfatal-warnings. +one warning found +one error found diff --git a/test/files/neg/deprecated-target.flags b/test/files/neg/deprecated-target.flags new file mode 100644 index 0000000000..458ded8123 --- /dev/null +++ b/test/files/neg/deprecated-target.flags @@ -0,0 +1 @@ +-target:jvm-1.7 -deprecation -Xfatal-warnings diff --git a/test/files/neg/deprecated-target.scala b/test/files/neg/deprecated-target.scala new file mode 100644 index 0000000000..9dccdd5e59 --- /dev/null +++ b/test/files/neg/deprecated-target.scala @@ -0,0 +1 @@ +class C
\ No newline at end of file diff --git a/test/files/neg/implicit-ambiguous-2.check b/test/files/neg/implicit-ambiguous-2.check new file mode 100644 index 0000000000..4a10b0dd65 --- /dev/null +++ b/test/files/neg/implicit-ambiguous-2.check @@ -0,0 +1,4 @@ +implicit-ambiguous-2.scala:10: error: Could not prove Int =!= Int + implicitly[Int =!= Int] + ^ +one error found diff --git a/test/files/neg/implicit-ambiguous-2.scala b/test/files/neg/implicit-ambiguous-2.scala new file mode 100644 index 0000000000..563c8c583f --- /dev/null +++ b/test/files/neg/implicit-ambiguous-2.scala @@ -0,0 +1,11 @@ +object Test { + trait =!=[C, D] + + implicit def neq[E, F] : E =!= F = null + + implicit def neqAmbig1[G, H, J] : J =!= J = null + @annotation.implicitAmbiguous("Could not prove ${I} =!= ${I}") + implicit def neqAmbig2[I] : I =!= I = null + + implicitly[Int =!= Int] +} diff --git a/test/files/neg/implicit-ambiguous-invalid.check b/test/files/neg/implicit-ambiguous-invalid.check new file mode 100644 index 0000000000..68b607c4c2 --- /dev/null +++ b/test/files/neg/implicit-ambiguous-invalid.check @@ -0,0 +1,7 @@ +implicit-ambiguous-invalid.scala:5: warning: Invalid implicitAmbiguous message for method neqAmbig1 in object Test: +The type parameter B referenced in the message of the @implicitAmbiguous annotation is not defined by method neqAmbig1. + implicit def neqAmbig1[A] : A =!= A = null + ^ +error: No warnings can be incurred under -Xfatal-warnings. +one warning found +one error found diff --git a/test/files/neg/implicit-ambiguous-invalid.flags b/test/files/neg/implicit-ambiguous-invalid.flags new file mode 100644 index 0000000000..85d8eb2ba2 --- /dev/null +++ b/test/files/neg/implicit-ambiguous-invalid.flags @@ -0,0 +1 @@ +-Xfatal-warnings diff --git a/test/files/neg/implicit-ambiguous-invalid.scala b/test/files/neg/implicit-ambiguous-invalid.scala new file mode 100644 index 0000000000..f8f9da655f --- /dev/null +++ b/test/files/neg/implicit-ambiguous-invalid.scala @@ -0,0 +1,6 @@ +object Test { + trait =!=[C, D] + + @annotation.implicitAmbiguous("Could not prove ${A} =!= ${B}") + implicit def neqAmbig1[A] : A =!= A = null +} diff --git a/test/files/neg/implicit-ambiguous.check b/test/files/neg/implicit-ambiguous.check new file mode 100644 index 0000000000..0b3cebcb6f --- /dev/null +++ b/test/files/neg/implicit-ambiguous.check @@ -0,0 +1,4 @@ +implicit-ambiguous.scala:10: error: Could not prove Int =!= Int + implicitly[Int =!= Int] + ^ +one error found diff --git a/test/files/neg/implicit-ambiguous.scala b/test/files/neg/implicit-ambiguous.scala new file mode 100644 index 0000000000..79b1297915 --- /dev/null +++ b/test/files/neg/implicit-ambiguous.scala @@ -0,0 +1,11 @@ +object Test { + trait =!=[C, D] + + implicit def neq[E, F] : E =!= F = null + + @annotation.implicitAmbiguous("Could not prove ${J} =!= ${J}") + implicit def neqAmbig1[G, H, J] : J =!= J = null + implicit def neqAmbig2[I] : I =!= I = null + + implicitly[Int =!= Int] +} diff --git a/test/files/neg/inlineIndyLambdaPrivate.check b/test/files/neg/inlineIndyLambdaPrivate.check new file mode 100644 index 0000000000..dbd142f59e --- /dev/null +++ b/test/files/neg/inlineIndyLambdaPrivate.check @@ -0,0 +1,16 @@ +Test_2.scala:2: warning: A_1::test()Ljava/lang/String; could not be inlined: +The callee A_1::test()Ljava/lang/String; contains the instruction INVOKEDYNAMIC m()LA_1$Fun; [ + // handle kind 0x6 : INVOKESTATIC + java/lang/invoke/LambdaMetafactory.metafactory(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; + // arguments: + (Ljava/lang/String;)Ljava/lang/String;, + // handle kind 0x6 : INVOKESTATIC + A_1.lambda$test$0(Ljava/lang/String;)Ljava/lang/String;, + (Ljava/lang/String;)Ljava/lang/String; + ] +that would cause an IllegalAccessError when inlined into class Test. + def foo = A_1.test + ^ +error: No warnings can be incurred under -Xfatal-warnings. +one warning found +one error found diff --git a/test/files/neg/inlineIndyLambdaPrivate.flags b/test/files/neg/inlineIndyLambdaPrivate.flags new file mode 100644 index 0000000000..01b466bd8c --- /dev/null +++ b/test/files/neg/inlineIndyLambdaPrivate.flags @@ -0,0 +1 @@ +-Yopt:l:classpath -Yopt-inline-heuristics:everything -Yopt-warnings:_ -Xfatal-warnings
\ No newline at end of file diff --git a/test/files/neg/inlineIndyLambdaPrivate/A_1.java b/test/files/neg/inlineIndyLambdaPrivate/A_1.java new file mode 100644 index 0000000000..a9144a9fa6 --- /dev/null +++ b/test/files/neg/inlineIndyLambdaPrivate/A_1.java @@ -0,0 +1,9 @@ +public class A_1 { + interface Fun { + String m(String s); + } + public static final String test() { + Fun f = s -> s.trim(); + return f.m(" eh "); + } +} diff --git a/test/files/neg/inlineIndyLambdaPrivate/Test_2.scala b/test/files/neg/inlineIndyLambdaPrivate/Test_2.scala new file mode 100644 index 0000000000..dd59c05176 --- /dev/null +++ b/test/files/neg/inlineIndyLambdaPrivate/Test_2.scala @@ -0,0 +1,3 @@ +class Test { + def foo = A_1.test +} diff --git a/test/files/neg/inlineMaxSize.flags b/test/files/neg/inlineMaxSize.flags index 9c6b811622..18b474e797 100644 --- a/test/files/neg/inlineMaxSize.flags +++ b/test/files/neg/inlineMaxSize.flags @@ -1 +1 @@ --Ybackend:GenBCode -Ydelambdafy:method -Yopt:l:classpath -Yopt-warnings -Xfatal-warnings
\ No newline at end of file +-Ydelambdafy:method -Yopt:l:classpath -Yopt-warnings -Xfatal-warnings
\ No newline at end of file diff --git a/test/files/neg/logImplicits.check b/test/files/neg/logImplicits.check index 270882b71a..479bf4ba2c 100644 --- a/test/files/neg/logImplicits.check +++ b/test/files/neg/logImplicits.check @@ -1,10 +1,10 @@ -logImplicits.scala:2: applied implicit conversion from xs.type to ?{def size: ?} = implicit def byteArrayOps(xs: Array[Byte]): scala.collection.mutable.ArrayOps[Byte] +logImplicits.scala:2: applied implicit conversion from xs.type to ?{def size: ?} = implicit def _byteArrayOps(xs: Array[Byte]): scala.collection.mutable.ArrayOps.ofByte def f(xs: Array[Byte]) = xs.size ^ logImplicits.scala:7: applied implicit conversion from String("abc") to ?{def map: ?} = implicit def augmentString(x: String): scala.collection.immutable.StringOps def f = "abc" map (_ + 1) ^ -logImplicits.scala:15: inferred view from String("abc") to Int = C.this.convert:(p: String("abc"))Int +logImplicits.scala:15: inferred view from String("abc") to Int via C.this.convert: (p: String)Int math.max(122, x: Int) ^ logImplicits.scala:19: applied implicit conversion from Int(1) to ?{def ->: ?} = implicit def ArrowAssoc[A](self: A): ArrowAssoc[A] diff --git a/test/files/neg/names-defaults-neg.check b/test/files/neg/names-defaults-neg.check index a43bf66811..875bc2ade0 100644 --- a/test/files/neg/names-defaults-neg.check +++ b/test/files/neg/names-defaults-neg.check @@ -118,68 +118,74 @@ names-defaults-neg.scala:93: warning: the parameter name y has been deprecated. names-defaults-neg.scala:93: error: parameter 'b' is already specified at parameter position 1 deprNam3(y = 10, b = 2) ^ -names-defaults-neg.scala:98: error: unknown parameter name: m +names-defaults-neg.scala:96: warning: naming parameter deprNam4Arg has been deprecated. + deprNam4(deprNam4Arg = null) + ^ +names-defaults-neg.scala:98: warning: naming parameter deprNam5Arg has been deprecated. + deprNam5(deprNam5Arg = null) + ^ +names-defaults-neg.scala:102: error: unknown parameter name: m f3818(y = 1, m = 1) ^ -names-defaults-neg.scala:131: error: reference to var2 is ambiguous; it is both a method parameter and a variable in scope. +names-defaults-neg.scala:135: error: reference to var2 is ambiguous; it is both a method parameter and a variable in scope. delay(var2 = 40) ^ -names-defaults-neg.scala:134: error: missing parameter type for expanded function ((x$1) => a = x$1) +names-defaults-neg.scala:138: error: missing parameter type for expanded function ((x$1: <error>) => a = x$1) val taf2: Int => Unit = testAnnFun(a = _, b = get("+")) ^ -names-defaults-neg.scala:134: error: not found: value a +names-defaults-neg.scala:138: error: not found: value a val taf2: Int => Unit = testAnnFun(a = _, b = get("+")) ^ -names-defaults-neg.scala:134: error: not found: value get +names-defaults-neg.scala:138: error: not found: value get val taf2: Int => Unit = testAnnFun(a = _, b = get("+")) ^ -names-defaults-neg.scala:135: error: parameter 'a' is already specified at parameter position 1 +names-defaults-neg.scala:139: error: parameter 'a' is already specified at parameter position 1 val taf3 = testAnnFun(b = _: String, a = get(8)) ^ -names-defaults-neg.scala:136: error: missing parameter type for expanded function ((x$3) => testAnnFun(x$3, ((x$4) => b = x$4))) +names-defaults-neg.scala:140: error: missing parameter type for expanded function ((x$3: <error>) => testAnnFun(x$3, ((x$4) => b = x$4))) val taf4: (Int, String) => Unit = testAnnFun(_, b = _) ^ -names-defaults-neg.scala:136: error: missing parameter type for expanded function ((x$4) => b = x$4) +names-defaults-neg.scala:140: error: missing parameter type for expanded function ((x$4: <error>) => b = x$4) val taf4: (Int, String) => Unit = testAnnFun(_, b = _) ^ -names-defaults-neg.scala:136: error: not found: value b +names-defaults-neg.scala:140: error: not found: value b val taf4: (Int, String) => Unit = testAnnFun(_, b = _) ^ -names-defaults-neg.scala:144: error: variable definition needs type because 'x' is used as a named argument in its body. +names-defaults-neg.scala:148: error: variable definition needs type because 'x' is used as a named argument in its body. def t3 { var x = t.f(x = 1) } ^ -names-defaults-neg.scala:147: error: variable definition needs type because 'x' is used as a named argument in its body. +names-defaults-neg.scala:151: error: variable definition needs type because 'x' is used as a named argument in its body. object t6 { var x = t.f(x = 1) } ^ -names-defaults-neg.scala:147: warning: failed to determine if 'x = ...' is a named argument or an assignment expression. +names-defaults-neg.scala:151: warning: failed to determine if 'x = ...' is a named argument or an assignment expression. an explicit type is required for the definition mentioned in the error message above. object t6 { var x = t.f(x = 1) } ^ -names-defaults-neg.scala:150: error: variable definition needs type because 'x' is used as a named argument in its body. +names-defaults-neg.scala:154: error: variable definition needs type because 'x' is used as a named argument in its body. class t9 { var x = t.f(x = 1) } ^ -names-defaults-neg.scala:150: warning: failed to determine if 'x = ...' is a named argument or an assignment expression. +names-defaults-neg.scala:154: warning: failed to determine if 'x = ...' is a named argument or an assignment expression. an explicit type is required for the definition mentioned in the error message above. class t9 { var x = t.f(x = 1) } ^ -names-defaults-neg.scala:164: error: variable definition needs type because 'x' is used as a named argument in its body. +names-defaults-neg.scala:168: error: variable definition needs type because 'x' is used as a named argument in its body. def u3 { var x = u.f(x = 1) } ^ -names-defaults-neg.scala:167: error: variable definition needs type because 'x' is used as a named argument in its body. +names-defaults-neg.scala:171: error: variable definition needs type because 'x' is used as a named argument in its body. def u6 { var x = u.f(x = "32") } ^ -names-defaults-neg.scala:170: error: reference to x is ambiguous; it is both a method parameter and a variable in scope. +names-defaults-neg.scala:174: error: reference to x is ambiguous; it is both a method parameter and a variable in scope. def u9 { var x: Int = u.f(x = 1) } ^ -names-defaults-neg.scala:177: error: variable definition needs type because 'x' is used as a named argument in its body. +names-defaults-neg.scala:181: error: variable definition needs type because 'x' is used as a named argument in its body. class u15 { var x = u.f(x = 1) } ^ -names-defaults-neg.scala:177: warning: failed to determine if 'x = ...' is a named argument or an assignment expression. +names-defaults-neg.scala:181: warning: failed to determine if 'x = ...' is a named argument or an assignment expression. an explicit type is required for the definition mentioned in the error message above. class u15 { var x = u.f(x = 1) } ^ -names-defaults-neg.scala:180: error: reference to x is ambiguous; it is both a method parameter and a variable in scope. +names-defaults-neg.scala:184: error: reference to x is ambiguous; it is both a method parameter and a variable in scope. class u18 { var x: Int = u.f(x = 1) } ^ -four warnings found +6 warnings found 46 errors found diff --git a/test/files/neg/names-defaults-neg.scala b/test/files/neg/names-defaults-neg.scala index a97b590bf2..b326d3b5bd 100644 --- a/test/files/neg/names-defaults-neg.scala +++ b/test/files/neg/names-defaults-neg.scala @@ -92,6 +92,10 @@ object Test extends App { def deprNam3(@deprecatedName('x) a: Int, @deprecatedName('y) b: Int) = a + b deprNam3(y = 10, b = 2) + def deprNam4(@deprecatedName('deprNam4Arg) deprNam4Arg: String) = 0 + deprNam4(deprNam4Arg = null) + def deprNam5(@deprecatedName deprNam5Arg: String) = 0 + deprNam5(deprNam5Arg = null) // t3818 def f3818(x: Int = 1, y: Int, z: Int = 1) = 0 diff --git a/test/files/neg/optimiseDeprecated.check b/test/files/neg/optimiseDeprecated.check new file mode 100644 index 0000000000..d51d48f023 --- /dev/null +++ b/test/files/neg/optimiseDeprecated.check @@ -0,0 +1,4 @@ +warning: -optimise is deprecated: In 2.12, -optimise enables -Yopt:l:classpath. Check -Yopt:help for using the Scala 2.12 optimizer. +error: No warnings can be incurred under -Xfatal-warnings. +one warning found +one error found diff --git a/test/files/neg/optimiseDeprecated.flags b/test/files/neg/optimiseDeprecated.flags new file mode 100644 index 0000000000..42fca6d836 --- /dev/null +++ b/test/files/neg/optimiseDeprecated.flags @@ -0,0 +1 @@ +-optimise -deprecation -Xfatal-warnings diff --git a/test/files/neg/optimiseDeprecated.scala b/test/files/neg/optimiseDeprecated.scala new file mode 100644 index 0000000000..826a1a5bc2 --- /dev/null +++ b/test/files/neg/optimiseDeprecated.scala @@ -0,0 +1 @@ +class C diff --git a/test/files/neg/outer-ref-checks.check b/test/files/neg/outer-ref-checks.check new file mode 100644 index 0000000000..bba7118d79 --- /dev/null +++ b/test/files/neg/outer-ref-checks.check @@ -0,0 +1,24 @@ +outer-ref-checks.scala:5: warning: The outer reference in this type test cannot be checked at run time. + final case class Inner(val s: String) // unchecked warning + ^ +outer-ref-checks.scala:8: warning: The outer reference in this type test cannot be checked at run time. + case Inner(s) => // unchecked warning + ^ +outer-ref-checks.scala:18: warning: The outer reference in this type test cannot be checked at run time. + case Inner(s) => // unchecked warning + ^ +outer-ref-checks.scala:19: warning: The outer reference in this type test cannot be checked at run time. + case O.Inner(s) => // unchecked warning + ^ +outer-ref-checks.scala:41: warning: The outer reference in this type test cannot be checked at run time. + case Inner(s) => // unchecked warning + ^ +outer-ref-checks.scala:46: warning: The outer reference in this type test cannot be checked at run time. + case _: Inner => // unchecked warning + ^ +outer-ref-checks.scala:56: warning: The outer reference in this type test cannot be checked at run time. + case _: (Inner @uncheckedVariance) => // unchecked warning + ^ +error: No warnings can be incurred under -Xfatal-warnings. +7 warnings found +one error found diff --git a/test/files/neg/outer-ref-checks.flags b/test/files/neg/outer-ref-checks.flags new file mode 100644 index 0000000000..464cc20ea6 --- /dev/null +++ b/test/files/neg/outer-ref-checks.flags @@ -0,0 +1 @@ +-Xfatal-warnings -unchecked
\ No newline at end of file diff --git a/test/files/neg/outer-ref-checks.scala b/test/files/neg/outer-ref-checks.scala new file mode 100644 index 0000000000..35983fe92b --- /dev/null +++ b/test/files/neg/outer-ref-checks.scala @@ -0,0 +1,106 @@ +import scala.annotation.unchecked.uncheckedVariance + +class Outer { + // A final class gets no outer ref, so we expect to see warnings where an outer ref check should be performed + final case class Inner(val s: String) // unchecked warning + + def belongs(a: Any): Unit = a match { + case Inner(s) => // unchecked warning + case _ => + } + + def belongsStaticSameOuter(a: Inner): Unit = a match { + case Inner(s) => // no need for outer check + // match is exhaustive, no default case needed + } + + def belongsOtherOuter(a: Outer#Inner): Unit = a match { + case Inner(s) => // unchecked warning + case O.Inner(s) => // unchecked warning + case _ => + } +} + +object O extends Outer { + def belongsStaticSameOuter2(a: Inner): Unit = a match { + case Inner(s) => // no need for outer check + // match is exhaustive, no default case needed + } + + def belongsStaticSameOuter3(a: Inner): Unit = a match { + case _: Inner => // no need for outer check + // match is exhaustive, no default case needed + } + + def belongsStaticSameOuter4(a: Inner): Unit = a match { + case _: (Inner @uncheckedVariance) => // no need for outer check + // match is exhaustive, no default case needed + } + + def belongsOtherOuter2(a: Outer#Inner): Unit = a match { + case Inner(s) => // unchecked warning + case _ => + } + + def belongsOtherOuter3(a: Outer#Inner): Unit = a match { + case _: Inner => // unchecked warning + case _ => + } + + def belongsOtherOuter4(a: Outer#Inner): Unit = a match { + case _: (Inner @unchecked) => // warning supressed + case _ => + } + + def belongsOtherOuter5(a: Outer#Inner): Unit = a match { + case _: (Inner @uncheckedVariance) => // unchecked warning + case _ => + } + + def nested: Unit = { + final case class I(s: String) + + def check1(a: Any): Unit = a match { + case I(s) => // no need for outer check + case _ => + } + + def check2(a: I): Unit = a match { + case I(s) => // no need for outer check + // match is exhaustive, no default case needed + } + } +} + +class O2 { + def nested: Unit = { + final case class I(s: String) + + def check1(a: Any): Unit = a match { + case I(s) => // no need for outer check (is this correct?) + case _ => + } + + def check2(a: I): Unit = a match { + case I(s) => // no need for outer check (is this correct?) + // match is exhaustive, no default case needed + } + } +} + +package p { + object T { + case class C(x: Int) + } +} + +object U { + val T = p.T +} + +class Test { + def m(a: Any) = a match { + case U.T.C(1) => 1 // used to warn + case _ => 1 + } +} diff --git a/test/files/neg/override-object-no.check b/test/files/neg/override-object-no.check index 9cfda80fc3..972a719b3b 100644 --- a/test/files/neg/override-object-no.check +++ b/test/files/neg/override-object-no.check @@ -20,4 +20,12 @@ an overriding object must conform to the overridden object's class bound; required: case2.Bar[Traversable[String]] override object A extends Bar[List[String]] // err ^ -four errors found +override-object-no.scala:52: error: overriding method x in trait A of type => SI9574.Foo.type; + method x has incompatible type + trait B extends A { def x: Bar.type } // should not compile (SI-9574) + ^ +override-object-no.scala:53: error: overriding method x in trait A of type => SI9574.Foo.type; + object x has incompatible type + trait C extends A { override object x } + ^ +6 errors found diff --git a/test/files/neg/override-object-no.scala b/test/files/neg/override-object-no.scala index 745cdb2332..517408886d 100644 --- a/test/files/neg/override-object-no.scala +++ b/test/files/neg/override-object-no.scala @@ -43,3 +43,14 @@ package case2 { override object A extends Bar[List[String]] // err } } + +// Both overridden and overriding members must be objects, not vals with a module type +object SI9574 { + object Foo + object Bar + trait A { def x: Foo.type } + trait B extends A { def x: Bar.type } // should not compile (SI-9574) + trait C extends A { override object x } + trait D { object x; def y = x } + trait E extends D { override val x: super.x.type = y } // OK but doesn't need object subtyping exception +} diff --git a/test/files/neg/sammy_disabled.check b/test/files/neg/sammy_disabled.check new file mode 100644 index 0000000000..66db9dd5f2 --- /dev/null +++ b/test/files/neg/sammy_disabled.check @@ -0,0 +1,4 @@ +sammy_disabled.scala:3: error: missing parameter type +class C { val f: F = x => "a" } + ^ +one error found diff --git a/test/files/neg/sammy_disabled.flags b/test/files/neg/sammy_disabled.flags new file mode 100644 index 0000000000..cf42e9f940 --- /dev/null +++ b/test/files/neg/sammy_disabled.flags @@ -0,0 +1 @@ +-Xsource:2.11 diff --git a/test/files/neg/sammy_disabled.scala b/test/files/neg/sammy_disabled.scala new file mode 100644 index 0000000000..12000a3e12 --- /dev/null +++ b/test/files/neg/sammy_disabled.scala @@ -0,0 +1,3 @@ +trait F { def apply(x: Int): String } + +class C { val f: F = x => "a" } diff --git a/test/files/neg/sammy_error.check b/test/files/neg/sammy_error.check new file mode 100644 index 0000000000..f14ac7e3a2 --- /dev/null +++ b/test/files/neg/sammy_error.check @@ -0,0 +1,4 @@ +sammy_error.scala:6: error: missing parameter type + foo(x => x) // should result in only one error (the second one stemmed from adapting to SAM when the tree was erroneous) + ^ +one error found diff --git a/test/files/neg/sammy_error.scala b/test/files/neg/sammy_error.scala new file mode 100644 index 0000000000..dbddebf325 --- /dev/null +++ b/test/files/neg/sammy_error.scala @@ -0,0 +1,7 @@ +trait F1[A, B] { def apply(a: A): B } + +class Test { + def foo[A](f1: F1[A, A]) = f1 + + foo(x => x) // should result in only one error (the second one stemmed from adapting to SAM when the tree was erroneous) +} diff --git a/test/files/neg/sammy_error_exist_no_crash.check b/test/files/neg/sammy_error_exist_no_crash.check index a0d2237ce0..944b6471fd 100644 --- a/test/files/neg/sammy_error_exist_no_crash.check +++ b/test/files/neg/sammy_error_exist_no_crash.check @@ -1,6 +1,4 @@ -sammy_error_exist_no_crash.scala:5: error: Could not derive subclass of F[? >: String] - (with SAM `def method apply(s: String)Int`) - based on: ((x$1: String) => x$1.<parseInt: error>). +sammy_error_exist_no_crash.scala:5: error: value parseInt is not a member of String bar(_.parseInt) ^ one error found diff --git a/test/files/neg/sammy_error_exist_no_crash.flags b/test/files/neg/sammy_error_exist_no_crash.flags deleted file mode 100644 index e1b37447c9..0000000000 --- a/test/files/neg/sammy_error_exist_no_crash.flags +++ /dev/null @@ -1 +0,0 @@ --Xexperimental
\ No newline at end of file diff --git a/test/files/neg/sammy_error_exist_no_crash.scala b/test/files/neg/sammy_error_exist_no_crash.scala index da7e47206f..667b4db763 100644 --- a/test/files/neg/sammy_error_exist_no_crash.scala +++ b/test/files/neg/sammy_error_exist_no_crash.scala @@ -1,6 +1,6 @@ -abstract class F[T] { def apply(s: T): Int } +trait F[T] { def apply(s: T): Int } object NeedsNiceError { def bar(x: F[_ >: String]) = ??? bar(_.parseInt) -}
\ No newline at end of file +} diff --git a/test/files/neg/sammy_expected.check b/test/files/neg/sammy_expected.check new file mode 100644 index 0000000000..3b76aabdd2 --- /dev/null +++ b/test/files/neg/sammy_expected.check @@ -0,0 +1,6 @@ +sammy_expected.scala:4: error: type mismatch; + found : String => Int + required: F[Object,Int] + def wrong: F[Object, Int] = (x: String) => 1 + ^ +one error found diff --git a/test/files/neg/sammy_expected.scala b/test/files/neg/sammy_expected.scala new file mode 100644 index 0000000000..8fc1f66ff7 --- /dev/null +++ b/test/files/neg/sammy_expected.scala @@ -0,0 +1,5 @@ +trait F[A, B] { def apply(x: A): B } + +class MustMeetExpected { + def wrong: F[Object, Int] = (x: String) => 1 +}
\ No newline at end of file diff --git a/test/files/neg/sammy_overload.check b/test/files/neg/sammy_overload.check new file mode 100644 index 0000000000..903d7c88f4 --- /dev/null +++ b/test/files/neg/sammy_overload.check @@ -0,0 +1,7 @@ +sammy_overload.scala:11: error: missing parameter type for expanded function ((x$1: <error>) => x$1.toString) + O.m(_.toString) // error expected: eta-conversion breaks down due to overloading + ^ +sammy_overload.scala:12: error: missing parameter type + O.m(x => x) // error expected: needs param type + ^ +two errors found diff --git a/test/files/neg/sammy_overload.scala b/test/files/neg/sammy_overload.scala new file mode 100644 index 0000000000..91c52cf96c --- /dev/null +++ b/test/files/neg/sammy_overload.scala @@ -0,0 +1,13 @@ +trait ToString { def convert(x: Int): String } + +class ExplicitSamType { + object O { + def m(x: Int => String): Int = 0 + def m(x: ToString): Int = 1 + } + + O.m((x: Int) => x.toString) // ok, function type takes precedence + + O.m(_.toString) // error expected: eta-conversion breaks down due to overloading + O.m(x => x) // error expected: needs param type +} diff --git a/test/files/neg/sammy_restrictions.check b/test/files/neg/sammy_restrictions.check index 8cc49f9aa9..09579cbe21 100644 --- a/test/files/neg/sammy_restrictions.check +++ b/test/files/neg/sammy_restrictions.check @@ -1,26 +1,18 @@ -sammy_restrictions.scala:31: error: type mismatch; +sammy_restrictions.scala:35: error: type mismatch; found : () => Int required: NoAbstract (() => 0) : NoAbstract ^ -sammy_restrictions.scala:32: error: type mismatch; +sammy_restrictions.scala:36: error: type mismatch; found : Int => Int required: TwoAbstract ((x: Int) => 0): TwoAbstract ^ -sammy_restrictions.scala:34: error: class type required but DerivedOneAbstract with OneAbstract found - ((x: Int) => 0): NonClassType // "class type required". I think we should avoid SAM translation here. - ^ -sammy_restrictions.scala:35: error: type mismatch; +sammy_restrictions.scala:37: error: type mismatch; found : Int => Int required: NoEmptyConstructor ((x: Int) => 0): NoEmptyConstructor ^ -sammy_restrictions.scala:37: error: type mismatch; - found : Int => Int - required: OneEmptySecondaryConstructor - ((x: Int) => 0): OneEmptySecondaryConstructor // derived class must have an empty *primary* to call. - ^ sammy_restrictions.scala:38: error: type mismatch; found : Int => Int required: MultipleConstructorLists @@ -28,22 +20,32 @@ sammy_restrictions.scala:38: error: type mismatch; ^ sammy_restrictions.scala:39: error: type mismatch; found : Int => Int + required: OneEmptySecondaryConstructor + ((x: Int) => 0): OneEmptySecondaryConstructor // derived class must have an empty *primary* to call. + ^ +sammy_restrictions.scala:40: error: type mismatch; + found : Int => Int required: MultipleMethodLists ((x: Int) => 0): MultipleMethodLists ^ -sammy_restrictions.scala:40: error: type mismatch; +sammy_restrictions.scala:41: error: type mismatch; found : Int => Int required: ImplicitConstructorParam ((x: Int) => 0): ImplicitConstructorParam ^ -sammy_restrictions.scala:41: error: type mismatch; +sammy_restrictions.scala:42: error: type mismatch; found : Int => Int required: ImplicitMethodParam ((x: Int) => 0): ImplicitMethodParam ^ -sammy_restrictions.scala:44: error: type mismatch; +sammy_restrictions.scala:43: error: type mismatch; found : Int => Int required: PolyMethod ((x: Int) => 0): PolyMethod ^ +sammy_restrictions.scala:44: error: type mismatch; + found : Int => Int + required: SelfTp + ((x: Int) => 0): SelfTp + ^ 10 errors found diff --git a/test/files/neg/sammy_restrictions.scala b/test/files/neg/sammy_restrictions.scala index d003cfaf36..ff2c16b679 100644 --- a/test/files/neg/sammy_restrictions.scala +++ b/test/files/neg/sammy_restrictions.scala @@ -24,22 +24,29 @@ abstract class PolyMethod { def ap[T](a: T): T } abstract class OneAbstract { def ap(a: Int): Any } abstract class DerivedOneAbstract extends OneAbstract +abstract class SelfTp { self: NoAbstract => def ap(a: Int): Any } +abstract class SelfVar { self => def ap(a: Int): Any } + object Test { implicit val s: String = "" type NonClassType = DerivedOneAbstract with OneAbstract + // errors: (() => 0) : NoAbstract ((x: Int) => 0): TwoAbstract - ((x: Int) => 0): DerivedOneAbstract // okay - ((x: Int) => 0): NonClassType // "class type required". I think we should avoid SAM translation here. ((x: Int) => 0): NoEmptyConstructor - ((x: Int) => 0): OneEmptyConstructor // okay - ((x: Int) => 0): OneEmptySecondaryConstructor // derived class must have an empty *primary* to call. ((x: Int) => 0): MultipleConstructorLists + ((x: Int) => 0): OneEmptySecondaryConstructor // derived class must have an empty *primary* to call. ((x: Int) => 0): MultipleMethodLists ((x: Int) => 0): ImplicitConstructorParam ((x: Int) => 0): ImplicitMethodParam - - ((x: Int) => 0): PolyClass[Int] // okay ((x: Int) => 0): PolyMethod + ((x: Int) => 0): SelfTp + + // allowed: + ((x: Int) => 0): OneEmptyConstructor + ((x: Int) => 0): DerivedOneAbstract + ((x: Int) => 0): NonClassType // we also allow type aliases in instantiation expressions, if they resolve to a class type + ((x: Int) => 0): PolyClass[Int] + ((x: Int) => 0): SelfVar } diff --git a/test/files/neg/sealed-final-neg.check b/test/files/neg/sealed-final-neg.check index 500d23f49a..e135f38f8b 100644 --- a/test/files/neg/sealed-final-neg.check +++ b/test/files/neg/sealed-final-neg.check @@ -1,4 +1,9 @@ -sealed-final-neg.scala:41: error: expected class or object definition -"Due to SI-6142 this emits no warnings, so we'll just break it until that's fixed." -^ +sealed-final-neg.scala:17: warning: neg1/Foo::bar(I)I is annotated @inline but cannot be inlined: the method is not final and may be overridden. + def f = Foo.mkFoo() bar 10 + ^ +sealed-final-neg.scala:37: warning: neg2/Foo::bar(I)I is annotated @inline but cannot be inlined: the method is not final and may be overridden. + def f = Foo.mkFoo() bar 10 + ^ +error: No warnings can be incurred under -Xfatal-warnings. +two warnings found one error found diff --git a/test/files/neg/sealed-final-neg.flags b/test/files/neg/sealed-final-neg.flags index cfabf7a5b4..673aca8931 100644 --- a/test/files/neg/sealed-final-neg.flags +++ b/test/files/neg/sealed-final-neg.flags @@ -1 +1 @@ --Xfatal-warnings -Yinline-warnings -optimise
\ No newline at end of file +-Xfatal-warnings -Yopt:l:project -Yopt-warnings
\ No newline at end of file diff --git a/test/files/neg/sealed-final-neg.scala b/test/files/neg/sealed-final-neg.scala index bc25330e13..ec3b199819 100644 --- a/test/files/neg/sealed-final-neg.scala +++ b/test/files/neg/sealed-final-neg.scala @@ -37,5 +37,3 @@ package neg2 { def f = Foo.mkFoo() bar 10 } } - -"Due to SI-6142 this emits no warnings, so we'll just break it until that's fixed." diff --git a/test/files/neg/t3234.check b/test/files/neg/t3234.check deleted file mode 100644 index 8f0d624ed9..0000000000 --- a/test/files/neg/t3234.check +++ /dev/null @@ -1,6 +0,0 @@ -t3234.scala:17: warning: At the end of the day, could not inline @inline-marked method foo3 - println(foo(42) + foo2(11) + foo3(2)) - ^ -error: No warnings can be incurred under -Xfatal-warnings. -one warning found -one error found diff --git a/test/files/neg/t3234.flags b/test/files/neg/t3234.flags deleted file mode 100644 index 406231bd96..0000000000 --- a/test/files/neg/t3234.flags +++ /dev/null @@ -1 +0,0 @@ --Yinline -Yinline-warnings -Xfatal-warnings -Ybackend:GenASM diff --git a/test/files/neg/t4425.flags b/test/files/neg/t4425.flags deleted file mode 100644 index 1182725e86..0000000000 --- a/test/files/neg/t4425.flags +++ /dev/null @@ -1 +0,0 @@ --optimize
\ No newline at end of file diff --git a/test/files/neg/t4749.check b/test/files/neg/t4749.check index 3539140954..6bd2550097 100644 --- a/test/files/neg/t4749.check +++ b/test/files/neg/t4749.check @@ -26,7 +26,7 @@ t4749.scala:26: warning: Fail6 has a main method with parameter type Array[Strin object Fail6 { ^ t4749.scala:42: warning: Win3 has a main method with parameter type Array[String], but bippy.Win3 will not be a runnable program. - Reason: main method must have exact signature (Array[String])Unit + Reason: main methods cannot refer to type parameters or abstract types. object Win3 extends WinBippy[Unit] { } ^ error: No warnings can be incurred under -Xfatal-warnings. diff --git a/test/files/neg/t5148.check b/test/files/neg/t5148.check deleted file mode 100644 index 286ed9e04a..0000000000 --- a/test/files/neg/t5148.check +++ /dev/null @@ -1,11 +0,0 @@ -error: missing or invalid dependency detected while loading class file 'Imports.class'. -Could not access type Wrapper in class scala.tools.nsc.interpreter.IMain.Request, -because it (or its dependencies) are missing. Check your build definition for -missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.) -A full rebuild may help if 'Imports.class' was compiled against an incompatible version of scala.tools.nsc.interpreter.IMain.Request. -error: missing or invalid dependency detected while loading class file 'Imports.class'. -Could not access type Request in class scala.tools.nsc.interpreter.IMain, -because it (or its dependencies) are missing. Check your build definition for -missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.) -A full rebuild may help if 'Imports.class' was compiled against an incompatible version of scala.tools.nsc.interpreter.IMain. -two errors found diff --git a/test/files/neg/t5639b.flags b/test/files/neg/t5639b.flags new file mode 100644 index 0000000000..90b87663af --- /dev/null +++ b/test/files/neg/t5639b.flags @@ -0,0 +1 @@ +-Xsource:2.11
\ No newline at end of file diff --git a/test/files/neg/t5761.check b/test/files/neg/t5761.check index 2d66af26f6..15c0bc7634 100644 --- a/test/files/neg/t5761.check +++ b/test/files/neg/t5761.check @@ -13,7 +13,7 @@ Unspecified value parameter x. t5761.scala:13: error: not found: type Tread new Tread("sth") { }.run() ^ -t5761.scala:13: error: value run is not a member of AnyRef +t5761.scala:13: error: value run is not a member of <error> new Tread("sth") { }.run() ^ 5 errors found diff --git a/test/files/neg/t6289.check b/test/files/neg/t6289.check index 989932750f..7b2b4b2d32 100644 --- a/test/files/neg/t6289.check +++ b/test/files/neg/t6289.check @@ -1,9 +1,3 @@ -#partest java6 -t6289/J.java:2: method does not override or implement a method from a supertype - @Override public void foo() { } - ^ -1 error -#partest !java6 t6289/J.java:2: error: method does not override or implement a method from a supertype @Override public void foo() { } ^ diff --git a/test/files/neg/t6323a.check b/test/files/neg/t6323a.check index 261a60ef3c..c4e92d93f0 100644 --- a/test/files/neg/t6323a.check +++ b/test/files/neg/t6323a.check @@ -1,10 +1,10 @@ -t6323a.scala:10: materializing requested scala.reflect.type.ClassTag[Test] using `package`.this.materializeClassTag[Test]() +t6323a.scala:10: materializing requested scala.reflect.type.ClassTag[Test] using scala.reflect.`package`.materializeClassTag[Test]() val lookAtMe = m.reflect(Test("a",List(5))) ^ -t6323a.scala:11: materializing requested reflect.runtime.universe.type.TypeTag[Test] using `package`.this.materializeTypeTag[Test](scala.reflect.runtime.`package`.universe) +t6323a.scala:11: materializing requested reflect.runtime.universe.type.TypeTag[Test] using scala.reflect.api.`package`.materializeTypeTag[Test](scala.reflect.runtime.`package`.universe) val value = u.typeOf[Test] ^ -t6323a.scala:11: `package`.this.materializeTypeTag[Test](scala.reflect.runtime.`package`.universe) is not a valid implicit value for reflect.runtime.universe.TypeTag[Test] because: +t6323a.scala:11: scala.reflect.api.`package`.materializeTypeTag[Test](scala.reflect.runtime.`package`.universe) is not a valid implicit value for reflect.runtime.universe.TypeTag[Test] because: failed to typecheck the materialized tag: cannot create a TypeTag referring to class Test.Test local to the reifee: use WeakTypeTag instead val value = u.typeOf[Test] diff --git a/test/files/neg/t6446-additional.check b/test/files/neg/t6446-additional.check index a87af2f1e5..e56a67b28b 100644 --- a/test/files/neg/t6446-additional.check +++ b/test/files/neg/t6446-additional.check @@ -22,18 +22,6 @@ superaccessors 6 add super accessors in traits and nested classes mixin 20 mixin composition cleanup 21 platform-specific cleanups, generate reflective calls delambdafy 22 remove lambdas - icode 23 generate portable intermediate code -#partest -optimise - inliner 24 optimization: do inlining -inlinehandlers 25 optimization: inline exception handlers - closelim 26 optimization: eliminate uncalled closures - constopt 27 optimization: optimize null and other constants - dce 28 optimization: eliminate dead code - jvm 29 generate JVM bytecode - ploogin 30 A sample phase that does so many things it's kind of hard... - terminal 31 the last phase during a compilation run -#partest !-optimise - jvm 24 generate JVM bytecode - ploogin 25 A sample phase that does so many things it's kind of hard... - terminal 26 the last phase during a compilation run -#partest + jvm 23 generate JVM bytecode + ploogin 24 A sample phase that does so many things it's kind of hard... + terminal 25 the last phase during a compilation run diff --git a/test/files/neg/t6446-missing.check b/test/files/neg/t6446-missing.check index 029c8057c3..15f0ceb6e3 100644 --- a/test/files/neg/t6446-missing.check +++ b/test/files/neg/t6446-missing.check @@ -23,16 +23,5 @@ superaccessors 6 add super accessors in traits and nested classes mixin 20 mixin composition cleanup 21 platform-specific cleanups, generate reflective calls delambdafy 22 remove lambdas - icode 23 generate portable intermediate code -#partest !-optimise - jvm 24 generate JVM bytecode - terminal 25 the last phase during a compilation run -#partest -optimise - inliner 24 optimization: do inlining -inlinehandlers 25 optimization: inline exception handlers - closelim 26 optimization: eliminate uncalled closures - constopt 27 optimization: optimize null and other constants - dce 28 optimization: eliminate dead code - jvm 29 generate JVM bytecode - terminal 30 the last phase during a compilation run -#partest + jvm 23 generate JVM bytecode + terminal 24 the last phase during a compilation run diff --git a/test/files/neg/t6446-show-phases.check b/test/files/neg/t6446-show-phases.check index 3ae3f96ef2..280a4f43d5 100644 --- a/test/files/neg/t6446-show-phases.check +++ b/test/files/neg/t6446-show-phases.check @@ -22,16 +22,5 @@ superaccessors 6 add super accessors in traits and nested classes mixin 20 mixin composition cleanup 21 platform-specific cleanups, generate reflective calls delambdafy 22 remove lambdas - icode 23 generate portable intermediate code -#partest !-optimise - jvm 24 generate JVM bytecode - terminal 25 the last phase during a compilation run -#partest -optimise - inliner 24 optimization: do inlining -inlinehandlers 25 optimization: inline exception handlers - closelim 26 optimization: eliminate uncalled closures - constopt 27 optimization: optimize null and other constants - dce 28 optimization: eliminate dead code - jvm 29 generate JVM bytecode - terminal 30 the last phase during a compilation run -#partest + jvm 23 generate JVM bytecode + terminal 24 the last phase during a compilation run diff --git a/test/files/neg/t6810.check b/test/files/neg/t6810.check new file mode 100644 index 0000000000..497ef35070 --- /dev/null +++ b/test/files/neg/t6810.check @@ -0,0 +1,28 @@ +t6810.scala:4: error: unclosed character literal + val y = ' + ^ +t6810.scala:5: error: unclosed character literal +' // but not embedded EOL sequences not represented as escapes +^ +t6810.scala:9: error: unclosed string literal + val Y = " + ^ +t6810.scala:10: error: unclosed string literal +" // obviously not +^ +t6810.scala:20: error: unclosed quoted identifier + val ` + ^ +t6810.scala:21: error: unclosed quoted identifier +` = EOL // not raw string literals aka triple-quoted, multiline strings +^ +t6810.scala:24: error: unclosed character literal + val b = ' + ^ +t6810.scala:25: error: unclosed character literal +' // CR seen as EOL by scanner +^ +t6810.scala:24: error: '=' expected but ';' found. + val b = ' +^ +9 errors found diff --git a/test/files/neg/t6810.scala b/test/files/neg/t6810.scala new file mode 100644 index 0000000000..50c305d70c --- /dev/null +++ b/test/files/neg/t6810.scala @@ -0,0 +1,26 @@ + +trait t6810 { + val x = '\u000A' // char literals accept arbitrary unicode escapes + val y = ' +' // but not embedded EOL sequences not represented as escapes + val z = '\n' // normally, expect this escape + + val X = "\u000A" // it's the same as ordinary string literals + val Y = " +" // obviously not + val Z = "\n" // normally, expect this escape + + val A = """ +""" // which is what these are for + val B = s""" +""" // or the same for interpolated strings + + import scala.compat.Platform.EOL + val `\u000A` = EOL // backquoted identifiers are arbitrary string literals + val ` +` = EOL // not raw string literals aka triple-quoted, multiline strings + + val a = '\u000D' // similar treatment of CR + val b = '
' // CR seen as EOL by scanner + val c = '\r' // traditionally +} diff --git a/test/files/neg/t7171.check b/test/files/neg/t7171.check index ecd768afda..2de9151483 100644 --- a/test/files/neg/t7171.check +++ b/test/files/neg/t7171.check @@ -1,6 +1,9 @@ t7171.scala:2: warning: The outer reference in this type test cannot be checked at run time. final case class A() ^ +t7171.scala:9: warning: The outer reference in this type test cannot be checked at run time. + case _: A => true; case _ => false + ^ error: No warnings can be incurred under -Xfatal-warnings. -one warning found +two warnings found one error found diff --git a/test/files/neg/t7171b.check b/test/files/neg/t7171b.check index bf695afea7..6b05b6fa63 100644 --- a/test/files/neg/t7171b.check +++ b/test/files/neg/t7171b.check @@ -1,6 +1,12 @@ t7171b.scala:2: warning: The outer reference in this type test cannot be checked at run time. final case class A() ^ +t7171b.scala:8: warning: The outer reference in this type test cannot be checked at run time. + case _: A => true; case _ => false + ^ +t7171b.scala:13: warning: The outer reference in this type test cannot be checked at run time. + case _: A => true; case _ => false + ^ error: No warnings can be incurred under -Xfatal-warnings. -one warning found +three warnings found one error found diff --git a/test/files/neg/t7494-no-options.check b/test/files/neg/t7494-no-options.check index e3316f590a..a4c4a1ad5b 100644 --- a/test/files/neg/t7494-no-options.check +++ b/test/files/neg/t7494-no-options.check @@ -23,18 +23,6 @@ superaccessors 6 add super accessors in traits and nested classes mixin 20 mixin composition cleanup 21 platform-specific cleanups, generate reflective calls delambdafy 22 remove lambdas - icode 23 generate portable intermediate code -#partest !-optimise - jvm 24 generate JVM bytecode - ploogin 25 A sample phase that does so many things it's kind of hard... - terminal 26 the last phase during a compilation run -#partest -optimise - inliner 24 optimization: do inlining -inlinehandlers 25 optimization: inline exception handlers - closelim 26 optimization: eliminate uncalled closures - constopt 27 optimization: optimize null and other constants - dce 28 optimization: eliminate dead code - jvm 29 generate JVM bytecode - ploogin 30 A sample phase that does so many things it's kind of hard... - terminal 31 the last phase during a compilation run -#partest + jvm 23 generate JVM bytecode + ploogin 24 A sample phase that does so many things it's kind of hard... + terminal 25 the last phase during a compilation run diff --git a/test/files/neg/t7622-cyclic-dependency/ThePlugin.scala b/test/files/neg/t7622-cyclic-dependency/ThePlugin.scala index 35c0ff8f53..0734863e64 100644 --- a/test/files/neg/t7622-cyclic-dependency/ThePlugin.scala +++ b/test/files/neg/t7622-cyclic-dependency/ThePlugin.scala @@ -26,7 +26,7 @@ class ThePlugin(val global: Global) extends Plugin { private object thePhase2 extends PluginComponent { val global = ThePlugin.this.global - val runsAfter = List[String]("dce","cyclicdependency1") + val runsAfter = List[String]("jvm","cyclicdependency1") val phaseName = ThePlugin.this.name + "2" diff --git a/test/files/neg/t7848-interp-warn.check b/test/files/neg/t7848-interp-warn.check index 637fc8941a..cc94cc81de 100644 --- a/test/files/neg/t7848-interp-warn.check +++ b/test/files/neg/t7848-interp-warn.check @@ -1,15 +1,27 @@ -t7848-interp-warn.scala:8: warning: possible missing interpolator: detected interpolated identifier `$foo` - "An important $foo message!" +t7848-interp-warn.scala:18: warning: possible missing interpolator: detected interpolated identifier `$foo` + "An important $foo message!" // warn on ident in scope ^ -t7848-interp-warn.scala:12: warning: possible missing interpolator: detected an interpolated expression - "A doubly important ${foo * 2} message!" +t7848-interp-warn.scala:22: warning: possible missing interpolator: detected an interpolated expression + "A doubly important ${foo * 2} message!" // warn on some expr, see below ^ -t7848-interp-warn.scala:15: warning: possible missing interpolator: detected interpolated identifier `$bar` - def i = s"Try using '${ "$bar" }' instead." // was: no warn on space test +t7848-interp-warn.scala:25: warning: possible missing interpolator: detected interpolated identifier `$bar` + def i = s"Try using '${ "$bar" }' instead." // was: no warn on space test ^ -t7848-interp-warn.scala:16: warning: possible missing interpolator: detected interpolated identifier `$bar` +t7848-interp-warn.scala:26: warning: possible missing interpolator: detected interpolated identifier `$bar` def j = s"Try using '${ "something like $bar" }' instead." // warn ^ +t7848-interp-warn.scala:32: warning: possible missing interpolator: detected an interpolated expression + def v = "${baz}${bar}" // warn on second expr + ^ +t7848-interp-warn.scala:33: warning: possible missing interpolator: detected an interpolated expression + def w = "${ op_* }" // warn, only cheap ident parsing + ^ +t7848-interp-warn.scala:34: warning: possible missing interpolator: detected an interpolated expression + def x = "${ bar }" // warn, a cheap ident in scope + ^ +t7848-interp-warn.scala:36: warning: possible missing interpolator: detected an interpolated expression + def z = "${ baz * 3}" // warn, no expr parsing + ^ error: No warnings can be incurred under -Xfatal-warnings. -four warnings found +8 warnings found one error found diff --git a/test/files/neg/t7848-interp-warn.scala b/test/files/neg/t7848-interp-warn.scala index a76141041d..ceaf6c7d67 100644 --- a/test/files/neg/t7848-interp-warn.scala +++ b/test/files/neg/t7848-interp-warn.scala @@ -1,18 +1,37 @@ package test +package pancake { } + object Test { + type NonVal = Int + + def ok = "Don't warn on $nosymbol interpolated." + + def pass = "Don't warn on $pancake package names." + + def types = "Or $NonVal type symbols either." + def bar = "bar" def f = { val foo = "bar" - "An important $foo message!" + "An important $foo message!" // warn on ident in scope } def g = { val foo = "bar" - "A doubly important ${foo * 2} message!" + "A doubly important ${foo * 2} message!" // warn on some expr, see below } - def h = s"Try using '$$bar' instead." // no warn - def i = s"Try using '${ "$bar" }' instead." // was: no warn on space test + def h = s"Try using '$$bar' instead." // no warn + def i = s"Try using '${ "$bar" }' instead." // was: no warn on space test def j = s"Try using '${ "something like $bar" }' instead." // warn - def k = f"Try using '$bar' instead." // no warn on other std interps + def k = f"Try using '$bar' instead." // no warn on other std interps + def p = "Template ${} {}" // no warn on unlikely or empty expressions + def q = "${}$bar" // disables subsequent checks! (a feature) + def r = "${}${bar}" // disables subsequent checks! (a feature) + + def v = "${baz}${bar}" // warn on second expr + def w = "${ op_* }" // warn, only cheap ident parsing + def x = "${ bar }" // warn, a cheap ident in scope + def y = "${ baz }" // no warn, cheap ident not in scope + def z = "${ baz * 3}" // warn, no expr parsing } diff --git a/test/files/neg/t8685.check b/test/files/neg/t8685.check new file mode 100644 index 0000000000..1780a20b6e --- /dev/null +++ b/test/files/neg/t8685.check @@ -0,0 +1,45 @@ +t8685.scala:6: warning: constructor D in class D is deprecated: ctor D is depr +case class D @deprecated("ctor D is depr", since="now") (i: Int) + ^ +t8685.scala:35: warning: class C is deprecated: class C is depr + def f = C(42) + ^ +t8685.scala:37: warning: object E is deprecated: module E is depr + def h = E(42) + ^ +t8685.scala:37: warning: class E is deprecated: class E is depr + def h = E(42) + ^ +t8685.scala:38: warning: object F is deprecated: module F is depr + def i = F.G(42) + ^ +t8685.scala:39: warning: object F in object Extra is deprecated: Extra module F is depr + def j = Extra.F.G(42) + ^ +t8685.scala:43: warning: value gg in trait Applies is deprecated: member gg + def k = this.gg.H(0) + ^ +t8685.scala:45: warning: class K in object J is deprecated: Inner K is depr + def l = J.K(42) + ^ +t8685.scala:48: warning: class C is deprecated: class C is depr + def f = new C(42) + ^ +t8685.scala:49: warning: constructor D in class D is deprecated: ctor D is depr + def g = new D(42) + ^ +t8685.scala:50: warning: class E is deprecated: class E is depr + def h = new E(42) + ^ +t8685.scala:51: warning: object F is deprecated: module F is depr + def i = new F.G(42) + ^ +t8685.scala:52: warning: object F in object Extra is deprecated: Extra module F is depr + def j = new Extra.F.G(42) + ^ +t8685.scala:53: warning: class K in object J is deprecated: Inner K is depr + def l = new J.K(42) + ^ +error: No warnings can be incurred under -Xfatal-warnings. +14 warnings found +one error found diff --git a/test/files/neg/t8685.flags b/test/files/neg/t8685.flags new file mode 100644 index 0000000000..c6bfaf1f64 --- /dev/null +++ b/test/files/neg/t8685.flags @@ -0,0 +1 @@ +-deprecation -Xfatal-warnings diff --git a/test/files/neg/t8685.scala b/test/files/neg/t8685.scala new file mode 100644 index 0000000000..711680ecbd --- /dev/null +++ b/test/files/neg/t8685.scala @@ -0,0 +1,54 @@ + + +@deprecated("class C is depr", since="now") +case class C(i: Int) + +case class D @deprecated("ctor D is depr", since="now") (i: Int) + +@deprecated("class E is depr", since="now") +case class E(i: Int) +@deprecated("module E is depr", since="now") +object E + +@deprecated("module F is depr", since="now") +object F { + case class G(i: Int) +} + +object G { + case class H(i: Int) +} + +object Extra { + @deprecated("Extra module F is depr", since="now") + object F { + case class G(i: Int) + } +} + +object J { + @deprecated("Inner K is depr", since="now") + case class K(i: Int) +} + +trait Applies { + def f = C(42) + def g = D(42) + def h = E(42) + def i = F.G(42) + def j = Extra.F.G(42) + + @deprecated("member gg", since="now") + val gg = G + def k = this.gg.H(0) + + def l = J.K(42) +} +trait News { + def f = new C(42) + def g = new D(42) + def h = new E(42) + def i = new F.G(42) + def j = new Extra.F.G(42) + def l = new J.K(42) +} diff --git a/test/files/neg/t8700a.check b/test/files/neg/t8700a.check new file mode 100644 index 0000000000..ce7945a3fc --- /dev/null +++ b/test/files/neg/t8700a.check @@ -0,0 +1,11 @@ +Bar.scala:2: warning: match may not be exhaustive. +It would fail on the following input: B + def bar1(foo: Foo) = foo match { + ^ +Bar.scala:6: warning: match may not be exhaustive. +It would fail on the following input: B + def bar2(foo: Baz) = foo match { + ^ +error: No warnings can be incurred under -Xfatal-warnings. +two warnings found +one error found diff --git a/test/files/neg/t8700a.flags b/test/files/neg/t8700a.flags new file mode 100644 index 0000000000..85d8eb2ba2 --- /dev/null +++ b/test/files/neg/t8700a.flags @@ -0,0 +1 @@ +-Xfatal-warnings diff --git a/test/files/neg/t8700a/Bar.scala b/test/files/neg/t8700a/Bar.scala new file mode 100644 index 0000000000..33ad8e9877 --- /dev/null +++ b/test/files/neg/t8700a/Bar.scala @@ -0,0 +1,9 @@ +object Bar { + def bar1(foo: Foo) = foo match { + case Foo.A => 1 + } + + def bar2(foo: Baz) = foo match { + case Baz.A => 1 + } +} diff --git a/test/files/neg/t8700a/Baz.java b/test/files/neg/t8700a/Baz.java new file mode 100644 index 0000000000..f85ad40802 --- /dev/null +++ b/test/files/neg/t8700a/Baz.java @@ -0,0 +1,11 @@ +public enum Baz { + A { + public void baz1() {} + }, + B { + public void baz1() {} + }; + + public abstract void baz1(); + public void baz2() {} +} diff --git a/test/files/neg/t8700a/Foo.java b/test/files/neg/t8700a/Foo.java new file mode 100644 index 0000000000..cc8e9daf1f --- /dev/null +++ b/test/files/neg/t8700a/Foo.java @@ -0,0 +1,4 @@ +public enum Foo { + A, + B +} diff --git a/test/files/neg/t8700b.check b/test/files/neg/t8700b.check new file mode 100644 index 0000000000..3bff78dd29 --- /dev/null +++ b/test/files/neg/t8700b.check @@ -0,0 +1,11 @@ +Bar_2.scala:2: warning: match may not be exhaustive. +It would fail on the following input: B + def bar1(foo: Foo_1) = foo match { + ^ +Bar_2.scala:6: warning: match may not be exhaustive. +It would fail on the following input: B + def bar2(foo: Baz_1) = foo match { + ^ +error: No warnings can be incurred under -Xfatal-warnings. +two warnings found +one error found diff --git a/test/files/neg/t8700b.flags b/test/files/neg/t8700b.flags new file mode 100644 index 0000000000..85d8eb2ba2 --- /dev/null +++ b/test/files/neg/t8700b.flags @@ -0,0 +1 @@ +-Xfatal-warnings diff --git a/test/files/neg/t8700b/Bar_2.scala b/test/files/neg/t8700b/Bar_2.scala new file mode 100644 index 0000000000..97ba16df27 --- /dev/null +++ b/test/files/neg/t8700b/Bar_2.scala @@ -0,0 +1,9 @@ +object Bar { + def bar1(foo: Foo_1) = foo match { + case Foo_1.A => 1 + } + + def bar2(foo: Baz_1) = foo match { + case Baz_1.A => 1 + } +} diff --git a/test/files/neg/t8700b/Baz_1.java b/test/files/neg/t8700b/Baz_1.java new file mode 100644 index 0000000000..6a057c2c9c --- /dev/null +++ b/test/files/neg/t8700b/Baz_1.java @@ -0,0 +1,11 @@ +public enum Baz_1 { + A { + public void baz1() {} + }, + B { + public void baz1() {} + }; + + public abstract void baz1(); + public void baz2() {} +} diff --git a/test/files/neg/t8700b/Foo_1.java b/test/files/neg/t8700b/Foo_1.java new file mode 100644 index 0000000000..22656bdedd --- /dev/null +++ b/test/files/neg/t8700b/Foo_1.java @@ -0,0 +1,4 @@ +public enum Foo_1 { + A, + B +} diff --git a/test/files/neg/t8764.check b/test/files/neg/t8764.check deleted file mode 100644 index 6d89ebe106..0000000000 --- a/test/files/neg/t8764.check +++ /dev/null @@ -1,6 +0,0 @@ -t8764.scala:8: error: type mismatch; - found : AnyVal - required: Double - val d: Double = a.productElement(0) - ^ -one error found diff --git a/test/files/neg/t8764.scala b/test/files/neg/t8764.scala deleted file mode 100644 index dc5bfb0160..0000000000 --- a/test/files/neg/t8764.scala +++ /dev/null @@ -1,9 +0,0 @@ -object Main { - - case class IntAndDouble(i: Int, d: Double) - - // a.productElement used to be Int => Double - // now: Int => AnyVal - val a = IntAndDouble(1, 5.0) - val d: Double = a.productElement(0) -} diff --git a/test/files/neg/t8849.check b/test/files/neg/t8849.check new file mode 100644 index 0000000000..15b00aee8b --- /dev/null +++ b/test/files/neg/t8849.check @@ -0,0 +1,7 @@ +t8849.scala:8: error: ambiguous implicit values: + both value global in object Implicits of type => scala.concurrent.ExecutionContext + and value dummy of type scala.concurrent.ExecutionContext + match expected type scala.concurrent.ExecutionContext + require(implicitly[ExecutionContext] eq dummy) + ^ +one error found diff --git a/test/files/neg/t8849.scala b/test/files/neg/t8849.scala new file mode 100644 index 0000000000..336f16b40f --- /dev/null +++ b/test/files/neg/t8849.scala @@ -0,0 +1,10 @@ +import scala.concurrent.ExecutionContext +import ExecutionContext.Implicits.global + +object Test { + def main(args: Array[String]): Unit = { + implicit val dummy: ExecutionContext = null + require(scala.concurrent.ExecutionContext.Implicits.global ne null) + require(implicitly[ExecutionContext] eq dummy) + } +}
\ No newline at end of file diff --git a/test/files/neg/t9398.check b/test/files/neg/t9398.check new file mode 100644 index 0000000000..f0c464daa1 --- /dev/null +++ b/test/files/neg/t9398.check @@ -0,0 +1,7 @@ +match.scala:3: warning: match may not be exhaustive. +It would fail on the following input: CC(B2) + def test(c: CC): Unit = c match { + ^ +error: No warnings can be incurred under -Xfatal-warnings. +one warning found +one error found diff --git a/test/files/neg/t9398.flags b/test/files/neg/t9398.flags new file mode 100644 index 0000000000..85d8eb2ba2 --- /dev/null +++ b/test/files/neg/t9398.flags @@ -0,0 +1 @@ +-Xfatal-warnings diff --git a/test/files/neg/t9398/data.scala b/test/files/neg/t9398/data.scala new file mode 100644 index 0000000000..7a98c0e8e8 --- /dev/null +++ b/test/files/neg/t9398/data.scala @@ -0,0 +1,5 @@ +sealed abstract class TB +case object B extends TB +case object B2 extends TB + +case class CC(tb: TB) diff --git a/test/files/neg/t9398/match.scala b/test/files/neg/t9398/match.scala new file mode 100644 index 0000000000..e110c6a96a --- /dev/null +++ b/test/files/neg/t9398/match.scala @@ -0,0 +1,6 @@ +class Test { + // Should warn that CC(B2) isn't matched + def test(c: CC): Unit = c match { + case CC(B) => () + } +} diff --git a/test/files/neg/t9527a.check b/test/files/neg/t9527a.check new file mode 100644 index 0000000000..e756518bed --- /dev/null +++ b/test/files/neg/t9527a.check @@ -0,0 +1,7 @@ +t9527a.scala:5: error: ambiguous implicit values: + both method f in class C of type (x: Int)String + and method g in class C of type (x: Int)String + match expected type Int => String + implicitly[Int => String] + ^ +one error found diff --git a/test/files/neg/t9527a.scala b/test/files/neg/t9527a.scala new file mode 100644 index 0000000000..35c58fc9a6 --- /dev/null +++ b/test/files/neg/t9527a.scala @@ -0,0 +1,8 @@ +class C { + implicit def f(x: Int): String = "f was here" + implicit def g(x: Int): String = "f was here" + def test: Unit = { + implicitly[Int => String] + } +} + diff --git a/test/files/neg/t9527b.check b/test/files/neg/t9527b.check new file mode 100644 index 0000000000..4529ec83ea --- /dev/null +++ b/test/files/neg/t9527b.check @@ -0,0 +1,4 @@ +t9527b.scala:6: error: msg A=Nothing + implicitly[Int => String] + ^ +one error found diff --git a/test/files/neg/t9527b.scala b/test/files/neg/t9527b.scala new file mode 100644 index 0000000000..b40a4dca9e --- /dev/null +++ b/test/files/neg/t9527b.scala @@ -0,0 +1,9 @@ +class C { + @annotation.implicitAmbiguous("msg A=${A}") + implicit def f[A](x: Int): String = "f was here" + implicit def g(x: Int): String = "f was here" + def test: Unit = { + implicitly[Int => String] + } +} + diff --git a/test/files/neg/t9535.check b/test/files/neg/t9535.check new file mode 100644 index 0000000000..5c3e3ea8e6 --- /dev/null +++ b/test/files/neg/t9535.check @@ -0,0 +1,7 @@ +t9535.scala:4: error: not found: type E1 + @throws[E1] def f[E1 <: Exception] = 1 + ^ +t9535.scala:6: error: class type required but E found + @throws(classOf[E]) def g: E = ??? // neg test: classOf requires class type + ^ +two errors found diff --git a/test/files/neg/t9535.scala b/test/files/neg/t9535.scala new file mode 100644 index 0000000000..37253804ce --- /dev/null +++ b/test/files/neg/t9535.scala @@ -0,0 +1,7 @@ +class C[E <: Exception] { + // cannot be expressed in Scala (it's allowed in Java) + // https://issues.scala-lang.org/browse/SI-7066 + @throws[E1] def f[E1 <: Exception] = 1 + + @throws(classOf[E]) def g: E = ??? // neg test: classOf requires class type +} diff --git a/test/files/neg/t9629.check b/test/files/neg/t9629.check new file mode 100644 index 0000000000..4eafa84236 --- /dev/null +++ b/test/files/neg/t9629.check @@ -0,0 +1,17 @@ +t9629.scala:4: error: pattern must be a value: Option[Int] +Note: if you intended to match against the class, try `case _: Option[_]` + case Option[Int] => // error was issued before + ^ +t9629.scala:5: error: pattern must be a value: Option[Int] +Note: if you intended to match against the class, try `case _: Option[_]` + case Some(Option[Int]) => // error was skipped, patmat issued an internal error + ^ +t9629.scala:8: error: pattern must be a value: Option[Int] +Note: if you intended to match against the class, try `case _: Option[_]` + case (_, Option[Int]) => + ^ +t9629.scala:9: error: pattern must be a value: Option[Int] +Note: if you intended to match against the class, try `case _: Option[_]` + case x @ (y @ Option[Int]) => + ^ +four errors found diff --git a/test/files/neg/t9629.scala b/test/files/neg/t9629.scala new file mode 100644 index 0000000000..2be2b039f2 --- /dev/null +++ b/test/files/neg/t9629.scala @@ -0,0 +1,12 @@ +class Test { + def foo(a: Any) { + a match { + case Option[Int] => // error was issued before + case Some(Option[Int]) => // error was skipped, patmat issued an internal error + + // variations + case (_, Option[Int]) => + case x @ (y @ Option[Int]) => + } + } +} diff --git a/test/files/pos/MailBox.scala b/test/files/pos/MailBox.scala index 8e27bd362d..6bb25adb19 100644 --- a/test/files/pos/MailBox.scala +++ b/test/files/pos/MailBox.scala @@ -1,6 +1,6 @@ package test; -import scala.actors.TIMEOUT; +object TIMEOUT class MailBox { diff --git a/test/files/pos/SI-7060.flags b/test/files/pos/SI-7060.flags deleted file mode 100644 index c926ad6493..0000000000 --- a/test/files/pos/SI-7060.flags +++ /dev/null @@ -1 +0,0 @@ --Yinline -Ydead-code diff --git a/test/files/pos/SI-7060.scala b/test/files/pos/SI-7060.scala deleted file mode 100644 index c87620e020..0000000000 --- a/test/files/pos/SI-7060.scala +++ /dev/null @@ -1,11 +0,0 @@ -object Test { - - @inline final def mbarray_apply_minibox(array: Any, tag: Byte): Long = - if (tag == 0) { - array.asInstanceOf[Array[Long]](0) - } else - array.asInstanceOf[Array[Byte]](0).toLong - - def crash_method(): Unit = - mbarray_apply_minibox(null, 0) -} diff --git a/test/files/pos/alladin763.scala b/test/files/pos/alladin763.scala new file mode 100644 index 0000000000..29c9b25318 --- /dev/null +++ b/test/files/pos/alladin763.scala @@ -0,0 +1,37 @@ +// Test from http://lrytz.github.io/scala-aladdin-bugtracker/displayItem.do%3Fid=763.html +// and expanded with package object variants + + +trait Foo { type T; def apply() : T } +object e extends Foo { type T = Int; def apply() = 42 } + +package p { + trait T[X] { def O : { def apply(): X } } + object `package` extends T[Int] { + def O: { def apply(): Int } = new { def apply(): Int = 42 } + } + + object Test { + val x: Int = O() + } +} + +object Test { + + val f = new Foo { type T = Int; def apply() = 42 } + + def main(args: Array[String]): Unit = { + val g = new Foo { type T = Int; def apply() = 42 } + + (e: Foo)() + val ee: Int = e() + + (f: Foo)() + val ff: Int = f() + + (g: Foo)() + val gg: Int = g() + + val pp: Int = p.O() + } +} diff --git a/test/files/pos/fun_undo_eta.scala b/test/files/pos/fun_undo_eta.scala new file mode 100644 index 0000000000..466b0e2629 --- /dev/null +++ b/test/files/pos/fun_undo_eta.scala @@ -0,0 +1,10 @@ +class Test { + def m(i: Int) = i + + def expectWild[A](f: A) = ??? + def expectFun[A](f: A => Int) = ??? + + expectWild((i => m(i))) // manual eta expansion + expectWild(m(_)) // have to undo eta expansion with wildcard expected type + expectFun(m(_)) // have to undo eta expansion with function expected type +} diff --git a/test/files/pos/functions.scala b/test/files/pos/functions.scala index 0207523dde..25d1c46eac 100644 --- a/test/files/pos/functions.scala +++ b/test/files/pos/functions.scala @@ -1,4 +1,6 @@ -import scala.actors.Actor +object Actor { + def receive[A](f: PartialFunction[Any, A]): A = ??? +} object Test { diff --git a/test/files/pos/inline-access-levels.flags b/test/files/pos/inline-access-levels.flags index 882f40f050..9af9168a20 100644 --- a/test/files/pos/inline-access-levels.flags +++ b/test/files/pos/inline-access-levels.flags @@ -1 +1 @@ --optimise -Xfatal-warnings -Yinline-warnings +-Yopt:l:classpath -Xfatal-warnings -Yopt-warnings diff --git a/test/files/pos/inliner2.flags b/test/files/pos/inliner2.flags deleted file mode 100644 index ea03113c66..0000000000 --- a/test/files/pos/inliner2.flags +++ /dev/null @@ -1 +0,0 @@ --optimise -Xfatal-warnings
\ No newline at end of file diff --git a/test/files/pos/inliner2.scala b/test/files/pos/inliner2.scala deleted file mode 100644 index bc83e04312..0000000000 --- a/test/files/pos/inliner2.scala +++ /dev/null @@ -1,57 +0,0 @@ -// This isn't actually testing much, because no warning is emitted in versions -// before the fix which comes with this because the method isn't even considered -// for inlining due to the bug. -class A { - private var debug = false - @inline private def ifelse[T](cond: => Boolean, ifPart: => T, elsePart: => T): T = - if (cond) ifPart else elsePart - - final def bob1() = ifelse(debug, 1, 2) - final def bob2() = if (debug) 1 else 2 -} -// Cool: -// -// % ls -1 /tmp/2901/ -// A$$anonfun$bob1$1.class -// A$$anonfun$bob1$2.class -// A$$anonfun$bob1$3.class -// A.class -// % ls -1 /tmp/trunk -// A.class -// -// Observations: -// -// (1) The inlined version accesses the field: the explicit one calls the accessor. -// (2) The inlined version fails to eliminate boxing. With reference types it emits -// an unneeded checkcast. -// (3) The private var debug is mangled to A$$debug, but after inlining it is never accessed -// from outside of the class and doesn't need mangling. -// (4) We could forego emitting bytecode for ifelse entirely if it has been -// inlined at all sites. -// -// Generated bytecode for the above: -// -// public final int bob1(); -// Code: -// Stack=1, Locals=1, Args_size=1 -// 0: aload_0 -// 1: getfield #11; //Field A$$debug:Z -// 4: ifeq 14 -// 7: iconst_1 -// 8: invokestatic #41; //Method scala/runtime/BoxesRunTime.boxToInteger:(I)Ljava/lang/Integer; -// 11: goto 18 -// 14: iconst_2 -// 15: invokestatic #41; //Method scala/runtime/BoxesRunTime.boxToInteger:(I)Ljava/lang/Integer; -// 18: invokestatic #45; //Method scala/runtime/BoxesRunTime.unboxToInt:(Ljava/lang/Object;)I -// 21: ireturn -// -// public final int bob2(); -// Code: -// Stack=1, Locals=1, Args_size=1 -// 0: aload_0 -// 1: invokevirtual #48; //Method A$$debug:()Z -// 4: ifeq 11 -// 7: iconst_1 -// 8: goto 12 -// 11: iconst_2 -// 12: ireturn diff --git a/test/files/pos/java-type-annotations/NotNull.java b/test/files/pos/java-type-annotations/NotNull.java new file mode 100644 index 0000000000..2716fe1a99 --- /dev/null +++ b/test/files/pos/java-type-annotations/NotNull.java @@ -0,0 +1,6 @@ +import java.lang.annotation.*; + +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER}) +public @interface NotNull { +} diff --git a/test/files/pos/java-type-annotations/Test.java b/test/files/pos/java-type-annotations/Test.java new file mode 100644 index 0000000000..d6bda1dedb --- /dev/null +++ b/test/files/pos/java-type-annotations/Test.java @@ -0,0 +1,4 @@ +public class Test { + static class C<@NotNull T> {}; + @NotNull String foo() { return ""; } +} diff --git a/test/files/pos/list-optim-check.flags b/test/files/pos/list-optim-check.flags deleted file mode 100644 index 49d036a887..0000000000 --- a/test/files/pos/list-optim-check.flags +++ /dev/null @@ -1 +0,0 @@ --optimize diff --git a/test/files/pos/list-optim-check.scala b/test/files/pos/list-optim-check.scala deleted file mode 100644 index f6e6ddec77..0000000000 --- a/test/files/pos/list-optim-check.scala +++ /dev/null @@ -1,21 +0,0 @@ -// Tests a map known to crash in optimizer with faster List map in SI-8240. -// Equivalent tests for collect and flatmap do not crash, but are provided -// anyway. -// See ticket SI-8334 for optimizer bug. -// TODO - Remove this test once SI-8334 is fixed and has its own test. -class A { - def f: Boolean = { - val xs = Nil map (_ => return false) - true - } - - def g: Boolean = { - val xs = Nil collect { case _ => return false } - true - } - - def h: Boolean = { - val xs = Nil flatMap { _ => return false } - true - } -} diff --git a/test/files/pos/native-warning.scala b/test/files/pos/native-warning.scala index f721a57e8f..a2918c11b5 100644 --- a/test/files/pos/native-warning.scala +++ b/test/files/pos/native-warning.scala @@ -1,3 +1,7 @@ class A { @native def setup(): Unit + + // also kosher + @native private def f(): Unit + @native final def g(): Unit } diff --git a/test/files/pos/sammy_ctor_arg.scala b/test/files/pos/sammy_ctor_arg.scala new file mode 100644 index 0000000000..3c556d59f0 --- /dev/null +++ b/test/files/pos/sammy_ctor_arg.scala @@ -0,0 +1,4 @@ +trait Fun[A, B] { def apply(a: A): B } +// can't do sam expansion until the sam body def is a static method in the sam class, and not a local method in a block' +class C(f: Fun[Int, String]) +class Test extends C(s => "a")
\ No newline at end of file diff --git a/test/files/pos/sammy_exist.flags b/test/files/pos/sammy_exist.flags deleted file mode 100644 index 48fd867160..0000000000 --- a/test/files/pos/sammy_exist.flags +++ /dev/null @@ -1 +0,0 @@ --Xexperimental diff --git a/test/files/pos/sammy_implicit.scala b/test/files/pos/sammy_implicit.scala new file mode 100644 index 0000000000..ab63fc729e --- /dev/null +++ b/test/files/pos/sammy_implicit.scala @@ -0,0 +1,11 @@ +trait Fun[A, B] { def apply(a: A): B } + +abstract class SamImplicitConvert { + class Lst[T] + abstract class Str { def getBytes: Array[Int] } + def flatMap[B](f: Fun[Str, Lst[B]]): List[B] = ??? + + implicit def conv(xs: Array[Int]): Lst[Int] + + def encoded = flatMap (_.getBytes) +} diff --git a/test/files/pos/sammy_infer_argtype_subtypes.scala b/test/files/pos/sammy_infer_argtype_subtypes.scala new file mode 100644 index 0000000000..63966f879e --- /dev/null +++ b/test/files/pos/sammy_infer_argtype_subtypes.scala @@ -0,0 +1,6 @@ +trait Fun[A, B] { def apply(a: A): B } + +class SamInferResult { + def foreach[U](f: Fun[String, U]): U = ??? + def foo = foreach(println) +}
\ No newline at end of file diff --git a/test/files/pos/sammy_inferargs.scala b/test/files/pos/sammy_inferargs.scala new file mode 100644 index 0000000000..10d9b4f0dd --- /dev/null +++ b/test/files/pos/sammy_inferargs.scala @@ -0,0 +1,6 @@ +trait Proc { def apply(): Unit } +class Test { + val initCode = List[Proc]() + initCode foreach { proc => proc() } + +} diff --git a/test/files/pos/sammy_overload.flags b/test/files/pos/sammy_overload.flags deleted file mode 100644 index 48fd867160..0000000000 --- a/test/files/pos/sammy_overload.flags +++ /dev/null @@ -1 +0,0 @@ --Xexperimental diff --git a/test/files/pos/sammy_overload.scala b/test/files/pos/sammy_overload.scala index 5472248f4d..6a3c88ec55 100644 --- a/test/files/pos/sammy_overload.scala +++ b/test/files/pos/sammy_overload.scala @@ -6,4 +6,29 @@ object Test { def foo(x: String): Unit = ??? def foo(): Unit = ??? val f: Consumer[_ >: String] = foo -}
\ No newline at end of file +} + +trait A[A, B] { def apply(a: A): B } + +class ArityDisambiguate { + object O { + def m(a: A[Int, Int]) = 0 + def m(f: (Int, Int) => Int) = 1 + } + + O.m(x => x) // ok + O.m((x, y) => x) // ok +} + +class InteractionWithImplicits { + object O { + class Ev + implicit object E1 extends Ev + implicit object E2 extends Ev + def m(a: A[Int, Int])(implicit ol: E1.type) = 0 + def m(a: A[String, Int])(implicit ol: E2.type) = 1 + } + + O.m((x: Int) => 1) // ok + O.m((x: String) => 1) // ok +} diff --git a/test/files/pos/sammy_override.flags b/test/files/pos/sammy_override.flags deleted file mode 100644 index 48fd867160..0000000000 --- a/test/files/pos/sammy_override.flags +++ /dev/null @@ -1 +0,0 @@ --Xexperimental diff --git a/test/files/pos/sammy_poly.flags b/test/files/pos/sammy_poly.flags deleted file mode 100644 index 48fd867160..0000000000 --- a/test/files/pos/sammy_poly.flags +++ /dev/null @@ -1 +0,0 @@ --Xexperimental diff --git a/test/files/pos/sammy_poly.scala b/test/files/pos/sammy_poly.scala index c629be7166..ba10baea49 100644 --- a/test/files/pos/sammy_poly.scala +++ b/test/files/pos/sammy_poly.scala @@ -1,7 +1,12 @@ // test synthesizeSAMFunction where the sam type is not fully defined -class T { - trait F[T, U] { def apply(x: T): U } - // NOTE: the f(x) desugaring for now assumes the single abstract method is called 'apply' +trait F[T, R]{ def apply(x: T): R } + +class PolySammy { + (x => x + 1): F[Int, Int] + ((x: Int) => x + 1): F[Int, Int] + ((x: String) => 1): F[String, Int] + ((x: Object) => 1): F[String, Int] + def app[T, U](x: T)(f: F[T, U]): U = f(x) app(1)(x => List(x)) -}
\ No newline at end of file +} diff --git a/test/files/pos/sammy_scope.flags b/test/files/pos/sammy_scope.flags deleted file mode 100644 index 48fd867160..0000000000 --- a/test/files/pos/sammy_scope.flags +++ /dev/null @@ -1 +0,0 @@ --Xexperimental diff --git a/test/files/pos/sammy_scope.scala b/test/files/pos/sammy_scope.scala index 8f1fe7058e..9d35501a47 100644 --- a/test/files/pos/sammy_scope.scala +++ b/test/files/pos/sammy_scope.scala @@ -1,8 +1,8 @@ // test synthesizeSAMFunction: scope hygiene -abstract class SamFun[T1, R] { self => +trait SamFun[T1, R] { self => def apply(v1: T1): R // this should type check, as the apply ref is equivalent to self.apply // it shouldn't resolve to the sam's apply that's synthesized (that wouldn't type check, hence the pos test) def compose[A](g: SamFun[A, T1]): SamFun[A, R] = { x => apply(g(x)) } -}
\ No newline at end of file +} diff --git a/test/files/pos/sammy_single.flags b/test/files/pos/sammy_single.flags deleted file mode 100644 index 48fd867160..0000000000 --- a/test/files/pos/sammy_single.flags +++ /dev/null @@ -1 +0,0 @@ --Xexperimental diff --git a/test/files/pos/sammy_twice.flags b/test/files/pos/sammy_twice.flags deleted file mode 100644 index 48fd867160..0000000000 --- a/test/files/pos/sammy_twice.flags +++ /dev/null @@ -1 +0,0 @@ --Xexperimental diff --git a/test/files/pos/sealed-final.flags b/test/files/pos/sealed-final.flags deleted file mode 100644 index cfabf7a5b4..0000000000 --- a/test/files/pos/sealed-final.flags +++ /dev/null @@ -1 +0,0 @@ --Xfatal-warnings -Yinline-warnings -optimise
\ No newline at end of file diff --git a/test/files/pos/sealed-final.scala b/test/files/pos/sealed-final.scala deleted file mode 100644 index bdedb5c1f6..0000000000 --- a/test/files/pos/sealed-final.scala +++ /dev/null @@ -1,14 +0,0 @@ -sealed abstract class Foo { - @inline def bar(x: Int) = x + 1 -} -object Foo { - def mkFoo(): Foo = new Baz2 -} - -object Baz1 extends Foo -final class Baz2 extends Foo - -object Test { - // bar should be inlined now - def f = Foo.mkFoo() bar 10 -} diff --git a/test/files/pos/t2171.flags b/test/files/pos/t2171.flags deleted file mode 100644 index eb4d19bcb9..0000000000 --- a/test/files/pos/t2171.flags +++ /dev/null @@ -1 +0,0 @@ --optimise
\ No newline at end of file diff --git a/test/files/pos/t2171.scala b/test/files/pos/t2171.scala deleted file mode 100644 index 6c754c76a6..0000000000 --- a/test/files/pos/t2171.scala +++ /dev/null @@ -1,7 +0,0 @@ -final object test { - def logIgnoredException(msg: => String) = - try 0 catch { case ex => println(msg) } - - def main (args: Array[String]): Unit = - while (true) logIgnoredException ("...") -} diff --git a/test/files/pos/t3234.flags b/test/files/pos/t3234.flags new file mode 100644 index 0000000000..13878e00a9 --- /dev/null +++ b/test/files/pos/t3234.flags @@ -0,0 +1 @@ +-Yopt:l:project -Yopt-warnings -Xfatal-warnings diff --git a/test/files/neg/t3234.scala b/test/files/pos/t3234.scala index 1553f1fa05..8c588e5aa9 100644 --- a/test/files/neg/t3234.scala +++ b/test/files/pos/t3234.scala @@ -1,19 +1,17 @@ trait Trait1 { - // need more work before this one works - // @inline - def foo2(n: Int) = n*n + @inline final def foo2(n: Int) = n*n } trait Trait2 { - @inline def foo3(n: Int) = 1 + @inline final def foo3(n: Int) = 1 } class Base extends Trait1 { - @inline def foo(n: Int) = n + @inline final def foo(n: Int) = n } object Test extends Base with Trait2 { def main(args: Array[String]) = { println(foo(42) + foo2(11) + foo3(2)) } -}
\ No newline at end of file +} diff --git a/test/files/pos/t3252.flags b/test/files/pos/t3252.flags deleted file mode 100644 index eb4d19bcb9..0000000000 --- a/test/files/pos/t3252.flags +++ /dev/null @@ -1 +0,0 @@ --optimise
\ No newline at end of file diff --git a/test/files/pos/t3252.scala b/test/files/pos/t3252.scala deleted file mode 100644 index 3ecc1e7cef..0000000000 --- a/test/files/pos/t3252.scala +++ /dev/null @@ -1,15 +0,0 @@ -class A { - def f(x : Boolean) : Thread = { - g { - x match { - case false => - B.h { } - } - } - } - - private def g[T](block : => T) = sys.error("") -} -object B { - def h(block : => Unit) : Nothing = sys.error("") -} diff --git a/test/files/pos/t3420.flags b/test/files/pos/t3420.flags index d37e817882..397969bb1d 100644 --- a/test/files/pos/t3420.flags +++ b/test/files/pos/t3420.flags @@ -1 +1 @@ --optimise -Xfatal-warnings +-Yopt-warnings -Yopt:l:classpath -Xfatal-warnings
\ No newline at end of file diff --git a/test/files/pos/t3430.flags b/test/files/pos/t3430.flags deleted file mode 100644 index eb4d19bcb9..0000000000 --- a/test/files/pos/t3430.flags +++ /dev/null @@ -1 +0,0 @@ --optimise
\ No newline at end of file diff --git a/test/files/pos/t3430.scala b/test/files/pos/t3430.scala deleted file mode 100644 index 3129c6276a..0000000000 --- a/test/files/pos/t3430.scala +++ /dev/null @@ -1,13 +0,0 @@ -// package com.example - -object A { - def f1(f: String => Boolean) = f("a") - - def f2(): Boolean = - f1 { s1 => - f1 { s2 => - while (true) { } - true - } - } -}
\ No newline at end of file diff --git a/test/files/pos/t4365/a_1.scala b/test/files/pos/t4365/a_1.scala index a24b57772d..e7466e0d48 100644 --- a/test/files/pos/t4365/a_1.scala +++ b/test/files/pos/t4365/a_1.scala @@ -9,7 +9,7 @@ trait SeqViewLike[+A, trait Transformed[+B] extends super[GenSeqViewLike].Transformed[B] abstract class AbstractTransformed[+B] extends Seq[B] with Transformed[B] { - def underlying: Coll = error("") + def underlying: Coll = sys.error("") } trait Reversed extends Transformed[A] with super[GenSeqViewLike].Reversed diff --git a/test/files/pos/t4365/b_1.scala b/test/files/pos/t4365/b_1.scala index e1423813f1..1158db6c32 100644 --- a/test/files/pos/t4365/b_1.scala +++ b/test/files/pos/t4365/b_1.scala @@ -10,7 +10,7 @@ self => trait Transformed[+B] { def length: Int = 0 - def apply(idx: Int): B = error("") + def apply(idx: Int): B = sys.error("") } trait Reversed extends Transformed[A] { diff --git a/test/files/pos/t4579.flags b/test/files/pos/t4579.flags deleted file mode 100644 index 1182725e86..0000000000 --- a/test/files/pos/t4579.flags +++ /dev/null @@ -1 +0,0 @@ --optimize
\ No newline at end of file diff --git a/test/files/pos/t4840.flags b/test/files/pos/t4840.flags index eb4d19bcb9..422d6be431 100644 --- a/test/files/pos/t4840.flags +++ b/test/files/pos/t4840.flags @@ -1 +1 @@ --optimise
\ No newline at end of file +-Yopt:l:classpath
\ No newline at end of file diff --git a/test/files/neg/t5148.scala b/test/files/pos/t5148.scala index fca64e57df..fca64e57df 100644 --- a/test/files/neg/t5148.scala +++ b/test/files/pos/t5148.scala diff --git a/test/files/pos/t533.scala b/test/files/pos/t533.scala deleted file mode 100644 index 0a6515fed3..0000000000 --- a/test/files/pos/t533.scala +++ /dev/null @@ -1,11 +0,0 @@ -import scala.actors._ - -object test extends Actor { - def act() { - receive { - case TIMEOUT => Console.println("TIMEOUT") - //case _ => Console.println("_") - } - } -} - diff --git a/test/files/pos/t5644/BoxesRunTime.java b/test/files/pos/t5644/BoxesRunTime.java index 74c4c6b4b9..2b931519aa 100644 --- a/test/files/pos/t5644/BoxesRunTime.java +++ b/test/files/pos/t5644/BoxesRunTime.java @@ -267,10 +267,6 @@ public final class BoxesRunTime else if (n instanceof java.lang.Float) return hashFromFloat((java.lang.Float)n); else return n.hashCode(); } - public static int hashFromObject(Object a) { - if (a instanceof Number) return hashFromNumber((Number)a); - else return a.hashCode(); - } private static int unboxCharOrInt(Object arg1, int code) { if (code == CHAR) diff --git a/test/files/pos/t5899.scala b/test/files/pos/t5899.scala index b16f1f84fe..885baca790 100644 --- a/test/files/pos/t5899.scala +++ b/test/files/pos/t5899.scala @@ -14,6 +14,7 @@ trait Foo { Bippy(Stable) match { case Bippy(nme.WILDCARD) => 1 case Bippy(Stable) => 2 // should not be considered unreachable + case Bippy(_) => 3 } } }
\ No newline at end of file diff --git a/test/files/pos/t6157.flags b/test/files/pos/t6157.flags deleted file mode 100644 index 0ebca3e7af..0000000000 --- a/test/files/pos/t6157.flags +++ /dev/null @@ -1 +0,0 @@ - -optimize diff --git a/test/files/pos/t6157.scala b/test/files/pos/t6157.scala deleted file mode 100644 index 7463989b14..0000000000 --- a/test/files/pos/t6157.scala +++ /dev/null @@ -1,25 +0,0 @@ -// SI-6157 - Compiler crash on inlined function and -optimize option - -object Test { - def main(args: Array[String]) { - Console.println( - ErrorHandler.defaultIfIOException("String")("String") - ) - } -} - -import java.io.IOException - -object ErrorHandler { - - @inline - def defaultIfIOException[T](default: => T)(closure: => T): T = { - try { - closure - } catch { - case e: IOException => - default - } - } -} - diff --git a/test/files/pos/t6547.flags b/test/files/pos/t6547.flags deleted file mode 100644 index c9b68d70dc..0000000000 --- a/test/files/pos/t6547.flags +++ /dev/null @@ -1 +0,0 @@ --optimise diff --git a/test/files/pos/t6547.scala b/test/files/pos/t6547.scala deleted file mode 100644 index 53bd798219..0000000000 --- a/test/files/pos/t6547.scala +++ /dev/null @@ -1,6 +0,0 @@ -trait ConfigurableDefault[@specialized V] { - def fillArray(arr: Array[V], v: V) = (arr: Any) match { - case x: Array[Int] => null - case x: Array[Long] => v.asInstanceOf[Long] - } -} diff --git a/test/files/pos/t6778.scala b/test/files/pos/t6778.scala new file mode 100644 index 0000000000..b7483c8fce --- /dev/null +++ b/test/files/pos/t6778.scala @@ -0,0 +1,5 @@ +object test extends AnyRef with App { + // Check that random can be called with parenthesis. + scala.math.random() +} + diff --git a/test/files/pos/t7784.scala b/test/files/pos/t7784.scala new file mode 100644 index 0000000000..e6824a4203 --- /dev/null +++ b/test/files/pos/t7784.scala @@ -0,0 +1,13 @@ +object Test { + final val a = "" + var b: a.type = a + b = a + + final val x = classOf[Object] + var y: x.type = x + y = x + + final val e = Thread.State.NEW + var e1: e.type = e + e1 = e +} diff --git a/test/files/pos/t8062.flags b/test/files/pos/t8062.flags deleted file mode 100644 index 49d036a887..0000000000 --- a/test/files/pos/t8062.flags +++ /dev/null @@ -1 +0,0 @@ --optimize diff --git a/test/files/pos/t8062/A_1.scala b/test/files/pos/t8062/A_1.scala deleted file mode 100644 index ca0411dae8..0000000000 --- a/test/files/pos/t8062/A_1.scala +++ /dev/null @@ -1,5 +0,0 @@ -package warmup - -object Warmup { - def filter[A](p: Any => Boolean): Any = filter[Any](p) -} diff --git a/test/files/pos/t8062/B_2.scala b/test/files/pos/t8062/B_2.scala deleted file mode 100644 index f0a6761488..0000000000 --- a/test/files/pos/t8062/B_2.scala +++ /dev/null @@ -1,3 +0,0 @@ -object Test { - warmup.Warmup.filter[Any](x => false) -} diff --git a/test/files/pos/t8306.flags b/test/files/pos/t8306.flags deleted file mode 100644 index 49d036a887..0000000000 --- a/test/files/pos/t8306.flags +++ /dev/null @@ -1 +0,0 @@ --optimize diff --git a/test/files/pos/t8306.scala b/test/files/pos/t8306.scala deleted file mode 100644 index e04b054eb9..0000000000 --- a/test/files/pos/t8306.scala +++ /dev/null @@ -1,8 +0,0 @@ -class Si8306 { - def foo: Int = 123 - lazy val extension: Int = - foo match { - case idx if idx != -1 => 15 - case _ => 17 - } -} diff --git a/test/files/pos/t8310.flags b/test/files/pos/t8310.flags deleted file mode 100644 index 48fd867160..0000000000 --- a/test/files/pos/t8310.flags +++ /dev/null @@ -1 +0,0 @@ --Xexperimental diff --git a/test/files/pos/t8315.flags b/test/files/pos/t8315.flags deleted file mode 100644 index c926ad6493..0000000000 --- a/test/files/pos/t8315.flags +++ /dev/null @@ -1 +0,0 @@ --Yinline -Ydead-code diff --git a/test/files/pos/t8315.scala b/test/files/pos/t8315.scala deleted file mode 100644 index 2f7742ed67..0000000000 --- a/test/files/pos/t8315.scala +++ /dev/null @@ -1,12 +0,0 @@ -object Test { - def crash(as: Listt): Unit = { - map(as, (_: Any) => return) - } - - final def map(x: Listt, f: Any => Any): Any = { - if (x eq Nill) "" else f("") - } -} - -object Nill extends Listt -class Listt diff --git a/test/files/pos/t8315b.flags b/test/files/pos/t8315b.flags deleted file mode 100644 index c926ad6493..0000000000 --- a/test/files/pos/t8315b.flags +++ /dev/null @@ -1 +0,0 @@ --Yinline -Ydead-code diff --git a/test/files/pos/t8315b.scala b/test/files/pos/t8315b.scala deleted file mode 100644 index d7a2bf565f..0000000000 --- a/test/files/pos/t8315b.scala +++ /dev/null @@ -1,11 +0,0 @@ -object Test extends Object { - def crash: Unit = { - val key = "" - try map(new F(key)) - catch { case _: Throwable => } - }; - final def map(f: F): Any = f.apply(""); -}; -final class F(key: String) { - final def apply(a: Any): Any = throw new RuntimeException(key); -} diff --git a/test/files/pos/t8359-closelim-crash.flags b/test/files/pos/t8359-closelim-crash.flags deleted file mode 100644 index 49d036a887..0000000000 --- a/test/files/pos/t8359-closelim-crash.flags +++ /dev/null @@ -1 +0,0 @@ --optimize diff --git a/test/files/pos/t8359-closelim-crash.scala b/test/files/pos/t8359-closelim-crash.scala deleted file mode 100644 index 1413694d10..0000000000 --- a/test/files/pos/t8359-closelim-crash.scala +++ /dev/null @@ -1,23 +0,0 @@ -package test - -// This is a minimization of code that crashed the compiler during bootstrapping -// in the first iteration of https://github.com/scala/scala/pull/4373, the PR -// that adjusted the order of free and declared params in LambdaLift. - -// Was: -// java.lang.AssertionError: assertion failed: -// Record Record(<$anon: Function1>,Map(value a$1 -> Deref(LocalVar(value b)))) does not contain a field value b$1 -// at scala.tools.nsc.Global.assert(Global.scala:262) -// at scala.tools.nsc.backend.icode.analysis.CopyPropagation$copyLattice$State.getFieldNonRecordValue(CopyPropagation.scala:113) -// at scala.tools.nsc.backend.icode.analysis.CopyPropagation$copyLattice$State.getFieldNonRecordValue(CopyPropagation.scala:122) -// at scala.tools.nsc.backend.opt.ClosureElimination$ClosureElim$$anonfun$analyzeMethod$1$$anonfun$apply$2.replaceFieldAccess$1(ClosureElimination.scala:124) -class Typer { - def bar(a: Boolean, b: Boolean): Unit = { - @inline - def baz(): Unit = { - ((_: Any) => (Typer.this, a, b)).apply("") - } - ((_: Any) => baz()).apply("") - } -} - diff --git a/test/files/pos/t8410.flags b/test/files/pos/t8410.flags index dcd5943c2f..c3065096cf 100644 --- a/test/files/pos/t8410.flags +++ b/test/files/pos/t8410.flags @@ -1 +1 @@ --optimise -Xfatal-warnings -deprecation:false -Yinline-warnings:false +-Yopt:l:project -Xfatal-warnings -deprecation:false -Yopt-warnings:none diff --git a/test/files/pos/t8429.scala b/test/files/pos/t8429.scala new file mode 100644 index 0000000000..a2d32637e1 --- /dev/null +++ b/test/files/pos/t8429.scala @@ -0,0 +1,7 @@ +trait Must { def musta(str: String, i: Int): Unit } + +object Mustare { + def takesM(m: Must) = ??? + takesM{ (a, b) => println } // ok + takesM{ case (a: String, b: Int) => println("") } // should also be accepted +} diff --git a/test/files/pos/t8462.scala b/test/files/pos/t8462.scala new file mode 100644 index 0000000000..6946cf8e5e --- /dev/null +++ b/test/files/pos/t8462.scala @@ -0,0 +1,11 @@ + +trait ConstantOps { + def exprs = ( + 1 << 2L : Int, // was: error: type mismatch; found : Long(4L) + 64 >> 2L : Int, // was: error: type mismatch; found : Long(4L) + 64 >>> 2L : Int, // was: error: type mismatch; found : Long(4L) + 'a' << 2L : Int, + 'a' >> 2L : Int, + 'a'>>> 2L : Int + ) +} diff --git a/test/files/pos/t8862a.scala b/test/files/pos/t8862a.scala new file mode 100644 index 0000000000..f9576707ba --- /dev/null +++ b/test/files/pos/t8862a.scala @@ -0,0 +1,47 @@ +package p { + + abstract class C[A] { + def x: A + implicit def oops: A = x + implicit def oopso: Option[A] = None + } + + package q { + + class Oops + + object `package` extends C[Oops] { + override def x = new Oops + } + + object Blah { + oops + oopso + + // implicits found in enclosing context + implicitly[Oops] + implicitly[Option[Oops]] + } + } +} + +package other { + + object Blah { + // implicits found through this import + import p.q._ + + oops + oopso + + implicitly[Oops] + implicitly[Option[Oops]] + } + + + object Blee { + // implicits found through the companion implicits + implicitly[p.q.Oops] + implicitly[Option[p.q.Oops]] + } +} diff --git a/test/files/pos/t8862b.scala b/test/files/pos/t8862b.scala new file mode 100644 index 0000000000..8be7fb5fab --- /dev/null +++ b/test/files/pos/t8862b.scala @@ -0,0 +1,12 @@ +package p { + trait T[X] { def O : { def apply(): X } } + object `package` extends T[Int] { + def O: { def apply(): Int } = new { def apply(): Int = 42 } + } + + object Test { + def main(args: Array[String]): Unit = { + val x: Int = O() + } + } +} diff --git a/test/files/pos/t9074.scala b/test/files/pos/t9074.scala new file mode 100644 index 0000000000..67db281f54 --- /dev/null +++ b/test/files/pos/t9074.scala @@ -0,0 +1,24 @@ +package blam { + + package foo { + + trait F[T] { + def f(d: Double, t: T): T = ??? + def f(d: Int, t: T): T = ??? + def f(d: String, t: T): T = ??? + + def g[A](a: T): T = ??? + def g(a: Int) = ??? + } + } + + package object foo extends foo.F[Double] { + override def f(d: Double, t: Double): Double = ??? + } +} + +object Test { + import blam._ + foo.f("3", 4.0) + foo.g[Any](1d) : Double +} diff --git a/test/files/pos/t9074b.scala b/test/files/pos/t9074b.scala new file mode 100644 index 0000000000..dadcebf399 --- /dev/null +++ b/test/files/pos/t9074b.scala @@ -0,0 +1,15 @@ +trait Echo [T] { + def echo(t: T): Unit +} + +trait IntEcho extends Echo[Int] { + def echo(t: Int) = println(t) +} + +object echo extends IntEcho +package object echo1 extends IntEcho + +object App extends App { + echo.echo(1) + echo1.echo(1) +} diff --git a/test/files/pos/t9111-inliner-workaround.flags b/test/files/pos/t9111-inliner-workaround.flags index 63b5558cfd..422d6be431 100644 --- a/test/files/pos/t9111-inliner-workaround.flags +++ b/test/files/pos/t9111-inliner-workaround.flags @@ -1 +1 @@ --Ybackend:GenBCode -Yopt:l:classpath
\ No newline at end of file +-Yopt:l:classpath
\ No newline at end of file diff --git a/test/files/pos/t9123.flags b/test/files/pos/t9123.flags deleted file mode 100644 index c16e2f71dc..0000000000 --- a/test/files/pos/t9123.flags +++ /dev/null @@ -1 +0,0 @@ --optimize -Ydelambdafy:method diff --git a/test/files/pos/t9123.scala b/test/files/pos/t9123.scala deleted file mode 100644 index 22d55b4351..0000000000 --- a/test/files/pos/t9123.scala +++ /dev/null @@ -1,10 +0,0 @@ -trait Setting { - type T - def value: T -} - -object Test { - def test(x: Some[Setting]) = x match { - case Some(dep) => Some(dep.value) map (_ => true) - } -} diff --git a/test/files/pos/t9131.scala b/test/files/pos/t9131.scala new file mode 100644 index 0000000000..1a186a0a24 --- /dev/null +++ b/test/files/pos/t9131.scala @@ -0,0 +1,12 @@ +class Test { + + def byNameFunc(f: (=> (() => Any)) => Any): Unit = () + + def test = { + // "value apply is not a member of => () => Any" + byNameFunc(z => z()) + // okay + byNameFunc(z => z.apply()) + byNameFunc(z => {val f = z; f()}) + } +} diff --git a/test/files/pos/t9178.flags b/test/files/pos/t9178.flags new file mode 100644 index 0000000000..7de3c0f3ee --- /dev/null +++ b/test/files/pos/t9178.flags @@ -0,0 +1 @@ +-Xfatal-warnings -deprecation diff --git a/test/files/pos/t9178.scala b/test/files/pos/t9178.scala new file mode 100644 index 0000000000..f2cf20a778 --- /dev/null +++ b/test/files/pos/t9178.scala @@ -0,0 +1,13 @@ +// eta expansion to Function0 is problematic (as shown here). +// Perhaps we should we deprecate it? See discussion in the comments of +// on SI-9178. +// +// This test encodes the status quo: no deprecation. +object Test { + def foo(): () => String = () => "" + val f: () => Any = foo + + def main(args: Array[String]): Unit = { + println(f()) // <function0> + } +} diff --git a/test/files/neg/sammy_restrictions.flags b/test/files/pos/t9178b.flags index 48fd867160..48fd867160 100644 --- a/test/files/neg/sammy_restrictions.flags +++ b/test/files/pos/t9178b.flags diff --git a/test/files/pos/t9178b.scala b/test/files/pos/t9178b.scala new file mode 100644 index 0000000000..cbeaed4f17 --- /dev/null +++ b/test/files/pos/t9178b.scala @@ -0,0 +1,7 @@ +abstract class Test{ + val writeInput: java.io.OutputStream => Unit + def getOutputStream(): java.io.OutputStream + + writeInput(getOutputStream) +} + diff --git a/test/files/pos/t9326a.scala b/test/files/pos/t9326a.scala new file mode 100644 index 0000000000..aefc735585 --- /dev/null +++ b/test/files/pos/t9326a.scala @@ -0,0 +1,6 @@ +package p + +trait M[A] + +class C extends M[Tuple1[X] forSome { type X }] + diff --git a/test/files/pos/t9399.flags b/test/files/pos/t9399.flags new file mode 100644 index 0000000000..85d8eb2ba2 --- /dev/null +++ b/test/files/pos/t9399.flags @@ -0,0 +1 @@ +-Xfatal-warnings diff --git a/test/files/pos/t9399.scala b/test/files/pos/t9399.scala new file mode 100644 index 0000000000..e8a8720f94 --- /dev/null +++ b/test/files/pos/t9399.scala @@ -0,0 +1,17 @@ +sealed abstract class TA +sealed abstract class TB extends TA +case object A extends TA +case object B extends TB + +sealed trait C +case class CTA(id: Int, da: TA) extends C +case class CTB(id: Int, da: TB) extends C + +class Test { + def test(c: C): Unit = c match { + case CTA(_, A) => + case CTA(_, B) => + case CTB(_, B) => + } +} + diff --git a/test/files/pos/t9411a.flags b/test/files/pos/t9411a.flags new file mode 100644 index 0000000000..85d8eb2ba2 --- /dev/null +++ b/test/files/pos/t9411a.flags @@ -0,0 +1 @@ +-Xfatal-warnings diff --git a/test/files/pos/t9411a.scala b/test/files/pos/t9411a.scala new file mode 100644 index 0000000000..d5264663ec --- /dev/null +++ b/test/files/pos/t9411a.scala @@ -0,0 +1,27 @@ +object OhNoes { + + sealed trait F + sealed abstract class FA extends F + sealed abstract class FB extends F + + case object FA1 extends FA + case object FB1 extends FB + case object FB2 extends FB + + sealed trait G + case object G1 extends G + case object G2 extends G + + sealed trait H + case class H1(a: FB, b: G) extends H + case class H2(a: F) extends H + + val demo: H => Unit = { + case H1(FB1, G1) => + case H1(FB2, G2) => + case H2(_: FB) => + case H2(_: FA) => + case H1(FB1, G2) => + case H1(FB2, G1) => + } +} diff --git a/test/files/pos/t9411b.flags b/test/files/pos/t9411b.flags new file mode 100644 index 0000000000..85d8eb2ba2 --- /dev/null +++ b/test/files/pos/t9411b.flags @@ -0,0 +1 @@ +-Xfatal-warnings diff --git a/test/files/pos/t9411b.scala b/test/files/pos/t9411b.scala new file mode 100644 index 0000000000..6888ba9382 --- /dev/null +++ b/test/files/pos/t9411b.scala @@ -0,0 +1,36 @@ +object OhNoes { + + sealed trait F + sealed abstract class FA extends F + sealed abstract class FB extends F + + case object FA1 extends FA + case object FB1 extends FB + case object FB2 extends FB + + sealed trait G + case object G1 extends G + case object G2 extends G + + sealed trait H + case class H1(a: FB, b: G) extends H + case class H2(b: F) extends H + + val demo: H => Unit = { + case H1(FB1, G1) => + case H1(FB2, G2) => + case H2(_: FB) => + case H2(_: FA) => + case H1(FB1, G2) => + case H1(FB2, G1) => + } + + val demo2: H => Unit = { + case H2(_: FA) => + case H2(_: FB) => + case H1(FB1, G1) => + case H1(FB2, G1) => + case H1(FB1, G2) => + case H1(FB2, G2) => + } +} diff --git a/test/files/pos/t9449.scala b/test/files/pos/t9449.scala new file mode 100644 index 0000000000..3b86dc80a0 --- /dev/null +++ b/test/files/pos/t9449.scala @@ -0,0 +1,19 @@ +trait II { + def apply(x: Int): Int +} + +object Test { + def ii(x: Int): Int = x + def test = { + val ii1: II = x => ii(x) // works + val ii2: II = ii // works (adapting `ii` to `II`) + val ii3: II = ii _ // works (failed before the fix) + // typedTyped({ii : (() => <empty>)}) + // typedEta(ii, pt = II) + // adapt(ii, pt = (? => ?)) + // instantiatedToMethodType(ii, pt = (? => ?)) + // val ii3: II = ii _ // error: + // found : Int => Int + // required: II + } +}
\ No newline at end of file diff --git a/test/files/pos/t9479.scala b/test/files/pos/t9479.scala new file mode 100644 index 0000000000..38eabf4338 --- /dev/null +++ b/test/files/pos/t9479.scala @@ -0,0 +1,15 @@ +trait Predefs { + def bridge(p: String): Unit = ??? + def bridge(p: Any): Unit = ??? +} + +package object molecule extends Predefs + +package molecule { + package process { + class Test { + def main(): Unit = bridge(null, null) + } + } +} + diff --git a/test/files/pos/t9479b.scala b/test/files/pos/t9479b.scala new file mode 100644 index 0000000000..5fc795a1fd --- /dev/null +++ b/test/files/pos/t9479b.scala @@ -0,0 +1,15 @@ +trait Predefs { + def bridge(p: String): Unit = ??? + def bridge(p: Any): Unit = ??? +} + +package object molecule extends Predefs + +package molecule { + package process { + class Test { + def main(): Unit = molecule.bridge(null, null) + } + } +} + diff --git a/test/files/pos/t9498.scala b/test/files/pos/t9498.scala new file mode 100644 index 0000000000..32fc01a806 --- /dev/null +++ b/test/files/pos/t9498.scala @@ -0,0 +1,25 @@ +trait Inv[A] { def head: A } +trait Cov[+A] { def head: A } + +class Test { + def inv(i: Inv[Inv[String]]) = i match { + case l: Inv[a] => + val x: a = l.head + x.head: String // okay + } + + def cov(c: Cov[Cov[String]]) = c match { + case l: Cov[a] => + val x: a = l.head + x.head: String // was: found A, required String + } + + def cov1(c: Cov[Cov[String]]) = c match { + case l: Cov[a] => l.head.head + } + cov1(null): String // was: found A, required String + + def cov3(c: Cov[Cov[String]]): String = c match { + case l: Cov[a] => val l1: l.type = l; l1.head.head + } +} diff --git a/test/files/pos/t9542.scala b/test/files/pos/t9542.scala new file mode 100644 index 0000000000..d65f7ac4c6 --- /dev/null +++ b/test/files/pos/t9542.scala @@ -0,0 +1,8 @@ +object O { + trait T + + class VC(val self: Any) extends AnyVal { + def extMethod(f: F1[T, Any]) = () + } +} +trait F1[A, B] diff --git a/test/files/pos/t9630.flags b/test/files/pos/t9630.flags new file mode 100644 index 0000000000..85d8eb2ba2 --- /dev/null +++ b/test/files/pos/t9630.flags @@ -0,0 +1 @@ +-Xfatal-warnings diff --git a/test/files/pos/t9630/t9630a.scala b/test/files/pos/t9630/t9630a.scala new file mode 100644 index 0000000000..c76ecd2ff2 --- /dev/null +++ b/test/files/pos/t9630/t9630a.scala @@ -0,0 +1,9 @@ + +sealed trait Base +final case class Base_1(sameName: Some[Any]) extends Base +final case class Base_2(sameName: Nested) extends Base + +sealed trait Nested +final case class Nested_1(x: Any) extends Nested +final case class Nested_2(y: Any) extends Nested + diff --git a/test/files/pos/t9630/t9630b.scala b/test/files/pos/t9630/t9630b.scala new file mode 100644 index 0000000000..3e1787ec52 --- /dev/null +++ b/test/files/pos/t9630/t9630b.scala @@ -0,0 +1,8 @@ + +class Test { + def test(b: Base): Unit = b match { + case Base_1(Some(_)) => + case Base_2(Nested_1(_)) => + case Base_2(Nested_2(_)) => + } +} diff --git a/test/files/pos/t9658.scala b/test/files/pos/t9658.scala new file mode 100644 index 0000000000..a2c695a8ae --- /dev/null +++ b/test/files/pos/t9658.scala @@ -0,0 +1,10 @@ +sealed trait G[T] +case object GI extends G[Int] + +class C { + def typerFail[T](rt: G[T]): T = rt match { + case GI => + { case x => x } : PartialFunction[Any, Any] // comment this line, compiles. + 0 // found Int, required T + } +} diff --git a/test/files/pos/trait-force-info.flags b/test/files/pos/trait-force-info.flags deleted file mode 100644 index eb4d19bcb9..0000000000 --- a/test/files/pos/trait-force-info.flags +++ /dev/null @@ -1 +0,0 @@ --optimise
\ No newline at end of file diff --git a/test/files/pos/trait-force-info.scala b/test/files/pos/trait-force-info.scala deleted file mode 100644 index c2b33869c3..0000000000 --- a/test/files/pos/trait-force-info.scala +++ /dev/null @@ -1,18 +0,0 @@ -/** This does NOT crash unless it's in the interactive package. - */ - -package scala.tools.nsc -package interactive - -trait MyContextTrees { - val self: Global - val NoContext = self.analyzer.NoContext -} -// -// error: java.lang.AssertionError: assertion failed: trait Contexts.NoContext$ linkedModule: <none>List() -// at scala.Predef$.assert(Predef.scala:160) -// at scala.tools.nsc.symtab.classfile.ClassfileParser$innerClasses$.innerSymbol$1(ClassfileParser.scala:1211) -// at scala.tools.nsc.symtab.classfile.ClassfileParser$innerClasses$.classSymbol(ClassfileParser.scala:1223) -// at scala.tools.nsc.symtab.classfile.ClassfileParser.classNameToSymbol(ClassfileParser.scala:489) -// at scala.tools.nsc.symtab.classfile.ClassfileParser.sig2type$1(ClassfileParser.scala:757) -// at scala.tools.nsc.symtab.classfile.ClassfileParser.sig2type$1(ClassfileParser.scala:789) diff --git a/test/files/pos/virtpatmat_exist1.scala b/test/files/pos/virtpatmat_exist1.scala index 6cad017b0b..1f24892489 100644 --- a/test/files/pos/virtpatmat_exist1.scala +++ b/test/files/pos/virtpatmat_exist1.scala @@ -1,5 +1,6 @@ import annotation.unchecked.{ uncheckedVariance=> uV } -import scala.collection.immutable.{ListMap, HashMap, ListSet, HashSet} +import scala.collection.immutable.{ListMap, ListSet} +import scala.collection.mutable.{HashMap, HashSet} object Test { class HashMapCollision1[A, +B](var hash: Int, var kvs: ListMap[A, B @uV]) extends HashMap[A, B @uV] diff --git a/test/files/presentation/random.check b/test/files/presentation/random.check index fb3500aeea..1e40e178be 100644 --- a/test/files/presentation/random.check +++ b/test/files/presentation/random.check @@ -4,7 +4,7 @@ askType at Random.scala(18,14) ================================================================================ [response] askTypeAt (18,14) val filter: Int => Boolean = try { - java.this.lang.Integer.parseInt(args.apply(0)) match { + java.lang.Integer.parseInt(args.apply(0)) match { case 1 => ((x: Int) => x.%(2).!=(0)) case 2 => ((x: Int) => x.%(2).==(0)) case _ => ((x: Int) => x.!=(0)) diff --git a/test/files/presentation/scope-completion-3/src/Completions.scala b/test/files/presentation/scope-completion-3/src/Completions.scala index 18cef1cefa..8d79adc669 100644 --- a/test/files/presentation/scope-completion-3/src/Completions.scala +++ b/test/files/presentation/scope-completion-3/src/Completions.scala @@ -1,6 +1,6 @@ package test -/* check availability of members defined locally and in hierachy */ +/* check availability of members defined locally and in hierarchy */ abstract class Base1 { diff --git a/test/files/presentation/t8941.check b/test/files/presentation/t8941.check index 341804903a..4285eebd8f 100644 --- a/test/files/presentation/t8941.check +++ b/test/files/presentation/t8941.check @@ -3,5 +3,5 @@ reload: Source.scala askType at Source.scala(6,7) ================================================================================ [response] askTypeAt (6,7) -scala.this.Predef.??? +scala.Predef.??? ================================================================================ diff --git a/test/files/run/Course-2002-07.scala b/test/files/run/Course-2002-07.scala index 2d9457653f..db6e1d8e04 100644 --- a/test/files/run/Course-2002-07.scala +++ b/test/files/run/Course-2002-07.scala @@ -485,7 +485,7 @@ object MB { import Utils._; - trait Expr { + sealed trait Expr { private def count: Int = this match { case Lit(n) => n diff --git a/test/files/run/analyzerPlugins.check b/test/files/run/analyzerPlugins.check index 9803465ddc..1bb7c6ceab 100644 --- a/test/files/run/analyzerPlugins.check +++ b/test/files/run/analyzerPlugins.check @@ -19,7 +19,7 @@ canAdaptAnnotations(Trees$Typed, Any) [1] canAdaptAnnotations(Trees$Typed, Int) [1] lub(List(Int @testAnn, Int)) [1] pluginsPt(?, Trees$Annotated) [7] -pluginsPt(?, Trees$Apply) [8] +pluginsPt(?, Trees$Apply) [11] pluginsPt(?, Trees$ApplyImplicitView) [2] pluginsPt(?, Trees$Assign) [7] pluginsPt(?, Trees$Block) [4] @@ -31,7 +31,7 @@ pluginsPt(?, Trees$Literal) [16] pluginsPt(?, Trees$New) [5] pluginsPt(?, Trees$PackageDef) [1] pluginsPt(?, Trees$Return) [1] -pluginsPt(?, Trees$Select) [47] +pluginsPt(?, Trees$Select) [50] pluginsPt(?, Trees$Super) [2] pluginsPt(?, Trees$This) [20] pluginsPt(?, Trees$TypeApply) [3] @@ -93,6 +93,7 @@ pluginsTypeSigAccessor(value x) [1] pluginsTypeSigAccessor(value y) [1] pluginsTypeSigAccessor(variable count) [2] pluginsTyped( <: Int, Trees$TypeBoundsTree) [2] +pluginsTyped(()Double, Trees$Select) [6] pluginsTyped(()Object, Trees$Select) [1] pluginsTyped(()String, Trees$Ident) [1] pluginsTyped(()String, Trees$TypeApply) [1] @@ -112,7 +113,7 @@ pluginsTyped(<notype>, Trees$PackageDef) [1] pluginsTyped(<notype>, Trees$TypeDef) [1] pluginsTyped(<notype>, Trees$ValDef) [21] pluginsTyped(=> Boolean @testAnn, Trees$Select) [1] -pluginsTyped(=> Double, Trees$Select) [4] +pluginsTyped(=> Double, Trees$Select) [1] pluginsTyped(=> Int, Trees$Select) [5] pluginsTyped(=> Int, Trees$TypeApply) [1] pluginsTyped(=> String @testAnn, Trees$Select) [1] @@ -131,6 +132,7 @@ pluginsTyped(Boolean(false), Trees$Literal) [2] pluginsTyped(Boolean, Trees$Apply) [1] pluginsTyped(Boolean, Trees$Select) [4] pluginsTyped(Char('c'), Trees$Literal) [2] +pluginsTyped(Double, Trees$Apply) [3] pluginsTyped(Double, Trees$Select) [6] pluginsTyped(Int @testAnn, Trees$TypeTree) [2] pluginsTyped(Int @testAnn, Trees$Typed) [2] diff --git a/test/files/run/bcodeInlinerMixed.flags b/test/files/run/bcodeInlinerMixed.flags index 63b5558cfd..422d6be431 100644 --- a/test/files/run/bcodeInlinerMixed.flags +++ b/test/files/run/bcodeInlinerMixed.flags @@ -1 +1 @@ --Ybackend:GenBCode -Yopt:l:classpath
\ No newline at end of file +-Yopt:l:classpath
\ No newline at end of file diff --git a/test/files/run/blame_eye_triple_eee-double.flags b/test/files/run/blame_eye_triple_eee-double.flags deleted file mode 100644 index c9b68d70dc..0000000000 --- a/test/files/run/blame_eye_triple_eee-double.flags +++ /dev/null @@ -1 +0,0 @@ --optimise diff --git a/test/files/run/blame_eye_triple_eee-float.flags b/test/files/run/blame_eye_triple_eee-float.flags deleted file mode 100644 index c9b68d70dc..0000000000 --- a/test/files/run/blame_eye_triple_eee-float.flags +++ /dev/null @@ -1 +0,0 @@ --optimise diff --git a/test/files/run/caseclasses.scala b/test/files/run/caseclasses.scala index 668c984f3d..10c0916dc0 100644 --- a/test/files/run/caseclasses.scala +++ b/test/files/run/caseclasses.scala @@ -18,7 +18,7 @@ object M { object Test extends App { def Abs(x: Int) = new Abs(x * 2){} - Abs(2) match { + (Abs(2): @unchecked) match { case Abs(4) => ; } diff --git a/test/files/run/classfile-format-51.scala b/test/files/run/classfile-format-51.scala index 81df2f08d9..3ef0640b84 100644 --- a/test/files/run/classfile-format-51.scala +++ b/test/files/run/classfile-format-51.scala @@ -1,6 +1,5 @@ import java.io.{File, FileOutputStream} -import scala.tools.nsc.settings.ScalaVersion import scala.tools.partest._ import scala.tools.asm import asm.{AnnotationVisitor, ClassWriter, FieldVisitor, Handle, MethodVisitor, Opcodes} @@ -17,7 +16,7 @@ import Opcodes._ // verify. So the test includes a version check that short-circuits the whole test // on JDK 6 object Test extends DirectTest { - override def extraSettings: String = "-optimise -usejavacp -d " + testOutput.path + " -cp " + testOutput.path + override def extraSettings: String = "-Yopt:l:classpath -usejavacp -d " + testOutput.path + " -cp " + testOutput.path def generateClass() { val invokerClassName = "DynamicInvoker" diff --git a/test/files/run/classfile-format-52.scala b/test/files/run/classfile-format-52.scala index 453f61ac84..ebd0826303 100644 --- a/test/files/run/classfile-format-52.scala +++ b/test/files/run/classfile-format-52.scala @@ -1,6 +1,5 @@ import java.io.{File, FileOutputStream} -import scala.tools.nsc.settings.ScalaVersion import scala.tools.partest._ import scala.tools.asm import asm.{AnnotationVisitor, ClassWriter, FieldVisitor, Handle, MethodVisitor, Opcodes} @@ -14,7 +13,7 @@ import Opcodes._ // By its nature the test can only work on JDK 8+ because under JDK 7- the // interface won't verify. object Test extends DirectTest { - override def extraSettings: String = "-optimise -usejavacp -d " + testOutput.path + " -cp " + testOutput.path + override def extraSettings: String = "-Yopt:l:classpath -usejavacp -d " + testOutput.path + " -cp " + testOutput.path def generateInterface() { val interfaceName = "HasDefaultMethod" diff --git a/test/files/run/concurrent-stream.check b/test/files/run/concurrent-stream.check deleted file mode 100644 index d4adf84490..0000000000 --- a/test/files/run/concurrent-stream.check +++ /dev/null @@ -1,3 +0,0 @@ -Testing standard cons. -Evaluation 0: List(0, 1, 2, 3, 4, 5, 6, 7, 8, 9) -Evaluation 1: List(0, 1, 2, 3, 4, 5, 6, 7, 8, 9) diff --git a/test/files/run/concurrent-stream.scala b/test/files/run/concurrent-stream.scala deleted file mode 100644 index 9d5ba0428e..0000000000 --- a/test/files/run/concurrent-stream.scala +++ /dev/null @@ -1,37 +0,0 @@ -// test concurrent calls to Stream.tail -@deprecated("Suppress warnings", since="2.11") -object Test { - - def slowRange(from: Int, until: Int, cons: (Int, => Stream[Int]) => Stream[Int]): Stream[Int] = { - var current = from - def next: Stream[Int] = { - Thread.sleep(100) - if (current >= until) Stream.empty - else { - val stream = cons(current, next) - current += 1 - stream - } - } - next - } - - def testCons(cons: (Int, => Stream[Int]) => Stream[Int]): Unit = { - import scala.actors.Actor._ - - val stream = slowRange(0, 10, cons) - val main = self - actor { main ! stream.toList } - actor { main ! stream.toList } - val eval0 = receive { case list: List[Int @unchecked] => list } - val eval1 = receive { case list: List[Int @unchecked] => list } - println("Evaluation 0: " + eval0) - println("Evaluation 1: " + eval1) - } - - def main(args: Array[String]) { - println("Testing standard cons.") - testCons(Stream.cons.apply(_, _)) - } -} - diff --git a/test/files/run/constant-optimization.flags b/test/files/run/constant-optimization.flags deleted file mode 100644 index c9b68d70dc..0000000000 --- a/test/files/run/constant-optimization.flags +++ /dev/null @@ -1 +0,0 @@ --optimise diff --git a/test/files/run/dead-code-elimination.flags b/test/files/run/dead-code-elimination.flags deleted file mode 100644 index 49d036a887..0000000000 --- a/test/files/run/dead-code-elimination.flags +++ /dev/null @@ -1 +0,0 @@ --optimize diff --git a/test/files/run/delambdafy-specialized.check b/test/files/run/delambdafy-specialized.check deleted file mode 100644 index c6903b9e29..0000000000 --- a/test/files/run/delambdafy-specialized.check +++ /dev/null @@ -1 +0,0 @@ -scala.runtime.AbstractFunction1$mcII$sp diff --git a/test/files/run/delambdafy-specialized.flags b/test/files/run/delambdafy-specialized.flags deleted file mode 100644 index 48b438ddf8..0000000000 --- a/test/files/run/delambdafy-specialized.flags +++ /dev/null @@ -1 +0,0 @@ --Ydelambdafy:method diff --git a/test/files/run/delambdafy-specialized.scala b/test/files/run/delambdafy-specialized.scala deleted file mode 100644 index 634d4e490b..0000000000 --- a/test/files/run/delambdafy-specialized.scala +++ /dev/null @@ -1,6 +0,0 @@ -object Test { - def main(args: Array[String]): Unit = { - val f = (x: Int) => -x - println(f.getClass.getSuperclass.getName) - } -} diff --git a/test/files/run/delambdafyLambdaClassNames.check b/test/files/run/delambdafyLambdaClassNames.check deleted file mode 100644 index d425d15dd0..0000000000 --- a/test/files/run/delambdafyLambdaClassNames.check +++ /dev/null @@ -1 +0,0 @@ -A$$nestedInAnon$1$lambda$$run$1 diff --git a/test/files/run/delambdafyLambdaClassNames.flags b/test/files/run/delambdafyLambdaClassNames.flags deleted file mode 100644 index b10233d322..0000000000 --- a/test/files/run/delambdafyLambdaClassNames.flags +++ /dev/null @@ -1 +0,0 @@ --Ybackend:GenBCode -Ydelambdafy:method
\ No newline at end of file diff --git a/test/files/run/delambdafyLambdaClassNames/A_1.scala b/test/files/run/delambdafyLambdaClassNames/A_1.scala deleted file mode 100644 index 10489414b7..0000000000 --- a/test/files/run/delambdafyLambdaClassNames/A_1.scala +++ /dev/null @@ -1,5 +0,0 @@ -class A { - def f = new Runnable { - def run(): Unit = List(1,2).foreach(println) - } -} diff --git a/test/files/run/delambdafyLambdaClassNames/Test.scala b/test/files/run/delambdafyLambdaClassNames/Test.scala deleted file mode 100644 index 49a397d1d2..0000000000 --- a/test/files/run/delambdafyLambdaClassNames/Test.scala +++ /dev/null @@ -1,4 +0,0 @@ -object Test extends App { - val c = Class.forName("A$$nestedInAnon$1$lambda$$run$1") - println(c.getName) -} diff --git a/test/files/run/delambdafy_t6028.check b/test/files/run/delambdafy_t6028.check index 419e7043a3..b90dea62ed 100644 --- a/test/files/run/delambdafy_t6028.check +++ b/test/files/run/delambdafy_t6028.check @@ -11,7 +11,7 @@ package <empty> { def foo(methodParam: String): Function0 = { val methodLocal: String = ""; { - (() => T.this.$anonfun$1(methodParam, methodLocal)).$asInstanceOf[Function0]() + (() => T.this.$anonfun$1(methodParam, methodLocal)) } }; def bar(barParam: String): Object = { @@ -21,51 +21,42 @@ package <empty> { def tryy(tryyParam: String): Function0 = { var tryyLocal: runtime.ObjectRef = scala.runtime.ObjectRef.create(""); { - (new <$anon: Function0>(T.this, tryyParam, tryyLocal): Function0) + (() => T.this.$anonfun$2(tryyParam, tryyLocal)) } }; final <artifact> private[this] def $anonfun$1(methodParam$1: String, methodLocal$1: String): String = T.this.classParam.+(T.this.field()).+(methodParam$1).+(methodLocal$1); abstract trait MethodLocalTrait$1 extends Object { + def /*MethodLocalTrait$1*/$init$(barParam$1: String): Unit = { + () + }; + scala.Predef.print(barParam$1); <synthetic> <stable> <artifact> def $outer(): T }; object MethodLocalObject$2 extends Object with T#MethodLocalTrait$1 { def <init>($outer: T, barParam$1: String): T#MethodLocalObject$2.type = { MethodLocalObject$2.super.<init>(); - MethodLocalObject$2.this.$asInstanceOf[T#MethodLocalTrait$1$class]()./*MethodLocalTrait$1$class*/$init$(barParam$1); + MethodLocalObject$2.super./*MethodLocalTrait$1*/$init$(barParam$1); () }; <synthetic> <paramaccessor> <artifact> private[this] val $outer: T = _; <synthetic> <stable> <artifact> def $outer(): T = MethodLocalObject$2.this.$outer; <synthetic> <stable> <artifact> def $outer(): T = MethodLocalObject$2.this.$outer }; - final <stable> private[this] def MethodLocalObject$1(barParam$1: String, MethodLocalObject$module$1: runtime.VolatileObjectRef): T#MethodLocalObject$2.type = { - MethodLocalObject$module$1.elem = new T#MethodLocalObject$2.type(T.this, barParam$1); + final <stable> private[this] def MethodLocalObject$lzycompute$1(barParam$1: String, MethodLocalObject$module$1: runtime.VolatileObjectRef): T#MethodLocalObject$2.type = { + T.this.synchronized({ + if (MethodLocalObject$module$1.elem.$asInstanceOf[T#MethodLocalObject$2.type]().eq(null)) + MethodLocalObject$module$1.elem = new T#MethodLocalObject$2.type(T.this, barParam$1); + scala.runtime.BoxedUnit.UNIT + }); MethodLocalObject$module$1.elem.$asInstanceOf[T#MethodLocalObject$2.type]() }; - abstract trait MethodLocalTrait$1$class extends Object with T#MethodLocalTrait$1 { - def /*MethodLocalTrait$1$class*/$init$(barParam$1: String): Unit = { - () - }; - scala.this.Predef.print(barParam$1) - }; - @SerialVersionUID(value = 0) final <synthetic> class $anonfun$tryy$1 extends scala.runtime.AbstractFunction0$mcV$sp with Serializable { - def <init>($outer: T, tryyParam$1: String, tryyLocal$1: runtime.ObjectRef): <$anon: Function0> = { - $anonfun$tryy$1.super.<init>(); - () - }; - final def apply(): Unit = $anonfun$tryy$1.this.apply$mcV$sp(); - <specialized> def apply$mcV$sp(): Unit = try { - $anonfun$tryy$1.this.tryyLocal$1.elem = $anonfun$tryy$1.this.tryyParam$1 - } finally (); - <synthetic> <paramaccessor> <artifact> private[this] val $outer: T = _; - <synthetic> <stable> <artifact> def $outer(): T = $anonfun$tryy$1.this.$outer; - final <bridge> <artifact> def apply(): Object = { - $anonfun$tryy$1.this.apply(); - scala.runtime.BoxedUnit.UNIT - }; - <synthetic> <paramaccessor> private[this] val tryyParam$1: String = _; - <synthetic> <paramaccessor> private[this] val tryyLocal$1: runtime.ObjectRef = _ - } + final <stable> private[this] def MethodLocalObject$1(barParam$1: String, MethodLocalObject$module$1: runtime.VolatileObjectRef): T#MethodLocalObject$2.type = if (MethodLocalObject$module$1.elem.$asInstanceOf[T#MethodLocalObject$2.type]().eq(null)) + T.this.MethodLocalObject$lzycompute$1(barParam$1, MethodLocalObject$module$1) + else + MethodLocalObject$module$1.elem.$asInstanceOf[T#MethodLocalObject$2.type](); + final <artifact> private[this] def $anonfun$2(tryyParam$1: String, tryyLocal$1: runtime.ObjectRef): Unit = try { + tryyLocal$1.elem = tryyParam$1 + } finally () } } diff --git a/test/files/run/duration-coarsest.scala b/test/files/run/duration-coarsest.scala index 51cb79287a..81fbb3cc84 100644 --- a/test/files/run/duration-coarsest.scala +++ b/test/files/run/duration-coarsest.scala @@ -25,4 +25,7 @@ object Test extends App { 23 hours, 40 days ) foreach (x => assert(x == x.toCoarsest, x)) -}
\ No newline at end of file + + // toCoarsest on a FiniteDuration should return a FiniteDuration + val finite: FiniteDuration = 1.second.toCoarsest +} diff --git a/test/files/run/elidable-opt.flags b/test/files/run/elidable-opt.flags index 62897ff218..93fd3d5317 100644 --- a/test/files/run/elidable-opt.flags +++ b/test/files/run/elidable-opt.flags @@ -1 +1 @@ --optimise -Xelide-below 900 +-Xelide-below 900 diff --git a/test/files/run/elidable-opt.scala b/test/files/run/elidable-opt.scala index a2f29d2caf..6a603084b7 100644 --- a/test/files/run/elidable-opt.scala +++ b/test/files/run/elidable-opt.scala @@ -80,6 +80,5 @@ object Test { Class.forName(className).getMethod(methodName) } } - Class.forName("T$class").getMethod("f3", classOf[T]) } } diff --git a/test/files/run/elidable.scala b/test/files/run/elidable.scala index a2f29d2caf..6a603084b7 100644 --- a/test/files/run/elidable.scala +++ b/test/files/run/elidable.scala @@ -80,6 +80,5 @@ object Test { Class.forName(className).getMethod(methodName) } } - Class.forName("T$class").getMethod("f3", classOf[T]) } } diff --git a/test/files/run/equality.scala b/test/files/run/equality.scala index ff59898821..2af73691d8 100644 --- a/test/files/run/equality.scala +++ b/test/files/run/equality.scala @@ -1,7 +1,7 @@ // a quickly assembled test of equality. Needs work. object Test { - import scala.runtime.ScalaRunTime.hash + def hash(x: Any): Int = x.## // forces upcast to Any def makeFromInt(x: Int) = List( x.toByte, x.toShort, x.toInt, x.toLong, x.toFloat, x.toDouble, BigInt(x), BigDecimal(x) diff --git a/test/files/run/finalvar.flags b/test/files/run/finalvar.flags index aee3039bec..a8c7600a03 100644 --- a/test/files/run/finalvar.flags +++ b/test/files/run/finalvar.flags @@ -1 +1 @@ --Yoverride-vars -Yinline
\ No newline at end of file +-Yoverride-vars -Yopt:l:project
\ No newline at end of file diff --git a/test/files/run/future-flatmap-exec-count.check b/test/files/run/future-flatmap-exec-count.check index dd9dce64ed..7065c133e0 100644 --- a/test/files/run/future-flatmap-exec-count.check +++ b/test/files/run/future-flatmap-exec-count.check @@ -1,3 +1,4 @@ +warning: there was one deprecation warning; re-run with -deprecation for details mapping execute() flatmapping diff --git a/test/files/run/hashCodeBoxesRunTime.scala b/test/files/run/hashCodeStatics.scala index ba1a30f5fb..bff62cce18 100644 --- a/test/files/run/hashCodeBoxesRunTime.scala +++ b/test/files/run/hashCodeStatics.scala @@ -1,23 +1,23 @@ -// This only tests direct access to the methods in BoxesRunTime, +// This only tests direct access to the methods in Statics, // not the whole scheme. object Test { import java.{ lang => jl } - import scala.runtime.BoxesRunTime.{ hashFromNumber, hashFromObject } + import scala.runtime.Statics.anyHash def allSame[T](xs: List[T]) = assert(xs.distinct.size == 1, "failed: " + xs) def mkNumbers(x: Int): List[Number] = List(x.toByte, x.toShort, x, x.toLong, x.toFloat, x.toDouble) - def testLDF(x: Long) = allSame(List[Number](x, x.toDouble, x.toFloat) map hashFromNumber) + def testLDF(x: Long) = allSame(List[Number](x, x.toDouble, x.toFloat) map anyHash) def main(args: Array[String]): Unit = { List(Byte.MinValue, -1, 0, 1, Byte.MaxValue) foreach { n => - val hashes = mkNumbers(n) map hashFromNumber + val hashes = mkNumbers(n) map anyHash allSame(hashes) if (n >= 0) { - val charCode = hashFromObject(n.toChar: Character) + val charCode = anyHash(n.toChar: Character) assert(charCode == hashes.head) } } diff --git a/test/files/run/icode-reader-dead-code.scala b/test/files/run/icode-reader-dead-code.scala index 00ba58829f..df31219dd5 100644 --- a/test/files/run/icode-reader-dead-code.scala +++ b/test/files/run/icode-reader-dead-code.scala @@ -36,7 +36,7 @@ object Test extends DirectTest { // If inlining fails, the compiler will issue an inliner warning that is not present in the // check file - compileString(newCompiler("-usejavacp", "-optimise"))(bCode) + compileString(newCompiler("-usejavacp", "-Yopt:l:classpath"))(bCode) } def readClass(file: String) = { diff --git a/test/files/run/idempotency-case-classes.check b/test/files/run/idempotency-case-classes.check index ea698cec59..38c2fb9326 100644 --- a/test/files/run/idempotency-case-classes.check +++ b/test/files/run/idempotency-case-classes.check @@ -20,15 +20,15 @@ C(2,3) case 1 => C.this.y case _ => throw new IndexOutOfBoundsException(x$1.toString()) }; - override <synthetic> def productIterator: Iterator[Any] = runtime.this.ScalaRunTime.typedProductIterator[Any](C.this); + override <synthetic> def productIterator: Iterator[Any] = scala.runtime.ScalaRunTime.typedProductIterator[Any](C.this); <synthetic> def canEqual(x$1: Any): Boolean = x$1.$isInstanceOf[C](); override <synthetic> def hashCode(): Int = { <synthetic> var acc: Int = -889275714; - acc = Statics.this.mix(acc, x); - acc = Statics.this.mix(acc, y); - Statics.this.finalizeHash(acc, 2) + acc = scala.runtime.Statics.mix(acc, x); + acc = scala.runtime.Statics.mix(acc, y); + scala.runtime.Statics.finalizeHash(acc, 2) }; - override <synthetic> def toString(): String = ScalaRunTime.this._toString(C.this); + override <synthetic> def toString(): String = scala.runtime.ScalaRunTime._toString(C.this); override <synthetic> def equals(x$1: Any): Boolean = C.this.eq(x$1.asInstanceOf[Object]).||(x$1 match { case (_: C) => true case _ => false @@ -45,7 +45,7 @@ C(2,3) final override <synthetic> def toString(): String = "C"; case <synthetic> def apply(x: Int, y: Int): C = new C(x, y); case <synthetic> def unapply(x$0: C): Option[(Int, Int)] = if (x$0.==(null)) - scala.this.None + scala.None else Some.apply[(Int, Int)](scala.Tuple2.apply[Int, Int](x$0.x, x$0.y)) }; diff --git a/test/files/run/indy-via-macro-with-dynamic-args/Bootstrap.java b/test/files/run/indy-via-macro-with-dynamic-args/Bootstrap.java new file mode 100644 index 0000000000..5c9ce01cf4 --- /dev/null +++ b/test/files/run/indy-via-macro-with-dynamic-args/Bootstrap.java @@ -0,0 +1,17 @@ +package test; + +import java.lang.invoke.*; +import java.util.regex.Pattern; + +public final class Bootstrap { + private Bootstrap() { + } + + /** Pre-compile a regex */ + public static CallSite bootstrap(MethodHandles.Lookup lookup, String invokedName, + MethodType invokedType, + String value) throws Throwable { + MethodHandle Pattern_matcher = MethodHandles.lookup().findVirtual(java.util.regex.Pattern.class, "matcher", MethodType.fromMethodDescriptorString("(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;", lookup.lookupClass().getClassLoader())); + return new ConstantCallSite(Pattern_matcher.bindTo(Pattern.compile(value))); + } +} diff --git a/test/files/run/indy-via-macro-with-dynamic-args/Test_2.scala b/test/files/run/indy-via-macro-with-dynamic-args/Test_2.scala new file mode 100644 index 0000000000..77c2b522c7 --- /dev/null +++ b/test/files/run/indy-via-macro-with-dynamic-args/Test_2.scala @@ -0,0 +1,6 @@ +object Test { + def main(args: Array[String]) { + val s = "foo!bar" + assert(Macro.matcher("foo.bar", s).matches == true) + } +} diff --git a/test/files/run/indy-via-macro-with-dynamic-args/macro_1.scala b/test/files/run/indy-via-macro-with-dynamic-args/macro_1.scala new file mode 100644 index 0000000000..cb8719a235 --- /dev/null +++ b/test/files/run/indy-via-macro-with-dynamic-args/macro_1.scala @@ -0,0 +1,33 @@ +import java.util.regex._ + +import scala.reflect.internal.SymbolTable +import scala.reflect.macros.blackbox._ +import language.experimental.macros + +object Macro { + /** + * Equivalent to Pattern.compile(pat).matcher(text), but caches the compiled regex (using invokedynamic) if + * `pat` is a literal. + */ + def matcher(pat: String, text: CharSequence): Matcher = macro Macro.impl + def impl(c: Context)(pat: c.Tree, text: c.Tree): c.Tree = { + def Indy(bootstrapMethod: c.Symbol, bootstrapArgs: List[c.universe.Literal], dynArgs: List[c.Tree]): c.Tree = { + val symtab = c.universe.asInstanceOf[SymbolTable] + import symtab._ + val paramSym = NoSymbol.newTermSymbol(TermName("x")).setInfo(typeOf[CharSequence]) + val dummySymbol = NoSymbol.newTermSymbol(TermName("matcher")).setInfo(internal.methodType(paramSym :: Nil, typeOf[java.util.regex.Matcher])) + val bootstrapArgTrees: List[Tree] = Literal(Constant(bootstrapMethod)).setType(NoType) :: bootstrapArgs.asInstanceOf[List[Tree]] + val result = ApplyDynamic(Ident(dummySymbol).setType(dummySymbol.info), bootstrapArgTrees ::: dynArgs.asInstanceOf[List[Tree]]) + result.setType(dummySymbol.info.resultType) + result.asInstanceOf[c.Tree] + } + import c.universe._ + pat match { + case l @ Literal(Constant(pat: String)) => + val boostrapSym = typeOf[test.Bootstrap].companion.member(TermName("bootstrap")) + Indy(boostrapSym, l :: Nil, text :: Nil) + case _ => + q"_root_.java.util.regex.Pattern.compile($pat).matcher($text)" + } + } +} diff --git a/test/files/run/indy-via-macro/Bootstrap.java b/test/files/run/indy-via-macro/Bootstrap.java new file mode 100644 index 0000000000..af4f5dfd4f --- /dev/null +++ b/test/files/run/indy-via-macro/Bootstrap.java @@ -0,0 +1,16 @@ +package test; + +import java.lang.invoke.*; +import java.util.regex.Pattern; + +public final class Bootstrap { + private Bootstrap() { + } + + /** Pre-compile a regex */ + public static CallSite bootstrap(MethodHandles.Lookup lookup, String invokedName, + MethodType invokedType, + String value) throws Throwable { + return new ConstantCallSite(MethodHandles.constant(Pattern.class, Pattern.compile(value))); + } +} diff --git a/test/files/run/indy-via-macro/Test_2.scala b/test/files/run/indy-via-macro/Test_2.scala new file mode 100644 index 0000000000..830947a46b --- /dev/null +++ b/test/files/run/indy-via-macro/Test_2.scala @@ -0,0 +1,5 @@ +object Test { + def main(args: Array[String]) { + assert(Macro.compilePattern("foo.bar").matcher("foo!bar").matches) + } +}
\ No newline at end of file diff --git a/test/files/run/indy-via-macro/macro_1.scala b/test/files/run/indy-via-macro/macro_1.scala new file mode 100644 index 0000000000..66e319e262 --- /dev/null +++ b/test/files/run/indy-via-macro/macro_1.scala @@ -0,0 +1,32 @@ +import java.util.regex.Pattern + +import scala.reflect.internal.SymbolTable +import scala.reflect.macros.blackbox._ +import language.experimental.macros + +object Macro { + /** + * Equivalent to Pattern.compile(s), but caches the compiled regex (using invokedynamic) if + * `s` is a literal. + */ + def compilePattern(s: String): Pattern = macro Macro.impl + def impl(c: Context)(s: c.Tree): c.Tree = { + def Indy(bootstrapMethod: c.Symbol, bootstrapArgs: List[c.universe.Literal]): c.Tree = { + val symtab = c.universe.asInstanceOf[SymbolTable] + import symtab._ + val dummySymbol = NoSymbol.newTermSymbol(TermName("compile")).setInfo(NullaryMethodType(typeOf[Pattern])) + val args: List[Tree] = Literal(Constant(bootstrapMethod)).setType(NoType) :: bootstrapArgs.asInstanceOf[List[Tree]] + val result = ApplyDynamic(Ident(dummySymbol).setType(dummySymbol.info), args) + result.setType(dummySymbol.info.resultType) + result.asInstanceOf[c.Tree] + } + import c.universe._ + s match { + case l @ Literal(Constant(s: String)) => + val boostrapSym = typeOf[test.Bootstrap].companion.member(TermName("bootstrap")) + Indy(boostrapSym, l :: Nil) + case _ => + q"_root_.java.util.regex.Pattern.compile($s)" + } + } +} diff --git a/test/files/run/indylambda-boxing/test.scala b/test/files/run/indylambda-boxing/test.scala index cc0a460640..82f8d2f497 100644 --- a/test/files/run/indylambda-boxing/test.scala +++ b/test/files/run/indylambda-boxing/test.scala @@ -2,15 +2,16 @@ class Capture class Test { def test1 = (i: Int) => "" def test2 = (i: VC) => i - def test3 = (i: Int) => i + def test3 = (i: Int) => i // not adapted, specialized - def test4 = {val c = new Capture; (i: Int) => {(c, Test.this.toString); 42} } + def test4 = {val c = new Capture; (i: Int) => {(c, Test.this.toString); 42} } // not adapted, specialized def test5 = {val c = new Capture; (i: VC) => (c, Test.this.toString) } def test6 = {val c = new Capture; (i: Int) => (c, Test.this.toString) } def test7 = {val vc = new Capture; (i: Int) => vc } - def test8 = {val c = 42; (s: String) => (s, c)} + def test8 = {val c = 42; (s: String) => (s, c)} // not adapted def test9 = {val c = 42; (s: String) => ()} + def test10 = {(s: List[String]) => ()} } object Test { diff --git a/test/files/run/infix.scala b/test/files/run/infix.scala index a867d03ce8..1d39003644 100644 --- a/test/files/run/infix.scala +++ b/test/files/run/infix.scala @@ -7,5 +7,6 @@ object Test extends App { Console.println(xs) xs match { case null op (0, 0) op (1, 1) op (2, 2) => Console.println("OK") + case _ => } } diff --git a/test/files/run/inlineAddDeserializeLambda.scala b/test/files/run/inlineAddDeserializeLambda.scala new file mode 100644 index 0000000000..a6bafd0f49 --- /dev/null +++ b/test/files/run/inlineAddDeserializeLambda.scala @@ -0,0 +1,20 @@ +class C { @inline final def f: Int => Int = (x: Int) => x + 1 } + +object Test extends App { + import java.io._ + + def serialize(obj: AnyRef): Array[Byte] = { + val buffer = new ByteArrayOutputStream + val out = new ObjectOutputStream(buffer) + out.writeObject(obj) + buffer.toByteArray + } + def deserialize(a: Array[Byte]): AnyRef = { + val in = new ObjectInputStream(new ByteArrayInputStream(a)) + in.readObject + } + + def serializeDeserialize[T <: AnyRef](obj: T) = deserialize(serialize(obj)).asInstanceOf[T] + + assert(serializeDeserialize((new C).f).isInstanceOf[Function1[_, _]]) +} diff --git a/test/files/run/inlineHandlers.scala b/test/files/run/inlineHandlers.scala new file mode 100644 index 0000000000..8c672a07b9 --- /dev/null +++ b/test/files/run/inlineHandlers.scala @@ -0,0 +1,7 @@ +object Test { + @noinline def ham: String = throw null + @inline def inner: String = try { ham } catch { case _: NullPointerException => "npe" } + def foo = try inner catch { case e: Throwable => throw e } + + def main(args: Array[String]): Unit = assert(foo == "npe") +} diff --git a/test/files/run/lambda-serialization.scala b/test/files/run/lambda-serialization.scala index 46b26d7c5e..0eee1193d7 100644 --- a/test/files/run/lambda-serialization.scala +++ b/test/files/run/lambda-serialization.scala @@ -1,8 +1,11 @@ import java.io.{ByteArrayInputStream, ObjectInputStream, ObjectOutputStream, ByteArrayOutputStream} +trait IntToString { def apply(i: Int): String } + object Test { def main(args: Array[String]): Unit = { - roundTrip + roundTrip() + roundTripIndySam() } def roundTrip(): Unit = { @@ -22,6 +25,15 @@ object Test { assert(serializeDeserialize(serializeDeserialize(specializedLambda)).apply(42) == 2) } + // lambda targeting a SAM, not a FunctionN (should behave the same way) + def roundTripIndySam(): Unit = { + val lambda: IntToString = (x: Int) => "yo!" * x + val reconstituted1 = serializeDeserialize(lambda).asInstanceOf[IntToString] + val reconstituted2 = serializeDeserialize(reconstituted1).asInstanceOf[IntToString] + assert(reconstituted1.apply(2) == "yo!yo!") + assert(reconstituted1.getClass == reconstituted2.getClass) + } + def serializeDeserialize[T <: AnyRef](obj: T) = { val buffer = new ByteArrayOutputStream val out = new ObjectOutputStream(buffer) diff --git a/test/files/run/large_class.check b/test/files/run/large_class.check index 0585c267ac..babe24db94 100644 --- a/test/files/run/large_class.check +++ b/test/files/run/large_class.check @@ -1,3 +1 @@ -newSource1.scala:1: error: Could not write class BigEnoughToFail because it exceeds JVM code size limits. Class file too large! -class BigEnoughToFail { - ^ +error: Could not write class BigEnoughToFail because it exceeds JVM code size limits. Class file too large! diff --git a/test/files/run/large_code.check b/test/files/run/large_code.check index 6ad50967bc..42bf490942 100644 --- a/test/files/run/large_code.check +++ b/test/files/run/large_code.check @@ -1,3 +1 @@ -newSource1.scala:1: error: Could not write class BigEnoughToFail because it exceeds JVM code size limits. Method tooLong's code too large! -class BigEnoughToFail { - ^ +error: Could not write class BigEnoughToFail because it exceeds JVM code size limits. Method tooLong's code too large! diff --git a/test/files/run/lisp.check b/test/files/run/lisp.check new file mode 100644 index 0000000000..64053f26d0 --- /dev/null +++ b/test/files/run/lisp.check @@ -0,0 +1,26 @@ +(lambda (x) (+ (* x x) 1)) +(lambda (x) (+ (* x x) 1)) + +( '(1 2 3)) = (1 2 3) +(car '(1 2 3)) = 1 +(cdr '(1 2 3)) = (2 3) +(null? '(2 3)) = 0 +(null? '()) = 1 + +faculty(10) = 3628800 +faculty(10) = 3628800 +foobar = ("a" "bc" "def" "z") + +List('lambda, List('x), List('+, List('*, 'x, 'x), 1)) +(lambda (x) (+ (* x x) 1)) + +( '(1 2 3)) = (1 2 3) +(car '(1 2 3)) = 1 +(cdr '(1 2 3)) = (2 3) +(null? '(2 3)) = 0 +(null? '()) = 1 + +faculty(10) = 3628800 +faculty(10) = 3628800 +foobar = ("a" "bc" "def" "z") + diff --git a/test/files/pos/t4579.scala b/test/files/run/lisp.scala index cd1553f02a..162c7d2599 100644 --- a/test/files/pos/t4579.scala +++ b/test/files/run/lisp.scala @@ -1,5 +1,5 @@ //############################################################################ -// Lisp interpreter (revived as an optimizer test.) +// Lisp interpreter //############################################################################ //############################################################################ diff --git a/test/files/run/lub-visibility.check b/test/files/run/lub-visibility.check index 757f0f5917..61dca979a1 100644 --- a/test/files/run/lub-visibility.check +++ b/test/files/run/lub-visibility.check @@ -4,6 +4,6 @@ scala> // should infer List[scala.collection.immutable.Seq[Nothing]] scala> // but reverted that for SI-5534. scala> val x = List(List(), Vector()) -x: List[scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing] with java.io.Serializable] = List(List(), Vector()) +x: List[scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing] with Serializable] = List(List(), Vector()) scala> :quit diff --git a/test/files/run/macro-typecheck-implicitsdisabled.check b/test/files/run/macro-typecheck-implicitsdisabled.check index 91d8fabd72..07404cf3fb 100644 --- a/test/files/run/macro-typecheck-implicitsdisabled.check +++ b/test/files/run/macro-typecheck-implicitsdisabled.check @@ -1,2 +1,2 @@ -scala.this.Predef.ArrowAssoc[Int](1).->[Int](2) +scala.Predef.ArrowAssoc[Int](1).->[Int](2) scala.reflect.macros.TypecheckException: value -> is not a member of Int diff --git a/test/files/run/macroPlugins-enterStats.check b/test/files/run/macroPlugins-enterStats.check index 133b1ae1af..182d54ca34 100644 --- a/test/files/run/macroPlugins-enterStats.check +++ b/test/files/run/macroPlugins-enterStats.check @@ -6,13 +6,13 @@ package <empty> { () }; def x: Int = 2; - def xmacroPlugin1: Nothing = scala.this.Predef.???; - def xmacroPlugin2: Nothing = scala.this.Predef.???; - def xmacroPlugin2macroPlugin1: Nothing = scala.this.Predef.???; + def xmacroPlugin1: Nothing = scala.Predef.???; + def xmacroPlugin2: Nothing = scala.Predef.???; + def xmacroPlugin2macroPlugin1: Nothing = scala.Predef.???; def y: Int = 3; - def ymacroPlugin1: Nothing = scala.this.Predef.???; - def ymacroPlugin2: Nothing = scala.this.Predef.???; - def ymacroPlugin2macroPlugin1: Nothing = scala.this.Predef.??? + def ymacroPlugin1: Nothing = scala.Predef.???; + def ymacroPlugin2: Nothing = scala.Predef.???; + def ymacroPlugin2macroPlugin1: Nothing = scala.Predef.??? } } diff --git a/test/files/run/macroPlugins-namerHooks.check b/test/files/run/macroPlugins-namerHooks.check index c2db5935d4..4409f196f0 100644 --- a/test/files/run/macroPlugins-namerHooks.check +++ b/test/files/run/macroPlugins-namerHooks.check @@ -1,7 +1,7 @@ enterSym(package <empty> { case class C extends scala.Product with scala.Serializable { <caseaccessor> <paramaccessor> val x: Int = _; <caseaccessor> <paramaccessor> val y: Int = _; def <init>(x: Int, y: Int) = { super.<init>(); () } } }) enterSym(case class C extends scala.Product with scala.Serializable { <caseaccessor> <paramaccessor> val x: Int = _; <caseaccessor> <paramaccessor> val y: Int = _; def <init>(x: Int, y: Int) = { super.<init>(); () } }) ensureCompanionObject(case class C extends scala.Product with scala.Serializable { <caseaccessor> <paramaccessor> val x: Int = _; <caseaccessor> <paramaccessor> val y: Int = _; def <init>(x: Int, y: Int) = { super.<init>(); () } }, ...) -enterSym(<synthetic> object C extends runtime.this.AbstractFunction2[Int, Int, C] { def <init>() = { super.<init>(); () }; final override <synthetic> def toString() = "C" }) +enterSym(<synthetic> object C extends scala.runtime.AbstractFunction2[Int, Int, C] { def <init>() = { super.<init>(); () }; final override <synthetic> def toString() = "C" }) enterStat(case class C extends scala.Product with scala.Serializable { <caseaccessor> <paramaccessor> val x: Int = _; <caseaccessor> <paramaccessor> val y: Int = _; def <init>(x: Int, y: Int) = { super.<init>(); () } }) enterSym(<caseaccessor> <paramaccessor> val x: Int = _) enterSym(<caseaccessor> <paramaccessor> val y: Int = _) @@ -18,17 +18,17 @@ enterStat(super.<init>()) enterSym(<synthetic> def copy$default$1 = x) enterSym(<synthetic> def copy$default$2 = y) enterSym(<synthetic> var acc: Int = -889275714) -enterSym(acc = Statics.this.mix(acc, x)) -enterSym(acc = Statics.this.mix(acc, y)) +enterSym(acc = scala.runtime.Statics.mix(acc, x)) +enterSym(acc = scala.runtime.Statics.mix(acc, y)) enterStat(<synthetic> var acc: Int = -889275714) -enterStat(acc = Statics.this.mix(acc, x)) -enterStat(acc = Statics.this.mix(acc, y)) +enterStat(acc = scala.runtime.Statics.mix(acc, x)) +enterStat(acc = scala.runtime.Statics.mix(acc, y)) enterSym(<synthetic> val C$1: C = x$1.asInstanceOf[C]) enterStat(<synthetic> val C$1: C = x$1.asInstanceOf[C]) enterSym(def <init>() = { super.<init>(); () }) enterSym(final override <synthetic> def toString() = "C") enterSym(case <synthetic> def apply(x: Int, y: Int): C = new C(x, y)) -enterSym(case <synthetic> def unapply(x$0: C) = if (x$0.==(null)) scala.this.None else Some(scala.Tuple2(x$0.x, x$0.y))) +enterSym(case <synthetic> def unapply(x$0: C): _root_.scala.Option[scala.Tuple2[Int, Int]] = if (x$0.==(null)) scala.None else Some(scala.Tuple2(x$0.x, x$0.y))) enterStat(def <init>() = { super.<init>(); () }) enterStat(final override <synthetic> def toString() = "C") enterSym(def <init>() = { super.<init>(); () }) diff --git a/test/files/run/mapConserve.scala b/test/files/run/mapConserve.scala index c17754283a..95cad69954 100644 --- a/test/files/run/mapConserve.scala +++ b/test/files/run/mapConserve.scala @@ -1,5 +1,5 @@ /* - * filter: inliner warnings; re-run with + * filter: inliner warning */ import scala.annotation.tailrec import scala.collection.mutable.ListBuffer diff --git a/test/files/run/mixin-signatures.check b/test/files/run/mixin-signatures.check index 3031fe75af..9961992e2d 100644 --- a/test/files/run/mixin-signatures.check +++ b/test/files/run/mixin-signatures.check @@ -1,19 +1,23 @@ class Test$bar1$ { - public java.lang.String Test$bar1$.f(java.lang.Object) + public default java.lang.String Foo1.f(java.lang.Object) + generic: public default java.lang.String Foo1.f(T) public java.lang.Object Test$bar1$.f(java.lang.Object) <bridge> <synthetic> public java.lang.String Test$bar1$.g(java.lang.String) public java.lang.Object Test$bar1$.g(java.lang.Object) <bridge> <synthetic> public java.lang.String Test$bar1$.g(java.lang.Object) <bridge> <synthetic> - public java.lang.Object Test$bar1$.h(java.lang.Object) + public default java.lang.Object Base.h(java.lang.Object) + generic: public default R Base.h(T) } class Test$bar2$ { - public java.lang.Object Test$bar2$.f(java.lang.String) + public default java.lang.Object Foo2.f(java.lang.String) + generic: public default R Foo2.f(java.lang.String) public java.lang.Object Test$bar2$.f(java.lang.Object) <bridge> <synthetic> public java.lang.String Test$bar2$.g(java.lang.String) public java.lang.Object Test$bar2$.g(java.lang.Object) <bridge> <synthetic> public java.lang.Object Test$bar2$.g(java.lang.String) <bridge> <synthetic> - public java.lang.Object Test$bar2$.h(java.lang.Object) + public default java.lang.Object Base.h(java.lang.Object) + generic: public default R Base.h(T) } class Test$bar3$ { @@ -23,7 +27,8 @@ class Test$bar3$ { public java.lang.String Test$bar3$.g(java.lang.String) public java.lang.Object Test$bar3$.g(java.lang.Object) <bridge> <synthetic> public java.lang.String Test$bar3$.g(java.lang.Object) <bridge> <synthetic> - public java.lang.Object Foo3.h(java.lang.Object) + public default java.lang.Object Base.h(java.lang.Object) + generic: public default R Base.h(T) } class Test$bar4$ { @@ -33,7 +38,8 @@ class Test$bar4$ { public java.lang.String Test$bar4$.g(java.lang.String) public java.lang.Object Test$bar4$.g(java.lang.Object) <bridge> <synthetic> public java.lang.Object Test$bar4$.g(java.lang.String) <bridge> <synthetic> - public java.lang.Object Foo4.h(java.lang.Object) + public default java.lang.Object Base.h(java.lang.Object) + generic: public default R Base.h(T) } class Test$bar5$ { @@ -45,15 +51,34 @@ class Test$bar5$ { public java.lang.Object Test$bar5$.g(java.lang.Object) <bridge> <synthetic> public java.lang.Object Test$bar5$.g(java.lang.String) <bridge> <synthetic> public java.lang.String Test$bar5$.g(java.lang.Object) <bridge> <synthetic> - public java.lang.Object Test$bar5$.h(java.lang.Object) + public default java.lang.Object Base.h(java.lang.Object) + generic: public default R Base.h(T) } -class Foo1$class { - public static java.lang.String Foo1$class.f(Foo1,java.lang.Object) +interface Foo1 { + public abstract java.lang.Object Base.f(java.lang.Object) + generic: public abstract R Base.f(T) + public default java.lang.String Foo1.f(java.lang.Object) + generic: public default java.lang.String Foo1.f(T) + public abstract java.lang.Object Base.g(java.lang.Object) + generic: public abstract R Base.g(T) + public abstract java.lang.String Foo1.g(java.lang.Object) + generic: public abstract java.lang.String Foo1.g(T) + public default java.lang.Object Base.h(java.lang.Object) + generic: public default R Base.h(T) } -class Foo2$class { - public static java.lang.Object Foo2$class.f(Foo2,java.lang.String) +interface Foo2 { + public abstract java.lang.Object Base.f(java.lang.Object) + generic: public abstract R Base.f(T) + public default java.lang.Object Foo2.f(java.lang.String) + generic: public default R Foo2.f(java.lang.String) + public abstract java.lang.Object Base.g(java.lang.Object) + generic: public abstract R Base.g(T) + public abstract java.lang.Object Foo2.g(java.lang.String) + generic: public abstract R Foo2.g(java.lang.String) + public default java.lang.Object Base.h(java.lang.Object) + generic: public default R Base.h(T) } 000000000000000000000000000000000000 diff --git a/test/files/run/mixin-signatures.scala b/test/files/run/mixin-signatures.scala index afd3fad877..0f6d0844d8 100644 --- a/test/files/run/mixin-signatures.scala +++ b/test/files/run/mixin-signatures.scala @@ -99,7 +99,7 @@ object Test { def main(args: Array[String]): Unit = { List(bar1, bar2, bar3, bar4, bar5) foreach show - List("Foo1$class", "Foo2$class") foreach show + List("Foo1", "Foo2") foreach show println(go) } -}
\ No newline at end of file +} diff --git a/test/files/run/noInlineUnknownIndy.check b/test/files/run/noInlineUnknownIndy.check new file mode 100644 index 0000000000..7cc6d1b675 --- /dev/null +++ b/test/files/run/noInlineUnknownIndy.check @@ -0,0 +1,13 @@ +newSource1.scala:1: warning: A_1::test()Ljava/lang/String; could not be inlined: +Failed to check if A_1::test()Ljava/lang/String; can be safely inlined to T without causing an IllegalAccessError. Checking instruction INVOKEDYNAMIC m()LA_1$Fun; [ + // handle kind 0x6 : INVOKESTATIC + not/java/lang/SomeLambdaMetafactory.notAMetaFactoryMethod(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite; + // arguments: + (Ljava/lang/String;)Ljava/lang/String;, + // handle kind 0x6 : INVOKESTATIC + A_1.lambda$test$0(Ljava/lang/String;)Ljava/lang/String;, + (Ljava/lang/String;)Ljava/lang/String; + ] failed: +The callee contains an InvokeDynamic instruction with an unknown bootstrap method (not a LambdaMetaFactory). +class T { def foo = A_1.test } + ^ diff --git a/test/files/run/noInlineUnknownIndy/A_1.java b/test/files/run/noInlineUnknownIndy/A_1.java new file mode 100644 index 0000000000..a9144a9fa6 --- /dev/null +++ b/test/files/run/noInlineUnknownIndy/A_1.java @@ -0,0 +1,9 @@ +public class A_1 { + interface Fun { + String m(String s); + } + public static final String test() { + Fun f = s -> s.trim(); + return f.m(" eh "); + } +} diff --git a/test/files/run/noInlineUnknownIndy/Test.scala b/test/files/run/noInlineUnknownIndy/Test.scala new file mode 100644 index 0000000000..16d8126543 --- /dev/null +++ b/test/files/run/noInlineUnknownIndy/Test.scala @@ -0,0 +1,28 @@ +import java.io.File + +import scala.collection.convert.decorateAsScala._ +import scala.tools.asm.tree.{ClassNode, InvokeDynamicInsnNode} +import scala.tools.asm.{Handle, Opcodes} +import scala.tools.partest.BytecodeTest.modifyClassFile +import scala.tools.partest._ + +object Test extends DirectTest { + def code = ??? + + def compileCode(code: String) = { + val classpath = List(sys.props("partest.lib"), testOutput.path) mkString sys.props("path.separator") + compileString(newCompiler("-cp", classpath, "-d", testOutput.path, "-Yopt:l:classpath", "-Yopt-inline-heuristics:everything", "-Yopt-warnings:_"))(code) + } + + def show(): Unit = { + val unknownBootstrapMethod = new Handle(Opcodes.H_INVOKESTATIC, "not/java/lang/SomeLambdaMetafactory", "notAMetaFactoryMethod", "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;") + modifyClassFile(new File(testOutput.toFile, "A_1.class"))((cn: ClassNode) => { + val testMethod = cn.methods.iterator.asScala.find(_.name == "test").head + val indy = testMethod.instructions.iterator.asScala.collect({ case i: InvokeDynamicInsnNode => i }).next() + indy.bsm = unknownBootstrapMethod + cn + }) + + compileCode("class T { def foo = A_1.test }") + } +} diff --git a/test/files/run/nothingTypeDce.flags b/test/files/run/nothingTypeDce.flags index d85321ca0e..8785c036f6 100644 --- a/test/files/run/nothingTypeDce.flags +++ b/test/files/run/nothingTypeDce.flags @@ -1 +1 @@ --target:jvm-1.6 -Ybackend:GenBCode -Yopt:unreachable-code +-Yopt:unreachable-code diff --git a/test/files/run/nothingTypeDce.scala b/test/files/run/nothingTypeDce.scala index 5f3692fd33..5c3a0731fd 100644 --- a/test/files/run/nothingTypeDce.scala +++ b/test/files/run/nothingTypeDce.scala @@ -1,7 +1,6 @@ // See comment in BCodeBodyBuilder -// -target:jvm-1.6 -Ybackend:GenBCode -Yopt:unreachable-code -// target enables stack map frames generation +// -Yopt:unreachable-code class C { // can't just emit a call to ???, that returns value of type Nothing$ (not Int). diff --git a/test/files/run/nothingTypeNoFramesNoDce.check b/test/files/run/nothingTypeNoFramesNoDce.check deleted file mode 100644 index b1d08b45ff..0000000000 --- a/test/files/run/nothingTypeNoFramesNoDce.check +++ /dev/null @@ -1 +0,0 @@ -warning: -target:jvm-1.5 is deprecated: use target for Java 1.6 or above. diff --git a/test/files/run/nothingTypeNoFramesNoDce.flags b/test/files/run/nothingTypeNoFramesNoDce.flags deleted file mode 100644 index a035c86179..0000000000 --- a/test/files/run/nothingTypeNoFramesNoDce.flags +++ /dev/null @@ -1 +0,0 @@ --target:jvm-1.5 -Ybackend:GenBCode -Yopt:l:none -deprecation diff --git a/test/files/run/nothingTypeNoFramesNoDce.scala b/test/files/run/nothingTypeNoFramesNoDce.scala deleted file mode 100644 index 7f63faeaa7..0000000000 --- a/test/files/run/nothingTypeNoFramesNoDce.scala +++ /dev/null @@ -1,61 +0,0 @@ -// See comment in BCodeBodyBuilder - -// -target:jvm-1.5 -Ybackend:GenBCode -Yopt:l:none -// target disables stack map frame generation. in this mode, the ClssWriter just emits dead code as is. - -class C { - // can't just emit a call to ???, that returns value of type Nothing$ (not Int). - def f1: Int = ??? - - def f2: Int = throw new Error("") - - def f3(x: Boolean) = { - var y = 0 - // cannot assign an object of type Nothing$ to Int - if (x) y = ??? - else y = 1 - y - } - - def f4(x: Boolean) = { - var y = 0 - // tests that whatever is emitted after the throw is valid (what? depends on opts, presence of stack map frames) - if (x) y = throw new Error("") - else y = 1 - y - } - - def f5(x: Boolean) = { - // stack heights need to be the same. ??? looks to the jvm like returning a value of - // type Nothing$, need to drop or throw it. - println( - if (x) { ???; 10 } - else 20 - ) - } - - def f6(x: Boolean) = { - println( - if (x) { throw new Error(""); 10 } - else 20 - ) - } - - def f7(x: Boolean) = { - println( - if (x) throw new Error("") - else 20 - ) - } - - def f8(x: Boolean) = { - println( - if (x) throw new Error("") - else 20 - ) - } -} - -object Test extends App { - new C() -} diff --git a/test/files/run/nothingTypeNoOpt.flags b/test/files/run/nothingTypeNoOpt.flags index b3b518051b..bc22511cff 100644 --- a/test/files/run/nothingTypeNoOpt.flags +++ b/test/files/run/nothingTypeNoOpt.flags @@ -1 +1 @@ --target:jvm-1.6 -Ybackend:GenBCode -Yopt:l:none +-Yopt:l:none diff --git a/test/files/run/nothingTypeNoOpt.scala b/test/files/run/nothingTypeNoOpt.scala index 454539a4b1..33b20ba851 100644 --- a/test/files/run/nothingTypeNoOpt.scala +++ b/test/files/run/nothingTypeNoOpt.scala @@ -1,6 +1,6 @@ // See comment in BCodeBodyBuilder -// -target:jvm-1.6 -Ybackend:GenBCode -Yopt:l:none +// -target:jvm-1.6 -Yopt:l:none // target enables stack map frame generation class C { diff --git a/test/files/run/numbereq.scala b/test/files/run/numbereq.scala index 7ce4b23cf8..1f12d0643e 100644 --- a/test/files/run/numbereq.scala +++ b/test/files/run/numbereq.scala @@ -1,6 +1,7 @@ object Test { def mkNumbers(x: Int): List[AnyRef] = { - val base = List( + //Use explicit AnyRef to workaround known limitation of type inference with F-Bounds + val base = List[AnyRef]( BigDecimal(x), BigInt(x), new java.lang.Double(x.toDouble), diff --git a/test/files/run/optimizer-array-load.flags b/test/files/run/optimizer-array-load.flags deleted file mode 100644 index eb4d19bcb9..0000000000 --- a/test/files/run/optimizer-array-load.flags +++ /dev/null @@ -1 +0,0 @@ --optimise
\ No newline at end of file diff --git a/test/files/run/patmatnew.scala b/test/files/run/patmatnew.scala index 3c0d00dc6c..2647d97836 100644 --- a/test/files/run/patmatnew.scala +++ b/test/files/run/patmatnew.scala @@ -539,7 +539,7 @@ object Test { case class Operator(x: Int); val EQ = new Operator(2); - def analyze(x: Tuple2[Operator, Int]) = x match { + def analyze(x: Tuple2[Operator, Int]) = (x: @unchecked) match { case (EQ, 0) => "0" case (EQ, 1) => "1" case (EQ, 2) => "2" @@ -603,7 +603,7 @@ object Test { object Bug1093 { def run() { - assert(Some(3) match { + assert((Some(3): @unchecked) match { case Some(1 | 2) => false case Some(3) => true }) diff --git a/test/files/run/private-inline.check b/test/files/run/private-inline.check deleted file mode 100644 index e71aec2fcf..0000000000 --- a/test/files/run/private-inline.check +++ /dev/null @@ -1,13 +0,0 @@ -private-inline.scala:24: warning: Could not inline required method wrapper1 because callee contains exception handlers / finally clause, and is invoked with non-empty operand stack. - def f1b() = identity(wrapper1(5)) - ^ -private-inline.scala:24: warning: At the end of the day, could not inline @inline-marked method wrapper1 - def f1b() = identity(wrapper1(5)) - ^ -private-inline.scala:29: warning: Could not inline required method wrapper2 because callee contains exception handlers / finally clause, and is invoked with non-empty operand stack. - def f2b() = identity(wrapper2(5)) - ^ -private-inline.scala:29: warning: At the end of the day, could not inline @inline-marked method wrapper2 - def f2b() = identity(wrapper2(5)) - ^ -20 diff --git a/test/files/run/private-inline.flags b/test/files/run/private-inline.flags deleted file mode 100644 index c550fdce16..0000000000 --- a/test/files/run/private-inline.flags +++ /dev/null @@ -1 +0,0 @@ --optimise -Yinline-warnings -Ybackend:GenASM diff --git a/test/files/run/private-inline.scala b/test/files/run/private-inline.scala deleted file mode 100644 index 60fef9efca..0000000000 --- a/test/files/run/private-inline.scala +++ /dev/null @@ -1,52 +0,0 @@ - -final class A { - private var x1 = false - var x2 = false - - // manipulates private var - @inline private def wrapper1[T](body: => T): T = { - val saved = x1 - x1 = true - try body - finally x1 = saved - } - // manipulates public var - @inline private def wrapper2[T](body: => T): T = { - val saved = x2 - x2 = true - try body - finally x2 = saved - } - - // not inlined - def f1a() = wrapper1(5) - // inlined! - def f1b() = identity(wrapper1(5)) - - // not inlined - def f2a() = wrapper2(5) - // inlined! - def f2b() = identity(wrapper2(5)) -} - -object Test { - def methodClasses = List("f1a", "f2a") map ("A$$anonfun$" + _ + "$1") - - def main(args: Array[String]): Unit = { - val a = new A - import a._ - println(f1a() + f1b() + f2a() + f2b()) - - // Don't know how else to test this: all these should have been - // inlined, so all should fail. - methodClasses foreach { clazz => - - val foundClass = ( - try Class.forName(clazz) - catch { case _: Throwable => null } - ) - - assert(foundClass == null, foundClass) - } - } -} diff --git a/test/files/run/programmatic-main.check b/test/files/run/programmatic-main.check index 1cd94ccb45..280a4f43d5 100644 --- a/test/files/run/programmatic-main.check +++ b/test/files/run/programmatic-main.check @@ -22,6 +22,5 @@ superaccessors 6 add super accessors in traits and nested classes mixin 20 mixin composition cleanup 21 platform-specific cleanups, generate reflective calls delambdafy 22 remove lambdas - icode 23 generate portable intermediate code - jvm 24 generate JVM bytecode - terminal 25 the last phase during a compilation run + jvm 23 generate JVM bytecode + terminal 24 the last phase during a compilation run diff --git a/test/files/run/reflection-implClass.scala b/test/files/run/reflection-implClass.scala deleted file mode 100644 index 4242530dd1..0000000000 --- a/test/files/run/reflection-implClass.scala +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Tries to load a symbol for the `Foo$class` using Scala reflection. - * Since trait implementation classes do not get pickling information - * symbol for them should be created using fallback mechanism - * that exposes Java reflection information dressed up in - * a Scala symbol. - */ -object Test extends App with Outer { - import scala.reflect.{ClassTag, classTag} - import scala.reflect.runtime.universe._ - import scala.reflect.runtime.{currentMirror => cm} - - assert(cm.classSymbol(classTag[Foo].runtimeClass).info.decl(TermName("bar")).info == - cm.classSymbol(classTag[Bar].runtimeClass).info.decl(TermName("foo")).info) - - val s1 = implClass(classTag[Foo].runtimeClass) - assert(s1 != NoSymbol) - assert(s1.info != NoType) - assert(s1.companion.info != NoType) - assert(s1.companion.info.decl(TermName("bar")) != NoSymbol) - val s2 = implClass(classTag[Bar].runtimeClass) - assert(s2 != NoSymbol) - assert(s2.info != NoType) - assert(s2.companion.info != NoType) - assert(s2.companion.info.decl(TermName("foo")) != NoSymbol) - def implClass(clazz: Class[_]) = { - val implClass = Class.forName(clazz.getName + "$class") - cm.classSymbol(implClass) - } -} - -trait Foo { - def bar = 1 -} - -trait Outer { - trait Bar { - def foo = 1 - } -} diff --git a/test/files/run/reflection-mem-typecheck.scala b/test/files/run/reflection-mem-typecheck.scala index e3cabf689d..93ec1c937a 100644 --- a/test/files/run/reflection-mem-typecheck.scala +++ b/test/files/run/reflection-mem-typecheck.scala @@ -11,7 +11,9 @@ object Test extends MemoryTest { cm.mkToolBox() } - override def maxDelta = 10 + // I'm not sure this is a great way to test for memory leaks, + // since we're also testing how good the JVM's GC is, and this is not easily reproduced between machines/over time + override def maxDelta = 12 override def calcsPerIter = 8 override def calc() { var snippet = """ diff --git a/test/files/run/reflection-scala-annotations.check b/test/files/run/reflection-scala-annotations.check index 5bc2786161..44062d8c4a 100644 --- a/test/files/run/reflection-scala-annotations.check +++ b/test/files/run/reflection-scala-annotations.check @@ -3,5 +3,5 @@ make your annotation visible at runtime. If that is what you want, you must write the annotation class in Java. class jann(x: Int, y: Array[Int]) extends ClassfileAnnotation ^ -new sann(1, immutable.this.List.apply[Int](1, 2)) +new sann(1, scala.collection.immutable.List.apply[Int](1, 2)) new jann(y = Array(1, 2), x = 2) diff --git a/test/files/run/reify-aliases.check b/test/files/run/reify-aliases.check index da784227af..b6b5fb71b2 100644 --- a/test/files/run/reify-aliases.check +++ b/test/files/run/reify-aliases.check @@ -1 +1 @@ -TypeRef(SingleType(ThisType(scala), scala.Predef), TypeName("String"), List()) +TypeRef(SingleType(TypeRef(ThisType(<root>), scala, List()), scala.Predef), TypeName("String"), List()) diff --git a/test/files/run/repl-javap-app.check b/test/files/run/repl-javap-app.check deleted file mode 100644 index bace9534da..0000000000 --- a/test/files/run/repl-javap-app.check +++ /dev/null @@ -1,60 +0,0 @@ -#partest java6 -Welcome to Scala -Type in expressions for evaluation. Or try :help. - -scala> :javap -app MyApp$ -public final void delayedEndpoint$MyApp$1(); - Code: - Stack=2, Locals=1, Args_size=1 - 0: getstatic #XX; //Field scala/Console$.MODULE$:Lscala/Console$; - 3: ldc #XX; //String Hello, delayed world. - 5: invokevirtual #XX; //Method scala/Console$.println:(Ljava/lang/Object;)V - 8: return - LocalVariableTable: - Start Length Slot Name Signature - 0 9 0 this LMyApp$; - -scala> :quit -#partest java7 -Welcome to Scala -Type in expressions for evaluation. Or try :help. - -scala> :javap -app MyApp$ - public final void delayedEndpoint$MyApp$1(); - flags: ACC_PUBLIC, ACC_FINAL - Code: - stack=2, locals=1, args_size=1 - 0: getstatic #XX // Field scala/Console$.MODULE$:Lscala/Console$; - 3: ldc #XX // String Hello, delayed world. - 5: invokevirtual #XX // Method scala/Console$.println:(Ljava/lang/Object;)V - 8: return - LocalVariableTable: - Start Length Slot Name Signature - 0 9 0 this LMyApp$; - LineNumberTable: - line 5: 0 -} - -scala> :quit -#partest java8 -Welcome to Scala -Type in expressions for evaluation. Or try :help. - -scala> :javap -app MyApp$ - public final void delayedEndpoint$MyApp$1(); - descriptor: ()V - flags: ACC_PUBLIC, ACC_FINAL - Code: - stack=2, locals=1, args_size=1 - 0: getstatic #XX // Field scala/Console$.MODULE$:Lscala/Console$; - 3: ldc #XX // String Hello, delayed world. - 5: invokevirtual #XX // Method scala/Console$.println:(Ljava/lang/Object;)V - 8: return - LocalVariableTable: - Start Length Slot Name Signature - 0 9 0 this LMyApp$; - LineNumberTable: - line 5: 0 -} - -scala> :quit diff --git a/test/files/run/repl-javap-app.scala b/test/files/run/repl-javap-app.scala deleted file mode 100644 index ad6076c2d5..0000000000 --- a/test/files/run/repl-javap-app.scala +++ /dev/null @@ -1,21 +0,0 @@ - -import scala.tools.partest.ReplTest - -object MyApp extends App { - Console println "Hello, delayed world." -} - -object Test extends ReplTest { - def code = ":javap -app MyApp$" - - override def welcoming = true - - // The constant pool indices are not the same for GenASM / GenBCode, so - // replacing the exact numbers by XX. - lazy val hasConstantPoolRef = """(.*)(#\d\d)(.*)""".r - - override def normalize(s: String) = s match { - case hasConstantPoolRef(start, ref, end) => start + "#XX" + end - case _ => super.normalize(s) - } -} diff --git a/test/files/run/repl-javap-def.scala b/test/files/run/repl-javap-def.scala index dbd769613a..3994f06767 100644 --- a/test/files/run/repl-javap-def.scala +++ b/test/files/run/repl-javap-def.scala @@ -3,7 +3,7 @@ import scala.tools.partest.JavapTest object Test extends JavapTest { def code = """ |def f = 7 - |:javap -public -raw f + |:javap -public f """.stripMargin // it should find f wrapped in repl skins. replstiltskin. diff --git a/test/files/run/repl-javap-fun.scala b/test/files/run/repl-javap-fun.scala deleted file mode 100644 index 5c9a6b7691..0000000000 --- a/test/files/run/repl-javap-fun.scala +++ /dev/null @@ -1,16 +0,0 @@ -import scala.tools.partest.JavapTest - -object Test extends JavapTest { - def code = """ - |object Betty { - | List(1,2,3) filter (_ % 2 != 0) map (_ * 2) - |} - |:javap -fun Betty - """.stripMargin - - // two anonfuns of Betty - override def yah(res: Seq[String]) = { - def filtered = res filter (_ contains "public final class Betty") - 2 == filtered.size - } -} diff --git a/test/files/run/repl-javap-lambdas.scala b/test/files/run/repl-javap-lambdas.scala deleted file mode 100644 index 76a6ec8450..0000000000 --- a/test/files/run/repl-javap-lambdas.scala +++ /dev/null @@ -1,23 +0,0 @@ -import scala.tools.partest.JavapTest -import scala.tools.nsc.Settings - -// see repl-javap-memfun.java for the complementary version -object Test extends JavapTest { - override def transformSettings(s: Settings) = { s.Ydelambdafy.value = "method" ; s } - def code = """ - |object Betty { - | List(1,2,3) count (_ % 2 != 0) - | def f = List(1,2,3) filter ((x: Any) => true) map (x => "m1") - | def g = List(1,2,3) filter ((x: Any) => true) map (x => "m1") map (x => "m2") - |} - |:javap -fun Betty#g - """.stripMargin - - // three anonfuns of Betty#g - override def yah(res: Seq[String]) = { - import PartialFunction.{ cond => when } - val r = """.*final .* .*\$anonfun\$\d+\(.*""".r - def filtered = res filter (when(_) { case r(_*) => true }) - 3 == filtered.size - } -} diff --git a/test/files/run/repl-javap-memfun.scala b/test/files/run/repl-javap-memfun.scala deleted file mode 100644 index d10ebcb399..0000000000 --- a/test/files/run/repl-javap-memfun.scala +++ /dev/null @@ -1,22 +0,0 @@ -import scala.tools.partest.JavapTest -import scala.tools.nsc.Settings - -// see repl-javap-lambdas.scala for the complementary version -object Test extends JavapTest { - // asserting the default - override def transformSettings(s: Settings) = { s.Ydelambdafy.value = "inline" ; s } - def code = """ - |object Betty { - | List(1,2,3) count (_ % 2 != 0) - | def f = List(1,2,3) filter (_ % 2 != 0) map (_ * 2) - | def g = List(1,2,3) filter (_ % 2 == 0) map (_ * 3) map (_ + 1) - |} - |:javap -fun Betty#g - """.stripMargin - - // three anonfuns of Betty#g - override def yah(res: Seq[String]) = { - def filtered = res filter (_ contains "public final class Betty") - 3 == filtered.size - } -} diff --git a/test/files/run/repl-javap-more-fun.scala b/test/files/run/repl-javap-more-fun.scala deleted file mode 100644 index e603faf75a..0000000000 --- a/test/files/run/repl-javap-more-fun.scala +++ /dev/null @@ -1,17 +0,0 @@ -import scala.tools.partest.JavapTest - -object Test extends JavapTest { - def code = """ - |object Betty { - | val ds = List(1,2,3) filter (_ % 2 == 0) map (_ * 3) - | def m(vs: List[Int]) = vs filter (_ % 2 != 0) map (_ * 2) - |} - |:javap -fun Betty - """.stripMargin - - // two anonfuns of Betty - override def yah(res: Seq[String]) = { - def filtered = res filter (_ contains "public final class Betty") - 4 == filtered.size - } -} diff --git a/test/files/run/repl-javap-outdir-funs.flags b/test/files/run/repl-javap-outdir-funs.flags deleted file mode 100644 index ac96850b69..0000000000 --- a/test/files/run/repl-javap-outdir-funs.flags +++ /dev/null @@ -1 +0,0 @@ --Ydelambdafy:inline
\ No newline at end of file diff --git a/test/files/run/repl-javap-outdir-funs/foo_1.scala b/test/files/run/repl-javap-outdir-funs/foo_1.scala deleted file mode 100644 index 9b98e94733..0000000000 --- a/test/files/run/repl-javap-outdir-funs/foo_1.scala +++ /dev/null @@ -1,6 +0,0 @@ - -package disktest - -class Foo { - def m(vs: List[Int]) = vs map (_ + 1) -} diff --git a/test/files/run/repl-javap-outdir-funs/run-repl_7.scala b/test/files/run/repl-javap-outdir-funs/run-repl_7.scala deleted file mode 100644 index af9651a8a3..0000000000 --- a/test/files/run/repl-javap-outdir-funs/run-repl_7.scala +++ /dev/null @@ -1,20 +0,0 @@ -import scala.tools.partest.JavapTest - -object Test extends JavapTest { - // note the '-fun': it makes :javap search for some anonfun. - // for that reason, this test has a flags file that forces delambdafy:inline (doesn't allow :method) - def code = """ - |:javap -fun disktest/Foo.class - """.stripMargin - - override def yah(res: Seq[String]) = - // It's currently unknown why this test fails on Avian with - // “Failed: No anonfuns found.”, skip it for now. See SI-7630. - if (scala.tools.partest.utils.Properties.isAvian) - true - else { - val r = "public final class disktest.Foo.*extends scala.runtime.AbstractFunction1".r - def filtered = res filter (r.findFirstIn(_).nonEmpty) - 1 == filtered.size - } -} diff --git a/test/files/run/repl-javap.scala b/test/files/run/repl-javap.scala index 7a19852d4e..25e72f3b13 100644 --- a/test/files/run/repl-javap.scala +++ b/test/files/run/repl-javap.scala @@ -7,7 +7,8 @@ object Test extends JavapTest { """.stripMargin override def yah(res: Seq[String]) = { - def filtered = res filter (_ contains "public class Betty") + val r = """public class \S*Betty""".r.unanchored + def filtered = res filter { case r(_*) => true ; case _ => false } 1 == filtered.size } } diff --git a/test/files/run/repl-parens.scala b/test/files/run/repl-parens.scala index e25933b1a2..43e642a806 100644 --- a/test/files/run/repl-parens.scala +++ b/test/files/run/repl-parens.scala @@ -26,4 +26,11 @@ foo(5)(10)(15)+foo(5)(10)(15) List(1) ++ List('a') """.trim + + // replace indylambda function names by <function0> + override def eval() = { + val lines = super.eval + val r = """\$\$Lambda.*""".r + lines.map(l => r.replaceAllIn(l, "<function0>")) + } } diff --git a/test/files/run/run-bug4840.flags b/test/files/run/run-bug4840.flags deleted file mode 100644 index eb4d19bcb9..0000000000 --- a/test/files/run/run-bug4840.flags +++ /dev/null @@ -1 +0,0 @@ --optimise
\ No newline at end of file diff --git a/test/files/run/sammy_after_implicit_view.scala b/test/files/run/sammy_after_implicit_view.scala new file mode 100644 index 0000000000..a13a71e562 --- /dev/null +++ b/test/files/run/sammy_after_implicit_view.scala @@ -0,0 +1,28 @@ +trait MySam { def apply(x: Int): String } + +// check that SAM conversion happens after implicit view application +object Test extends App { + final val AnonFunClass = "$anon$" + final val LMFClass = "$$Lambda$" // LambdaMetaFactory names classes like this + + // if there's an implicit conversion, it does not takes precedence (because that's what dotty does) + def implicitSam() = { + import language.implicitConversions + var ok = true + implicit def fun2sam(fun: Int => String): MySam = { ok = false; new MySam { def apply(x: Int) = fun(x) } } + val className = (((x: Int) => x.toString): MySam).getClass.toString + assert(ok, "implicit conversion not called") + assert(!(className contains AnonFunClass), className) + assert(className contains LMFClass, className) + } + + // indirectly check that this sam type instance was created from a class spun up by LambdaMetaFactory + def justSammy() = { + val className = (((x: Int) => x.toString): MySam).getClass.toString + assert(!(className contains AnonFunClass), className) + assert(className contains LMFClass, className) + } + + implicitSam() + justSammy() +} diff --git a/test/files/run/sammy_cbn.scala b/test/files/run/sammy_cbn.scala new file mode 100644 index 0000000000..b84b2fd8e5 --- /dev/null +++ b/test/files/run/sammy_cbn.scala @@ -0,0 +1,9 @@ +trait F0[T] { def apply(): T } + +object Test extends App { + def delay[T](v: => T) = (v _): F0[T] + + // should not fail with ClassCastException: $$Lambda$6279/897871870 cannot be cast to F0 + // (also, should not say boe!) + delay(println("boe!")) +} diff --git a/test/files/run/sammy_erasure_cce.scala b/test/files/run/sammy_erasure_cce.scala new file mode 100644 index 0000000000..fb973befe4 --- /dev/null +++ b/test/files/run/sammy_erasure_cce.scala @@ -0,0 +1,22 @@ +trait F1 { + def apply(a: List[String]): String + def f1 = "f1" +} + +object Test extends App { + // Wrap the sam-targeting function in a context where the expected type is erased (identity's argument type erases to Object), + // so that Erasure can't tell that the types actually conform by looking only + // at an un-adorned Function tree and the expected type + // (because a function type needs no cast it the expected type is a SAM type), + // + // A correct implementation of Typers/Erasure tracks a Function's SAM target type directly + // (currently using an attachment for backwards compat), + // and not in the expected type (which was the case in my first attempt), + // as the expected type may lose its SAM status due to erasure. + // (In a sense, this need not be so, but erasure drops type parameters, + // so that identity's F1 type argument cannot be propagated to its argument type.) + def foo = identity[F1]((as: List[String]) => as.head) + + // check that this doesn't CCE's + foo.f1 +} diff --git a/test/files/run/sammy_java8.flags b/test/files/run/sammy_java8.flags deleted file mode 100644 index 48fd867160..0000000000 --- a/test/files/run/sammy_java8.flags +++ /dev/null @@ -1 +0,0 @@ --Xexperimental diff --git a/test/files/run/sammy_repeated.flags b/test/files/run/sammy_repeated.flags deleted file mode 100644 index e1b37447c9..0000000000 --- a/test/files/run/sammy_repeated.flags +++ /dev/null @@ -1 +0,0 @@ --Xexperimental
\ No newline at end of file diff --git a/test/files/run/sammy_repeated.scala b/test/files/run/sammy_repeated.scala deleted file mode 100644 index c24dc41909..0000000000 --- a/test/files/run/sammy_repeated.scala +++ /dev/null @@ -1,8 +0,0 @@ -trait RepeatedSink { def accept(a: Any*): Unit } - -object Test { - def main(args: Array[String]): Unit = { - val f: RepeatedSink = (a) => println(a) - f.accept(1) - } -}
\ No newline at end of file diff --git a/test/files/run/sammy_restrictions_LMF.check b/test/files/run/sammy_restrictions_LMF.check new file mode 100644 index 0000000000..6ed281c757 --- /dev/null +++ b/test/files/run/sammy_restrictions_LMF.check @@ -0,0 +1,2 @@ +1 +1 diff --git a/test/files/run/sammy_restrictions_LMF.scala b/test/files/run/sammy_restrictions_LMF.scala new file mode 100644 index 0000000000..aa49e14113 --- /dev/null +++ b/test/files/run/sammy_restrictions_LMF.scala @@ -0,0 +1,57 @@ +trait T[@specialized A] { def apply(a: A): A } +trait TInt extends T[Int] + +trait TWithVal { val x: Any = 1; def apply(x: Int): String } + +trait TImpure { def apply(x: Int): String ; println(1) } + +trait Println { println(1) } +trait TImpureSuper extends Println { def apply(x: Int): String } + +class C +trait A extends C +trait B extends A +trait TClassParent extends B { def apply(x: Int): String } + +object Test extends App { + final val AnonFunClass = "$anonfun$" + final val LMFClass = "$$Lambda$" // LambdaMetaFactory names classes like this + + private def LMF(f: Any): Unit = { + val className = f.getClass.toString + assert(!(className contains AnonFunClass), className) + assert((className contains LMFClass), className) + } + + private def notLMF(f: Any): Unit = { + val className = f.getClass.toString + assert((className contains AnonFunClass), className) + assert(!(className contains LMFClass), className) + } + + // Check that we expand the SAM of a type that is specialized. + // This is an implementation restriction -- the current specialization scheme is not + // amenable to using LambdaMetaFactory to spin up subclasses. + // Since the generic method is abstract, and the specialized ones are concrete, + // specialization is rendered moot because we cannot implement the specialized method + // with the lambda using LMF. + + // not LMF if specialized at this type + notLMF((x => x): T[Int]) + // not LMF if specialized at this type (via subclass) + notLMF((x => x): TInt) + // LMF ok if not specialized at this type + LMF((x => x): T[String]) + + // traits with a val member also cannot be instantiated by LMF + val fVal: TWithVal = (x => "a") + notLMF(fVal) + assert(fVal.x == 1) + + notLMF((x => "a"): TImpure) + notLMF((x => "a"): TImpureSuper) + + val fClassParent: TClassParent = x => "a" + notLMF(fClassParent) + assert(fClassParent(1) == "a") +} diff --git a/test/files/run/sammy_return.scala b/test/files/run/sammy_return.scala new file mode 100644 index 0000000000..e959619dd1 --- /dev/null +++ b/test/files/run/sammy_return.scala @@ -0,0 +1,14 @@ +trait Fun[A, B] { def apply(a: A): B } +class PF[A, B] { def runWith[U](action: Fun[B, U]): Fun[A, Boolean] = a => {action(a.asInstanceOf[B]); true} } + +class TO[A](x: A) { + def foreach[U](f: Fun[A, U]): U = f(x) + def collectFirst[B](pf: PF[A, B]): Option[B] = { + foreach(pf.runWith(b => return Some(b))) + None + } +} + +object Test extends App { + assert(new TO("a").collectFirst(new PF[String, String]).get == "a") +}
\ No newline at end of file diff --git a/test/files/run/sammy_repeated.check b/test/files/run/sammy_vararg_cbn.check index 1cff0f067c..1cff0f067c 100644 --- a/test/files/run/sammy_repeated.check +++ b/test/files/run/sammy_vararg_cbn.check diff --git a/test/files/run/sammy_vararg_cbn.scala b/test/files/run/sammy_vararg_cbn.scala new file mode 100644 index 0000000000..e5b49498ea --- /dev/null +++ b/test/files/run/sammy_vararg_cbn.scala @@ -0,0 +1,12 @@ +trait SamRepeated { def accept(a: Any*): Unit } +trait SamByName { def accept(a: => Any): (Any, Any) } + +object Test extends App { + val rep: SamRepeated = (a) => println(a) + rep.accept(1) + + val nam: SamByName = (a) => (a, a) + var v = 0 + assert(nam.accept({v += 1; v}) == (1, 2)) + assert(v == 2, "by name arg should be evaluated twice") +} diff --git a/test/files/run/sbt-icode-interface.check b/test/files/run/sbt-icode-interface.check new file mode 100644 index 0000000000..df1629dd7e --- /dev/null +++ b/test/files/run/sbt-icode-interface.check @@ -0,0 +1 @@ +warning: there was one deprecation warning; re-run with -deprecation for details diff --git a/test/files/run/sbt-icode-interface.scala b/test/files/run/sbt-icode-interface.scala index 84d38cc65a..7cd2de5c00 100644 --- a/test/files/run/sbt-icode-interface.scala +++ b/test/files/run/sbt-icode-interface.scala @@ -9,34 +9,32 @@ object Test extends DirectTest { """.trim def show() { - for (b <- List("GenASM", "GenBCode")) { - val global = newCompiler("-usejavacp", s"-Ybackend:$b") - import global._ - val r = new Run - r.compileSources(newSourceFile(code) :: Nil) - - val results = collection.mutable.Buffer[(Boolean, String)]() + val global = newCompiler("-usejavacp") + import global._ + val r = new Run + r.compileSources(newSourceFile(code) :: Nil) - // Nailing down defacto compiler API from SBT's usage - // https://github.com/sbt/sbt/blob/adb41611cf73260938274915d8462d924df200c8/compile/interface/src/main/scala/xsbt/Analyzer.scala#L29-L41 - def isTopLevelModule(sym: Symbol) = sym.isTopLevel && sym.isModule - for (unit <- currentRun.units if !unit.isJava) { - val sourceFile = unit.source.file.file - for (iclass <- unit.icode) { - val sym = iclass.symbol - def addGenerated(separatorRequired: Boolean) { - results += (separatorRequired -> sym.fullName) - } - if (sym.isModuleClass && !sym.isImplClass) { - if (isTopLevelModule(sym) && sym.companionClass == NoSymbol) - addGenerated(false) - addGenerated(true) - } else - addGenerated(false) + val results = collection.mutable.Buffer[(Boolean, String)]() + + // Nailing down defacto compiler API from SBT's usage + // https://github.com/sbt/sbt/blob/adb41611cf73260938274915d8462d924df200c8/compile/interface/src/main/scala/xsbt/Analyzer.scala#L29-L41 + def isTopLevelModule(sym: Symbol) = sym.isTopLevel && sym.isModule + for (unit <- currentRun.units if !unit.isJava) { + val sourceFile = unit.source.file.file + for (iclass <- unit.icode) { + val sym = iclass.symbol + def addGenerated(separatorRequired: Boolean) { + results += (separatorRequired -> sym.fullName) } + if (sym.isModuleClass && !sym.isImplClass) { + if (isTopLevelModule(sym) && sym.companionClass == NoSymbol) + addGenerated(false) + addGenerated(true) + } else + addGenerated(false) } - val expected = List((false, "C"), (true, "O"), (false, "C$D")) - assert(results.toList == expected, b + ": " + results.toList) } + val expected = List((false, "C"), (true, "O"), (false, "C$D")) + assert(results.toList == expected, s"expected: $expected, actual: ${results.toList}") } } diff --git a/test/files/run/showraw_tree_types_ids.check b/test/files/run/showraw_tree_types_ids.check index 75347463cb..e122148040 100644 --- a/test/files/run/showraw_tree_types_ids.check +++ b/test/files/run/showraw_tree_types_ids.check @@ -4,9 +4,9 @@ Apply[1](Select[2](New[1](TypeTree[1]().setOriginal(AppliedTypeTree(Ident[3](sca [3] TypeRef(ThisType(scala.collection.immutable#<id>), scala.collection.immutable.HashMap#<id>, List()) [4] TypeRef(SingleType(ThisType(scala#<id>), scala.Predef#<id>), TypeName("String")#<id>, List()) [5] SingleType(ThisType(scala#<id>), scala.Predef#<id>) -Apply[6](Select[7](New[6](TypeTree[6]().setOriginal(AppliedTypeTree(Ident[8](scala.collection.mutable.HashMap#<id>), List(TypeTree[4]().setOriginal(Select[4](Ident[5](scala.Predef#<id>), TypeName("String")#<id>)), TypeTree[4]().setOriginal(Select[4](Ident[5](scala.Predef#<id>), TypeName("String")#<id>)))))), termNames.CONSTRUCTOR#<id>), List()) +Apply[1](Select[2](New[1](TypeTree[1]().setOriginal(AppliedTypeTree(Ident[3](scala.collection.mutable.HashMap#<id>), List(TypeTree[4]().setOriginal(Select[4](Ident[5](scala.Predef#<id>), TypeName("String")#<id>)), TypeTree[4]().setOriginal(Select[4](Ident[5](scala.Predef#<id>), TypeName("String")#<id>)))))), termNames.CONSTRUCTOR#<id>), List()) +[1] TypeRef(ThisType(scala.collection.mutable#<id>), scala.collection.mutable.HashMap#<id>, List(TypeRef(SingleType(ThisType(scala#<id>), scala.Predef#<id>), TypeName("String")#<id>, List()), TypeRef(SingleType(ThisType(scala#<id>), scala.Predef#<id>), TypeName("String")#<id>, List()))) +[2] MethodType(List(), TypeRef(ThisType(scala.collection.mutable#<id>), scala.collection.mutable.HashMap#<id>, List(TypeRef(SingleType(ThisType(scala#<id>), scala.Predef#<id>), TypeName("String")#<id>, List()), TypeRef(SingleType(ThisType(scala#<id>), scala.Predef#<id>), TypeName("String")#<id>, List())))) +[3] TypeRef(ThisType(scala.collection.mutable#<id>), scala.collection.mutable.HashMap#<id>, List()) [4] TypeRef(SingleType(ThisType(scala#<id>), scala.Predef#<id>), TypeName("String")#<id>, List()) [5] SingleType(ThisType(scala#<id>), scala.Predef#<id>) -[6] TypeRef(ThisType(scala.collection.mutable#<id>), scala.collection.mutable.HashMap#<id>, List(TypeRef(SingleType(ThisType(scala#<id>), scala.Predef#<id>), TypeName("String")#<id>, List()), TypeRef(SingleType(ThisType(scala#<id>), scala.Predef#<id>), TypeName("String")#<id>, List()))) -[7] MethodType(List(), TypeRef(ThisType(scala.collection.mutable#<id>), scala.collection.mutable.HashMap#<id>, List(TypeRef(SingleType(ThisType(scala#<id>), scala.Predef#<id>), TypeName("String")#<id>, List()), TypeRef(SingleType(ThisType(scala#<id>), scala.Predef#<id>), TypeName("String")#<id>, List())))) -[8] TypeRef(ThisType(scala.collection.mutable#<id>), scala.collection.mutable.HashMap#<id>, List()) diff --git a/test/files/run/showraw_tree_types_typed.check b/test/files/run/showraw_tree_types_typed.check index de691e369e..4934ed41dc 100644 --- a/test/files/run/showraw_tree_types_typed.check +++ b/test/files/run/showraw_tree_types_typed.check @@ -4,9 +4,9 @@ Apply[1](Select[2](New[1](TypeTree[1]().setOriginal(AppliedTypeTree(Ident[3](sca [3] TypeRef(ThisType(scala.collection.immutable), scala.collection.immutable.HashMap, List()) [4] TypeRef(SingleType(ThisType(scala), scala.Predef), TypeName("String"), List()) [5] SingleType(ThisType(scala), scala.Predef) -Apply[6](Select[7](New[6](TypeTree[6]().setOriginal(AppliedTypeTree(Ident[8](scala.collection.mutable.HashMap), List(TypeTree[4]().setOriginal(Select[4](Ident[5](scala.Predef), TypeName("String"))), TypeTree[4]().setOriginal(Select[4](Ident[5](scala.Predef), TypeName("String"))))))), termNames.CONSTRUCTOR), List()) +Apply[1](Select[2](New[1](TypeTree[1]().setOriginal(AppliedTypeTree(Ident[3](scala.collection.mutable.HashMap), List(TypeTree[4]().setOriginal(Select[4](Ident[5](scala.Predef), TypeName("String"))), TypeTree[4]().setOriginal(Select[4](Ident[5](scala.Predef), TypeName("String"))))))), termNames.CONSTRUCTOR), List()) +[1] TypeRef(ThisType(scala.collection.mutable), scala.collection.mutable.HashMap, List(TypeRef(SingleType(ThisType(scala), scala.Predef), TypeName("String"), List()), TypeRef(SingleType(ThisType(scala), scala.Predef), TypeName("String"), List()))) +[2] MethodType(List(), TypeRef(ThisType(scala.collection.mutable), scala.collection.mutable.HashMap, List(TypeRef(SingleType(ThisType(scala), scala.Predef), TypeName("String"), List()), TypeRef(SingleType(ThisType(scala), scala.Predef), TypeName("String"), List())))) +[3] TypeRef(ThisType(scala.collection.mutable), scala.collection.mutable.HashMap, List()) [4] TypeRef(SingleType(ThisType(scala), scala.Predef), TypeName("String"), List()) [5] SingleType(ThisType(scala), scala.Predef) -[6] TypeRef(ThisType(scala.collection.mutable), scala.collection.mutable.HashMap, List(TypeRef(SingleType(ThisType(scala), scala.Predef), TypeName("String"), List()), TypeRef(SingleType(ThisType(scala), scala.Predef), TypeName("String"), List()))) -[7] MethodType(List(), TypeRef(ThisType(scala.collection.mutable), scala.collection.mutable.HashMap, List(TypeRef(SingleType(ThisType(scala), scala.Predef), TypeName("String"), List()), TypeRef(SingleType(ThisType(scala), scala.Predef), TypeName("String"), List())))) -[8] TypeRef(ThisType(scala.collection.mutable), scala.collection.mutable.HashMap, List()) diff --git a/test/files/run/showraw_tree_ultimate.check b/test/files/run/showraw_tree_ultimate.check index 81efcc05ab..b94d568a75 100644 --- a/test/files/run/showraw_tree_ultimate.check +++ b/test/files/run/showraw_tree_ultimate.check @@ -4,9 +4,9 @@ Apply[1](Select[2](New[1](TypeTree[1]().setOriginal(AppliedTypeTree(Ident[3](sca [3] TypeRef(ThisType(scala.collection.immutable#<id>#PKC), scala.collection.immutable.HashMap#<id>#CLS, List()) [4] TypeRef(SingleType(ThisType(scala#<id>#PKC), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List()) [5] SingleType(ThisType(scala#<id>#PKC), scala.Predef#<id>#MOD) -Apply[6](Select[7](New[6](TypeTree[6]().setOriginal(AppliedTypeTree(Ident[8](scala.collection.mutable.HashMap#<id>#CLS), List(TypeTree[4]().setOriginal(Select[4](Ident[5](scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE)), TypeTree[4]().setOriginal(Select[4](Ident[5](scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE)))))), termNames.CONSTRUCTOR#<id>#CTOR), List()) +Apply[1](Select[2](New[1](TypeTree[1]().setOriginal(AppliedTypeTree(Ident[3](scala.collection.mutable.HashMap#<id>#CLS), List(TypeTree[4]().setOriginal(Select[4](Ident[5](scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE)), TypeTree[4]().setOriginal(Select[4](Ident[5](scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE)))))), termNames.CONSTRUCTOR#<id>#CTOR), List()) +[1] TypeRef(ThisType(scala.collection.mutable#<id>#PKC), scala.collection.mutable.HashMap#<id>#CLS, List(TypeRef(SingleType(ThisType(scala#<id>#PKC), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List()), TypeRef(SingleType(ThisType(scala#<id>#PKC), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List()))) +[2] MethodType(List(), TypeRef(ThisType(scala.collection.mutable#<id>#PKC), scala.collection.mutable.HashMap#<id>#CLS, List(TypeRef(SingleType(ThisType(scala#<id>#PKC), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List()), TypeRef(SingleType(ThisType(scala#<id>#PKC), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List())))) +[3] TypeRef(ThisType(scala.collection.mutable#<id>#PKC), scala.collection.mutable.HashMap#<id>#CLS, List()) [4] TypeRef(SingleType(ThisType(scala#<id>#PKC), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List()) [5] SingleType(ThisType(scala#<id>#PKC), scala.Predef#<id>#MOD) -[6] TypeRef(ThisType(scala.collection.mutable#<id>#PKC), scala.collection.mutable.HashMap#<id>#CLS, List(TypeRef(SingleType(ThisType(scala#<id>#PKC), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List()), TypeRef(SingleType(ThisType(scala#<id>#PKC), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List()))) -[7] MethodType(List(), TypeRef(ThisType(scala.collection.mutable#<id>#PKC), scala.collection.mutable.HashMap#<id>#CLS, List(TypeRef(SingleType(ThisType(scala#<id>#PKC), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List()), TypeRef(SingleType(ThisType(scala#<id>#PKC), scala.Predef#<id>#MOD), TypeName("String")#<id>#TPE, List())))) -[8] TypeRef(ThisType(scala.collection.mutable#<id>#PKC), scala.collection.mutable.HashMap#<id>#CLS, List()) diff --git a/test/files/run/stringinterpolation_macro-run.check b/test/files/run/stringinterpolation_macro-run.check deleted file mode 100644 index c7f46bac87..0000000000 --- a/test/files/run/stringinterpolation_macro-run.check +++ /dev/null @@ -1,71 +0,0 @@ -false -false -true -false -true -FALSE -FALSE -TRUE -FALSE -TRUE -true -false -null -0 -80000000 -4c01926 -NULL -4C01926 -null -NULL -Scala -SCALA -5 -x -x -x -x -x -x -x -x -x -x -x -x -S -120 -120 -120 -120 -120 -120 -120 -120 -120 -120 -120 -120 - 0X4 -She is 4 feet tall. -120 -42 -3.400000e+00 -3.400000e+00 -3.400000e+00 -3.400000e+00 -3.400000e+00 -3.400000e+00 -3.000000e+00 -3.000000e+00 -05/26/12 -05/26/12 -05/26/12 -05/26/12 -% - mind ------- -matter - -7 7 9 -7 9 9 diff --git a/test/files/run/stringinterpolation_macro-run.scala b/test/files/run/stringinterpolation_macro-run.scala deleted file mode 100644 index ae7c0e5d7a..0000000000 --- a/test/files/run/stringinterpolation_macro-run.scala +++ /dev/null @@ -1,122 +0,0 @@ -/* - * filter: inliner warnings; re-run with - */ -object Test extends App { - -// 'b' / 'B' (category: general) -// ----------------------------- -println(f"${null}%b") -println(f"${false}%b") -println(f"${true}%b") -println(f"${new java.lang.Boolean(false)}%b") -println(f"${new java.lang.Boolean(true)}%b") - -println(f"${null}%B") -println(f"${false}%B") -println(f"${true}%B") -println(f"${new java.lang.Boolean(false)}%B") -println(f"${new java.lang.Boolean(true)}%B") - -implicit val stringToBoolean = java.lang.Boolean.parseBoolean(_: String) -println(f"${"true"}%b") -println(f"${"false"}%b") - -// 'h' | 'H' (category: general) -// ----------------------------- -println(f"${null}%h") -println(f"${0.0}%h") -println(f"${-0.0}%h") -println(f"${"Scala"}%h") - -println(f"${null}%H") -println(f"${"Scala"}%H") - -// 's' | 'S' (category: general) -// ----------------------------- -println(f"${null}%s") -println(f"${null}%S") -println(f"${"Scala"}%s") -println(f"${"Scala"}%S") -println(f"${5}") - -// 'c' | 'C' (category: character) -// ------------------------------- -println(f"${120:Char}%c") -println(f"${120:Byte}%c") -println(f"${120:Short}%c") -println(f"${120:Int}%c") -println(f"${new java.lang.Character('x')}%c") -println(f"${new java.lang.Byte(120:Byte)}%c") -println(f"${new java.lang.Short(120:Short)}%c") -println(f"${new java.lang.Integer(120)}%c") - -println(f"${'x' : java.lang.Character}%c") -println(f"${(120:Byte) : java.lang.Byte}%c") -println(f"${(120:Short) : java.lang.Short}%c") -println(f"${120 : java.lang.Integer}%c") - -implicit val stringToChar = (x: String) => x(0) -println(f"${"Scala"}%c") - -// 'd' | 'o' | 'x' | 'X' (category: integral) -// ------------------------------------------ -println(f"${120:Byte}%d") -println(f"${120:Short}%d") -println(f"${120:Int}%d") -println(f"${120:Long}%d") -println(f"${new java.lang.Byte(120:Byte)}%d") -println(f"${new java.lang.Short(120:Short)}%d") -println(f"${new java.lang.Integer(120)}%d") -println(f"${new java.lang.Long(120)}%d") -println(f"${120 : java.lang.Integer}%d") -println(f"${120 : java.lang.Long}%d") -println(f"${BigInt(120)}%d") -println(f"${new java.math.BigInteger("120")}%d") -println(f"${4}%#10X") - -locally { - val fff = new java.util.Formattable { - def formatTo(f: java.util.Formatter, g: Int, w: Int, p: Int) = f.format("4") - } - println(f"She is ${fff}%#s feet tall.") -} - -{ - implicit val strToShort = (s: String) => java.lang.Short.parseShort(s) - println(f"${"120"}%d") - implicit val strToInt = (s: String) => 42 - println(f"${"120"}%d") -} - -// 'e' | 'E' | 'g' | 'G' | 'f' | 'a' | 'A' (category: floating point) -// ------------------------------------------------------------------ -println(f"${3.4f}%e") -println(f"${3.4}%e") -println(f"${3.4f : java.lang.Float}%e") -println(f"${3.4 : java.lang.Double}%e") -println(f"${BigDecimal(3.4)}%e") -println(f"${new java.math.BigDecimal(3.4)}%e") -println(f"${3}%e") -println(f"${3L}%e") - -// 't' | 'T' (category: date/time) -// ------------------------------- -import java.util.Calendar -import java.util.Locale -val c = Calendar.getInstance(Locale.US) -c.set(2012, Calendar.MAY, 26) -println(f"${c}%TD") -println(f"${c.getTime}%TD") -println(f"${c.getTime.getTime}%TD") - -implicit val strToDate = (x: String) => c -println(f"""${"1234"}%TD""") - - -// literals and arg indexes -println(f"%%") -println(f" mind%n------%nmatter%n") -println(f"${7}%d %<d ${9}%d") -println(f"${7}%d %2$$d ${9}%d") - -} diff --git a/test/files/run/synchronized.check b/test/files/run/synchronized.check index dd9f4ef424..a7d75fa673 100644 --- a/test/files/run/synchronized.check +++ b/test/files/run/synchronized.check @@ -62,67 +62,67 @@ |.... O1.O.gi: OK |...... O1.O.gv: OK |...... O1.O.gf: OK - .|..... c2.f1: OK - .|..... c2.fi: OK - .|....... c2.fv: OK - .|....... c2.ff: OK - .|..... c2.fl: OK - .|....... c2.fo: OK - |....... c2.g1: OK - |....... c2.gi: OK - |......... c2.gv: OK - |......... c2.gf: OK - .|........ c2.c.f1: OK - .|........ c2.c.fi: OK - .|.......... c2.c.fv: OK - .|.......... c2.c.ff: OK - .|........ c2.c.fl: OK - .|.......... c2.c.fo: OK - .|....... c2.c.fn: OK - |......... c2.c.g1: OK - |......... c2.c.gi: OK - |........... c2.c.gv: OK - |........... c2.c.gf: OK - .|........ c2.O.f1: OK - .|........ c2.O.fi: OK - .|.......... c2.O.fv: OK - .|.......... c2.O.ff: OK - .|........ c2.O.fl: OK - .|.......... c2.O.fo: OK - .|....... c2.O.fn: OK - |......... c2.O.g1: OK - |......... c2.O.gi: OK - |........... c2.O.gv: OK - |........... c2.O.gf: OK - .|..... O2.f1: OK - .|..... O2.fi: OK - .|....... O2.fv: OK - .|....... O2.ff: OK - .|..... O2.fl: OK - .|....... O2.fo: OK - |....... O2.g1: OK - |....... O2.gi: OK - |......... O2.gv: OK - |......... O2.gf: OK - .|........ O2.c.f1: OK - .|........ O2.c.fi: OK - .|.......... O2.c.fv: OK - .|.......... O2.c.ff: OK - .|........ O2.c.fl: OK - .|.......... O2.c.fo: OK - .|....... O2.c.fn: OK - |......... O2.c.g1: OK - |......... O2.c.gi: OK - |........... O2.c.gv: OK - |........... O2.c.gf: OK - .|........ O2.O.f1: OK - .|........ O2.O.fi: OK - .|.......... O2.O.fv: OK - .|.......... O2.O.ff: OK - .|........ O2.O.fl: OK - .|.......... O2.O.fo: OK - .|....... O2.O.fn: OK - |......... O2.O.g1: OK - |......... O2.O.gi: OK - |........... O2.O.gv: OK - |........... O2.O.gf: OK + .|.... c2.f1: OK + .|.... c2.fi: OK + .|...... c2.fv: OK + .|...... c2.ff: OK + .|.... c2.fl: OK + .|...... c2.fo: OK + |...... c2.g1: OK + |...... c2.gi: OK + |........ c2.gv: OK + |........ c2.gf: OK + .|....... c2.c.f1: OK + .|....... c2.c.fi: OK + .|......... c2.c.fv: OK + .|......... c2.c.ff: OK + .|....... c2.c.fl: OK + .|......... c2.c.fo: OK + .|...... c2.c.fn: OK + |........ c2.c.g1: OK + |........ c2.c.gi: OK + |.......... c2.c.gv: OK + |.......... c2.c.gf: OK + .|....... c2.O.f1: OK + .|....... c2.O.fi: OK + .|......... c2.O.fv: OK + .|......... c2.O.ff: OK + .|....... c2.O.fl: OK + .|......... c2.O.fo: OK + .|...... c2.O.fn: OK + |........ c2.O.g1: OK + |........ c2.O.gi: OK + |.......... c2.O.gv: OK + |.......... c2.O.gf: OK + .|.... O2.f1: OK + .|.... O2.fi: OK + .|...... O2.fv: OK + .|...... O2.ff: OK + .|.... O2.fl: OK + .|...... O2.fo: OK + |...... O2.g1: OK + |...... O2.gi: OK + |........ O2.gv: OK + |........ O2.gf: OK + .|....... O2.c.f1: OK + .|....... O2.c.fi: OK + .|......... O2.c.fv: OK + .|......... O2.c.ff: OK + .|....... O2.c.fl: OK + .|......... O2.c.fo: OK + .|...... O2.c.fn: OK + |........ O2.c.g1: OK + |........ O2.c.gi: OK + |.......... O2.c.gv: OK + |.......... O2.c.gf: OK + .|....... O2.O.f1: OK + .|....... O2.O.fi: OK + .|......... O2.O.fv: OK + .|......... O2.O.ff: OK + .|....... O2.O.fl: OK + .|......... O2.O.fo: OK + .|...... O2.O.fn: OK + |........ O2.O.g1: OK + |........ O2.O.gi: OK + |.......... O2.O.gv: OK + |.......... O2.O.gf: OK diff --git a/test/files/run/synchronized.flags b/test/files/run/synchronized.flags index 49d036a887..19c578e4ad 100644 --- a/test/files/run/synchronized.flags +++ b/test/files/run/synchronized.flags @@ -1 +1 @@ --optimize +-Yopt:l:project diff --git a/test/files/run/synchronized.scala b/test/files/run/synchronized.scala index 077e9d02e8..6be0d64dd8 100644 --- a/test/files/run/synchronized.scala +++ b/test/files/run/synchronized.scala @@ -201,88 +201,86 @@ object O1 { trait T { import Util._ - val Tclass = Class.forName("T$class") - val lock = new AnyRef - def f1 = synchronized { checkLocks(this)(this.getClass, classOf[T], Tclass, classOf[C2], O2.getClass) } - @inline final def fi = synchronized { checkLocks(this)(this.getClass, classOf[T], Tclass, classOf[C2], O2.getClass) } - val fv: () => Boolean = () => synchronized { checkLocks(this)(this.getClass, fv, fv.getClass, classOf[T], Tclass, classOf[C2], O2.getClass) } + def f1 = synchronized { checkLocks(this)(this.getClass, classOf[T], classOf[C2], O2.getClass) } + @inline final def fi = synchronized { checkLocks(this)(this.getClass, classOf[T], classOf[C2], O2.getClass) } + val fv: () => Boolean = () => synchronized { checkLocks(this)(this.getClass, fv, fv.getClass, classOf[T], classOf[C2], O2.getClass) } def ff = { - lazy val ffv: AnyRef => Boolean = lock => synchronized { checkLocks(lock)(ffv, ffv.getClass, lock.getClass, classOf[T], Tclass, classOf[C2], O2.getClass) } + lazy val ffv: AnyRef => Boolean = lock => synchronized { checkLocks(lock)(ffv, ffv.getClass, lock.getClass, classOf[T], classOf[C2], O2.getClass) } ffv(this) } def fl = { - lazy val flv = synchronized { checkLocks(this)(this.getClass, classOf[T], Tclass, classOf[C2], O2.getClass) } + lazy val flv = synchronized { checkLocks(this)(this.getClass, classOf[T], classOf[C2], O2.getClass) } flv } - def fo = lock.synchronized { checkLocks(lock)(lock.getClass, this, this.getClass, classOf[T], Tclass, classOf[C2], O2.getClass) } + def fo = lock.synchronized { checkLocks(lock)(lock.getClass, this, this.getClass, classOf[T], classOf[C2], O2.getClass) } - def g1 = checkLocks()(this, this.getClass, classOf[T], Tclass, classOf[C2], O2, O2.getClass) - @inline final def gi = checkLocks()(this, this.getClass, classOf[T], Tclass, classOf[C2], O2, O2.getClass) - val gv: () => Boolean = () => checkLocks()(this, this.getClass, gv, gv.getClass, classOf[T], Tclass, classOf[C2], O2, O2.getClass) + def g1 = checkLocks()(this, this.getClass, classOf[T], classOf[C2], O2, O2.getClass) + @inline final def gi = checkLocks()(this, this.getClass, classOf[T], classOf[C2], O2, O2.getClass) + val gv: () => Boolean = () => checkLocks()(this, this.getClass, gv, gv.getClass, classOf[T], classOf[C2], O2, O2.getClass) def gf = { - lazy val gfv: AnyRef => Boolean = lock => checkLocks()(gfv, gfv.getClass, lock, lock.getClass, classOf[T], Tclass, classOf[C2], O2, O2.getClass) + lazy val gfv: AnyRef => Boolean = lock => checkLocks()(gfv, gfv.getClass, lock, lock.getClass, classOf[T], classOf[C2], O2, O2.getClass) gfv(this) } def gl = { - lazy val glv = checkLocks()(this, this.getClass, classOf[T], Tclass, classOf[C2], O2.getClass) + lazy val glv = checkLocks()(this, this.getClass, classOf[T], classOf[C2], O2.getClass) glv } class C { - def f1 = synchronized { checkLocks(this)(this.getClass, T.this, T.this.getClass, classOf[T], Tclass, classOf[C2], O2, O2.getClass) } - @inline final def fi = synchronized { checkLocks(this)(this.getClass, T.this, T.this.getClass, classOf[T], Tclass, classOf[C2], O2, O2.getClass) } - val fv: () => Boolean = () => synchronized { checkLocks(this)(this.getClass, T.this, T.this.getClass, fv, fv.getClass, classOf[T], Tclass, classOf[C2], O2, O2.getClass) } + def f1 = synchronized { checkLocks(this)(this.getClass, T.this, T.this.getClass, classOf[T], classOf[C2], O2, O2.getClass) } + @inline final def fi = synchronized { checkLocks(this)(this.getClass, T.this, T.this.getClass, classOf[T], classOf[C2], O2, O2.getClass) } + val fv: () => Boolean = () => synchronized { checkLocks(this)(this.getClass, T.this, T.this.getClass, fv, fv.getClass, classOf[T], classOf[C2], O2, O2.getClass) } def ff = { - lazy val ffv: AnyRef => Boolean = lock => synchronized { checkLocks(lock)(ffv, ffv.getClass, lock.getClass, T.this, T.this.getClass, classOf[T], Tclass, classOf[C2], O2, O2.getClass) } + lazy val ffv: AnyRef => Boolean = lock => synchronized { checkLocks(lock)(ffv, ffv.getClass, lock.getClass, T.this, T.this.getClass, classOf[T], classOf[C2], O2, O2.getClass) } ffv(this) } def fl = { - lazy val flv = synchronized { checkLocks(this)(this.getClass, T.this, T.this.getClass, classOf[T], Tclass, classOf[C2], O2, O2.getClass) } + lazy val flv = synchronized { checkLocks(this)(this.getClass, T.this, T.this.getClass, classOf[T], classOf[C2], O2, O2.getClass) } flv } - def fo = lock.synchronized { checkLocks(lock)(lock.getClass, this, this.getClass, T.this, T.this.getClass, classOf[T], Tclass, classOf[C2], O2, O2.getClass) } - def fn = T.this.synchronized { checkLocks(T.this)(T.this.getClass, this, this.getClass, classOf[T], Tclass, classOf[C2], O2.getClass) } + def fo = lock.synchronized { checkLocks(lock)(lock.getClass, this, this.getClass, T.this, T.this.getClass, classOf[T], classOf[C2], O2, O2.getClass) } + def fn = T.this.synchronized { checkLocks(T.this)(T.this.getClass, this, this.getClass, classOf[T], classOf[C2], O2.getClass) } - def g1 = checkLocks()(this, this.getClass, T.this, T.this.getClass, classOf[T], Tclass, classOf[C2], O2, O2.getClass) - @inline final def gi = checkLocks()(this, this.getClass, T.this, T.this.getClass, classOf[T], Tclass, classOf[C2], O2, O2.getClass) - val gv: () => Boolean = () => checkLocks()(this, this.getClass, T.this, T.this.getClass, gv, gv.getClass, classOf[T], Tclass, classOf[C2], O2, O2.getClass) + def g1 = checkLocks()(this, this.getClass, T.this, T.this.getClass, classOf[T], classOf[C2], O2, O2.getClass) + @inline final def gi = checkLocks()(this, this.getClass, T.this, T.this.getClass, classOf[T], classOf[C2], O2, O2.getClass) + val gv: () => Boolean = () => checkLocks()(this, this.getClass, T.this, T.this.getClass, gv, gv.getClass, classOf[T], classOf[C2], O2, O2.getClass) def gf = { - lazy val gfv: AnyRef => Boolean = lock => checkLocks()(gfv, gfv.getClass, lock, lock.getClass, T.this, T.this.getClass, classOf[T], Tclass, classOf[C2], O2, O2.getClass) + lazy val gfv: AnyRef => Boolean = lock => checkLocks()(gfv, gfv.getClass, lock, lock.getClass, T.this, T.this.getClass, classOf[T], classOf[C2], O2, O2.getClass) gfv(this) } def gl = { - lazy val glv = checkLocks()(this, this.getClass, T.this, T.this.getClass, classOf[T], Tclass, classOf[C2], O2, O2.getClass) + lazy val glv = checkLocks()(this, this.getClass, T.this, T.this.getClass, classOf[T], classOf[C2], O2, O2.getClass) glv } } val c = new C object O { - def f1 = synchronized { checkLocks(this)(this.getClass, T.this, T.this.getClass, classOf[T], Tclass, classOf[C2], O2, O2.getClass) } - @inline final def fi = synchronized { checkLocks(this)(this.getClass, T.this, T.this.getClass, classOf[T], Tclass, classOf[C2], O2, O2.getClass) } - val fv: () => Boolean = () => synchronized { checkLocks(this)(this.getClass, fv, fv.getClass, T.this, T.this.getClass, classOf[T], Tclass, classOf[C2], O2, O2.getClass) } + def f1 = synchronized { checkLocks(this)(this.getClass, T.this, T.this.getClass, classOf[T], classOf[C2], O2, O2.getClass) } + @inline final def fi = synchronized { checkLocks(this)(this.getClass, T.this, T.this.getClass, classOf[T], classOf[C2], O2, O2.getClass) } + val fv: () => Boolean = () => synchronized { checkLocks(this)(this.getClass, fv, fv.getClass, T.this, T.this.getClass, classOf[T], classOf[C2], O2, O2.getClass) } def ff = { - lazy val ffv: AnyRef => Boolean = lock => synchronized { checkLocks(lock)(lock.getClass, ffv, ffv.getClass, T.this, T.this.getClass, classOf[T], Tclass, classOf[C2], O2, O2.getClass) } + lazy val ffv: AnyRef => Boolean = lock => synchronized { checkLocks(lock)(lock.getClass, ffv, ffv.getClass, T.this, T.this.getClass, classOf[T], classOf[C2], O2, O2.getClass) } ffv(this) } def fl = { - lazy val flv = synchronized { checkLocks(this)(this.getClass, T.this, T.this.getClass, classOf[T], Tclass, classOf[C2], O2, O2.getClass) } + lazy val flv = synchronized { checkLocks(this)(this.getClass, T.this, T.this.getClass, classOf[T], classOf[C2], O2, O2.getClass) } flv } - def fo = lock.synchronized { checkLocks(lock)(lock.getClass, this, this.getClass, T.this, T.this.getClass, classOf[T], Tclass, classOf[C2], O2, O2.getClass) } - def fn = T.this.synchronized { checkLocks(T.this)(T.this.getClass, this, this.getClass, classOf[T], Tclass, classOf[C2], O2.getClass) } + def fo = lock.synchronized { checkLocks(lock)(lock.getClass, this, this.getClass, T.this, T.this.getClass, classOf[T], classOf[C2], O2, O2.getClass) } + def fn = T.this.synchronized { checkLocks(T.this)(T.this.getClass, this, this.getClass, classOf[T], classOf[C2], O2.getClass) } - def g1 = checkLocks()(this, this.getClass, T.this, T.this.getClass, classOf[T], Tclass, classOf[C2], O2, O2.getClass) - @inline final def gi = checkLocks()(this, this.getClass, T.this, T.this.getClass, classOf[T], Tclass, classOf[C2], O2, O2.getClass) - val gv: () => Boolean = () => checkLocks()(this, this.getClass, gv, gv.getClass, T.this, T.this.getClass, classOf[T], Tclass, classOf[C2], O2, O2.getClass) + def g1 = checkLocks()(this, this.getClass, T.this, T.this.getClass, classOf[T], classOf[C2], O2, O2.getClass) + @inline final def gi = checkLocks()(this, this.getClass, T.this, T.this.getClass, classOf[T], classOf[C2], O2, O2.getClass) + val gv: () => Boolean = () => checkLocks()(this, this.getClass, gv, gv.getClass, T.this, T.this.getClass, classOf[T], classOf[C2], O2, O2.getClass) def gf = { - lazy val gfv: AnyRef => Boolean = lock => checkLocks()(lock, lock.getClass, gfv, gfv.getClass, T.this, T.this.getClass, classOf[T], Tclass, classOf[C2], O2, O2.getClass) + lazy val gfv: AnyRef => Boolean = lock => checkLocks()(lock, lock.getClass, gfv, gfv.getClass, T.this, T.this.getClass, classOf[T], classOf[C2], O2, O2.getClass) gfv(this) } def gl = { - lazy val glv = checkLocks()(this, this.getClass, T.this, T.this.getClass, classOf[T], Tclass, classOf[C2], O2, O2.getClass) + lazy val glv = checkLocks()(this, this.getClass, T.this, T.this.getClass, classOf[T], classOf[C2], O2, O2.getClass) glv } } @@ -449,4 +447,4 @@ object Test extends App { check("O2.O.gv", O2.O.gv()) check("O2.O.gf", O2.O.gf) // check("O2.O.gl", O2.O.gl) -}
\ No newline at end of file +} diff --git a/test/files/run/t2106.check b/test/files/run/t2106.check index 66a0e707b3..c8ebe575f0 100644 --- a/test/files/run/t2106.check +++ b/test/files/run/t2106.check @@ -1,13 +1,5 @@ -#partest -Ybackend:GenBCode t2106.scala:7: warning: A::foo()Ljava/lang/Object; is annotated @inline but could not be inlined: -The callee A::foo()Ljava/lang/Object; contains the instruction INVOKEVIRTUAL java/lang/Object.clone ()Ljava/lang/Object; +The callee A::foo()Ljava/lang/Object; contains the instruction INVOKEVIRTUAL A.clone ()Ljava/lang/Object; that would cause an IllegalAccessError when inlined into class Test$. def main(args: Array[String]): Unit = x.foo ^ -#partest !-Ybackend:GenBCode -t2106.scala:7: warning: Could not inline required method foo because access level required by callee not matched by caller. - def main(args: Array[String]): Unit = x.foo - ^ -t2106.scala:7: warning: At the end of the day, could not inline @inline-marked method foo - def main(args: Array[String]): Unit = x.foo - ^ diff --git a/test/files/run/t2106.flags b/test/files/run/t2106.flags index a2e413bb22..b0139685fa 100644 --- a/test/files/run/t2106.flags +++ b/test/files/run/t2106.flags @@ -1 +1 @@ --optimise -Yinline-warnings -Yopt:l:classpath +-Yopt-warnings -Yopt:l:classpath diff --git a/test/files/run/t2251b.check b/test/files/run/t2251b.check index 4231fc6ea6..b60698d605 100644 --- a/test/files/run/t2251b.check +++ b/test/files/run/t2251b.check @@ -1,4 +1,4 @@ -TypeTag[List[scala.collection.immutable.LinearSeq[B[_ >: D with C <: B[_ >: D with C <: A]]] with scala.collection.AbstractSeq[B[_ >: D with C <: B[_ >: D with C <: A]]] with java.io.Serializable]] +TypeTag[List[scala.collection.immutable.LinearSeq[B[_ >: D with C <: B[_ >: D with C <: A]]] with scala.collection.AbstractSeq[B[_ >: D with C <: B[_ >: D with C <: A]]] with Serializable]] TypeTag[List[scala.collection.immutable.Iterable[B[_ >: F with E with D with C <: B[_ >: F with E with D with C <: A]]] with F with Int => Any]] TypeTag[List[scala.collection.immutable.Seq[B[_ >: D with C <: B[_ >: D with C <: A]]] with scala.collection.AbstractSeq[B[_ >: D with C <: B[_ >: D with C <: A]]] with Serializable]] TypeTag[List[scala.collection.Set[_ >: G with F <: B[_ >: G with F <: B[_ >: G with F <: A]]]]] @@ -6,6 +6,6 @@ TypeTag[List[scala.collection.Set[_ >: G with F <: B[_ >: G with F <: B[_ >: G w TypeTag[List[scala.collection.Set[_ >: G with F <: B[_ >: G with F <: B[_ >: G with F <: A]]]]] TypeTag[List[Seq[B[_ >: G with F <: B[_ >: G with F <: A]]]]] TypeTag[List[scala.collection.Map[_ >: F with C <: B[_ >: F with C <: B[_ >: F with C <: A]], B[_ >: G with D <: B[_ >: G with D <: A]]]]] -TypeTag[List[scala.collection.AbstractSeq[B[_ >: G with F <: B[_ >: G with F <: A]]] with scala.collection.LinearSeq[B[_ >: G with F <: B[_ >: G with F <: A]]] with java.io.Serializable]] +TypeTag[List[scala.collection.AbstractSeq[B[_ >: G with F <: B[_ >: G with F <: A]]] with scala.collection.LinearSeq[B[_ >: G with F <: B[_ >: G with F <: A]]] with Serializable]] TypeTag[List[Seq[B[_ >: G with F <: B[_ >: G with F <: A]]]]] TypeTag[List[Seq[B[_ >: G with F <: B[_ >: G with F <: A]]]]] diff --git a/test/files/run/t3126.scala b/test/files/run/t3126.scala index 36322bf896..865047ce4f 100644 --- a/test/files/run/t3126.scala +++ b/test/files/run/t3126.scala @@ -4,6 +4,6 @@ object Test { def main(args: Array[String]): Unit = { try C.unapply(null) catch { case _: MatchError => } - try v match { case Some(1) => } catch { case _: MatchError => } + try ((v: @unchecked) match { case Some(1) => }) catch { case _: MatchError => } } } diff --git a/test/files/run/t3158.scala b/test/files/run/t3158.scala index c824b62e96..1e5ec186f5 100644 --- a/test/files/run/t3158.scala +++ b/test/files/run/t3158.scala @@ -1,6 +1,6 @@ object Test { def main(args: Array[String]) { - println(args.map(_ => foo _).deep) + println(args.map(_ => foo _).map(_ => "<function1>").deep) } def foo(xs: String*) { diff --git a/test/files/run/t3368-c.check b/test/files/run/t3368-c.check index e0c10cc0dd..4cbe98c577 100644 --- a/test/files/run/t3368-c.check +++ b/test/files/run/t3368-c.check @@ -6,8 +6,8 @@ package <empty> { }; def x = { val $buf = new _root_.scala.xml.NodeBuffer(); - $buf.$amp$plus(new _root_.scala.xml.Text("hi & bye")); - $buf.$amp$plus(new _root_.scala.xml.Text("red & black")); + $buf.$amp$plus(new _root_.scala.xml.PCData("hi & bye")); + $buf.$amp$plus(new _root_.scala.xml.PCData("red & black")); $buf } }; @@ -24,7 +24,8 @@ package <empty> { new _root_.scala.xml.Elem(null, "b", _root_.scala.xml.Null, $scope, true) } }); - $buf.$amp$plus(new _root_.scala.xml.Text("starthi & bye")); + $buf.$amp$plus(new _root_.scala.xml.Text("start")); + $buf.$amp$plus(new _root_.scala.xml.PCData("hi & bye")); $buf.$amp$plus({ { new _root_.scala.xml.Elem(null, "c", _root_.scala.xml.Null, $scope, true) @@ -36,7 +37,8 @@ package <empty> { new _root_.scala.xml.Elem(null, "d", _root_.scala.xml.Null, $scope, true) } }); - $buf.$amp$plus(new _root_.scala.xml.Text("stuffred & black")); + $buf.$amp$plus(new _root_.scala.xml.Text("stuff")); + $buf.$amp$plus(new _root_.scala.xml.PCData("red & black")); $buf }: _*)) } @@ -46,18 +48,19 @@ package <empty> { def $init$() = { () }; - def d = new _root_.scala.xml.Text("hello, world"); + def d = new _root_.scala.xml.PCData("hello, world"); def e = { val $buf = new _root_.scala.xml.NodeBuffer(); - $buf.$amp$plus(new _root_.scala.xml.Text("hello, world")); - $buf.$amp$plus(new _root_.scala.xml.Text("hello, world")); + $buf.$amp$plus(new _root_.scala.xml.PCData("hello, world")); + $buf.$amp$plus(new _root_.scala.xml.PCData("hello, world")); $buf }; def f = { { new _root_.scala.xml.Elem(null, "foo", _root_.scala.xml.Null, $scope, false, ({ val $buf = new _root_.scala.xml.NodeBuffer(); - $buf.$amp$plus(new _root_.scala.xml.Text("xhello, world")); + $buf.$amp$plus(new _root_.scala.xml.Text("x")); + $buf.$amp$plus(new _root_.scala.xml.PCData("hello, world")); $buf }: _*)) } @@ -66,7 +69,7 @@ package <empty> { { new _root_.scala.xml.Elem(null, "foo", _root_.scala.xml.Null, $scope, false, ({ val $buf = new _root_.scala.xml.NodeBuffer(); - $buf.$amp$plus(new _root_.scala.xml.Text("hello, world")); + $buf.$amp$plus(new _root_.scala.xml.PCData("hello, world")); $buf }: _*)) } @@ -75,7 +78,8 @@ package <empty> { { new _root_.scala.xml.Elem(null, "foo", _root_.scala.xml.Null, $scope, false, ({ val $buf = new _root_.scala.xml.NodeBuffer(); - $buf.$amp$plus(new _root_.scala.xml.Text("hello, worldhello, world")); + $buf.$amp$plus(new _root_.scala.xml.PCData("hello, world")); + $buf.$amp$plus(new _root_.scala.xml.PCData("hello, world")); $buf }: _*)) } diff --git a/test/files/run/t3452b-bcode.check b/test/files/run/t3452b-bcode.check deleted file mode 100644 index 204c3d0437..0000000000 --- a/test/files/run/t3452b-bcode.check +++ /dev/null @@ -1,2 +0,0 @@ -Search received: test -SearchC received: test diff --git a/test/files/run/t3452b-bcode.flags b/test/files/run/t3452b-bcode.flags deleted file mode 100644 index c30091d3de..0000000000 --- a/test/files/run/t3452b-bcode.flags +++ /dev/null @@ -1 +0,0 @@ --Ybackend:GenBCode diff --git a/test/files/run/t3452b-bcode/J_2.java b/test/files/run/t3452b-bcode/J_2.java deleted file mode 100644 index 839f334508..0000000000 --- a/test/files/run/t3452b-bcode/J_2.java +++ /dev/null @@ -1,6 +0,0 @@ -public class J_2 { - public static void j() { - StringSearch.search("test"); - StringSearch.searchC("test"); - } -} diff --git a/test/files/run/t3452b-bcode/S_1.scala b/test/files/run/t3452b-bcode/S_1.scala deleted file mode 100644 index a209f12035..0000000000 --- a/test/files/run/t3452b-bcode/S_1.scala +++ /dev/null @@ -1,17 +0,0 @@ -trait Search[M] { - def search(input: M): C[Int] = { - println("Search received: " + input) - null - } -} - -class SearchC[M] { - def searchC(input: M): C[Int] = { - println("SearchC received: " + input) - null - } -} - -object StringSearch extends SearchC[String] with Search[String] - -trait C[T] diff --git a/test/files/run/t3509.flags b/test/files/run/t3509.flags index 6933d924d3..422d6be431 100644 --- a/test/files/run/t3509.flags +++ b/test/files/run/t3509.flags @@ -1 +1 @@ --Yinline
\ No newline at end of file +-Yopt:l:classpath
\ No newline at end of file diff --git a/test/files/run/t3569.flags b/test/files/run/t3569.flags index 6933d924d3..422d6be431 100644 --- a/test/files/run/t3569.flags +++ b/test/files/run/t3569.flags @@ -1 +1 @@ --Yinline
\ No newline at end of file +-Yopt:l:classpath
\ No newline at end of file diff --git a/test/files/run/t4124.scala b/test/files/run/t4124.scala index 9f35b57ce3..db4e382634 100644 --- a/test/files/run/t4124.scala +++ b/test/files/run/t4124.scala @@ -2,22 +2,22 @@ import xml.Node object Test extends App { val body: Node = <elem>hi</elem> - println ((body: AnyRef, "foo") match { + println (((body: AnyRef, "foo"): @unchecked) match { case (node: Node, "bar") => "bye" case (ser: Serializable, "foo") => "hi" }) - println ((body, "foo") match { + println (((body, "foo"): @unchecked) match { case (node: Node, "bar") => "bye" case (ser: Serializable, "foo") => "hi" }) - println ((body: AnyRef, "foo") match { + println (((body: AnyRef, "foo"): @unchecked) match { case (node: Node, "foo") => "bye" case (ser: Serializable, "foo") => "hi" }) - println ((body: AnyRef, "foo") match { + println (((body: AnyRef, "foo"): @unchecked) match { case (node: Node, "foo") => "bye" case (ser: Serializable, "foo") => "hi" }) diff --git a/test/files/run/t4285.flags b/test/files/run/t4285.flags index eb4d19bcb9..422d6be431 100644 --- a/test/files/run/t4285.flags +++ b/test/files/run/t4285.flags @@ -1 +1 @@ --optimise
\ No newline at end of file +-Yopt:l:classpath
\ No newline at end of file diff --git a/test/files/run/t4332.scala b/test/files/run/t4332.scala index 5a67922911..1c7e7d73de 100644 --- a/test/files/run/t4332.scala +++ b/test/files/run/t4332.scala @@ -12,7 +12,7 @@ object Test extends DirectTest { } def isExempt(sym: Symbol) = { - val exempt = Set("view", "repr", "sliceWithKnownDelta", "sliceWithKnownBound", "transform") + val exempt = Set("view", "repr", "sliceWithKnownDelta", "sliceWithKnownBound", "transform", "filterImpl") (exempt contains sym.name.decoded) } diff --git a/test/files/run/t4891.check b/test/files/run/t4891.check index 79fd7f6fbb..1b1108e9ee 100644 --- a/test/files/run/t4891.check +++ b/test/files/run/t4891.check @@ -1,5 +1,6 @@ test.generic.T1 - (m) public abstract A test.generic.T1.t1(A) + (m) public default void test.generic.T1.$init$() + (m) public default A test.generic.T1.t1(A) test.generic.C1 (m) public void test.generic.C1.m1() test.generic.C2 diff --git a/test/files/run/t4935.flags b/test/files/run/t4935.flags index 49d036a887..65caa3736e 100644 --- a/test/files/run/t4935.flags +++ b/test/files/run/t4935.flags @@ -1 +1 @@ --optimize +-Yopt:l:classpath diff --git a/test/files/run/t5064.check b/test/files/run/t5064.check index 61ccfd16e7..f7d25a67e4 100644 --- a/test/files/run/t5064.check +++ b/test/files/run/t5064.check @@ -1,25 +1,26 @@ [53] T5064.super.<init>() [53] T5064.super.<init> [53] this -[16:23] immutable.this.List.apply(scala.this.Predef.wrapIntArray(Array[Int]{1})) -[16:20] immutable.this.List.apply -<16:20> immutable.this.List -<16:20> immutable.this -[16:23] scala.this.Predef.wrapIntArray(Array[Int]{1}) -[20] scala.this.Predef.wrapIntArray -[20] scala.this.Predef -[20] scala.this -[26:32] collection.this.Seq.apply(scala.this.Predef.wrapIntArray(Array[Int]{1})) -[26:29] collection.this.Seq.apply -<26:29> collection.this.Seq -<26:29> collection.this -[26:32] scala.this.Predef.wrapIntArray(Array[Int]{1}) -[29] scala.this.Predef.wrapIntArray -[29] scala.this.Predef -[29] scala.this -[35:39] immutable.this.List -<35:39> immutable.this -[42:45] collection.this.Seq -<42:45> collection.this -[48:51] immutable.this.Nil -<48:51> immutable.this +[16:23] scala.collection.immutable.List.apply(scala.Predef.wrapIntArray(Array[Int]{1})) +[16:20] scala.collection.immutable.List.apply +<16:20> scala.collection.immutable.List +<16:20> scala.collection.immutable +<16:20> scala.collection +[16:23] scala.Predef.wrapIntArray(Array[Int]{1}) +[20] scala.Predef.wrapIntArray +[20] scala.Predef +[26:32] scala.collection.Seq.apply(scala.Predef.wrapIntArray(Array[Int]{1})) +[26:29] scala.collection.Seq.apply +<26:29> scala.collection.Seq +<26:29> scala.collection +[26:32] scala.Predef.wrapIntArray(Array[Int]{1}) +[29] scala.Predef.wrapIntArray +[29] scala.Predef +[35:39] scala.collection.immutable.List +<35:39> scala.collection.immutable +<35:39> scala.collection +[42:45] scala.collection.Seq +<42:45> scala.collection +[48:51] scala.collection.immutable.Nil +<48:51> scala.collection.immutable +<48:51> scala.collection diff --git a/test/files/run/t5313.check b/test/files/run/t5313.check deleted file mode 100644 index 7a48b2b711..0000000000 --- a/test/files/run/t5313.check +++ /dev/null @@ -1,12 +0,0 @@ -STORE_LOCAL(variable kept1) -STORE_LOCAL(value result) -STORE_LOCAL(variable kept1) -STORE_LOCAL(variable kept2) -STORE_LOCAL(value kept3) -STORE_LOCAL(variable kept2) -STORE_LOCAL(variable kept4) -STORE_LOCAL(variable kept4) -STORE_LOCAL(variable kept5) -STORE_LOCAL(variable kept5) -STORE_LOCAL(variable kept6) -STORE_LOCAL(variable kept6) diff --git a/test/files/run/t5313.scala b/test/files/run/t5313.scala deleted file mode 100644 index 7f5af74c3f..0000000000 --- a/test/files/run/t5313.scala +++ /dev/null @@ -1,54 +0,0 @@ -import scala.tools.partest.IcodeComparison - -object Test extends IcodeComparison { - override def printIcodeAfterPhase = "dce" - - override def extraSettings: String = super.extraSettings + " -optimize" - - override def code = - """class Foo { - def randomBoolean = scala.util.Random.nextInt % 2 == 0 - def bar = { - var kept1 = new Object - val result = new java.lang.ref.WeakReference(kept1) - kept1 = null // we can't eliminate this assignment because result can observe - // when the object has no more references. See SI-5313 - kept1 = new Object // but we can eliminate this one because kept1 has already been clobbered - var erased2 = null // we can eliminate this store because it's never used - val erased3 = erased2 // and this - var erased4 = erased2 // and this - val erased5 = erased4 // and this - var kept2: Object = new Object // ultimately can't be eliminated - while(randomBoolean) { - val kept3 = kept2 - kept2 = null // this can't, because it clobbers kept2, which is used - erased4 = null // safe to eliminate - println(kept3) - } - var kept4 = new Object // have to keep, it's used - try - println(kept4) - catch { - case _ : Throwable => kept4 = null // have to keep, it clobbers kept4 which is used - } - var kept5 = new Object - print(kept5) - kept5 = null // can't eliminate it's a clobber and it's used - print(kept5) - kept5 = null // can eliminate because we don't care about clobbers of nulls - while(randomBoolean) { - var kept6: AnyRef = null // not used, but have to keep because it clobbers the next used store - // on the back edge of the loop - kept6 = new Object // used - println(kept6) - } - result - } - }""".stripMargin - - override def show() { - val storeLocal = "STORE_LOCAL" - val lines1 = collectIcode() filter (_ contains storeLocal) map (x => x.drop(x.indexOf(storeLocal))) - println(lines1 mkString "\n") - } -} diff --git a/test/files/run/t5375.check b/test/files/run/t5375.check index b1a57eeeec..e69de29bb2 100644 --- a/test/files/run/t5375.check +++ b/test/files/run/t5375.check @@ -1 +0,0 @@ -Runtime exception diff --git a/test/files/run/t5375.scala b/test/files/run/t5375.scala index 826ecd841e..2028b6f05d 100644 --- a/test/files/run/t5375.scala +++ b/test/files/run/t5375.scala @@ -1,8 +1,16 @@ object Test extends App { val foos = (1 to 1000).toSeq - try - foos.par.map(i => if (i % 37 == 0) sys.error("i div 37") else i) - catch { - case ex: RuntimeException => println("Runtime exception") + try { + foos.par.map(i => if (i % 37 == 0) throw new MultipleOf37Exception(i) else i) + assert(false) + } catch { + case ex: MultipleOf37Exception => + assert(ex.getSuppressed.size > 0) + assert(ex.getSuppressed.forall(_.isInstanceOf[MultipleOf37Exception])) + assert(ex.i == 37) + assert(ex.getSuppressed.map(_.asInstanceOf[MultipleOf37Exception].i).toList == List(74, 148, 259, 518)) + case _: Throwable => + assert(false) } + class MultipleOf37Exception(val i: Int) extends RuntimeException } diff --git a/test/files/run/t5535.scala b/test/files/run/t5535.scala index 7bc12f3470..2833b9c94b 100644 --- a/test/files/run/t5535.scala +++ b/test/files/run/t5535.scala @@ -7,4 +7,11 @@ println(h()(5)) val f = h() _ println(f(10)) """ + + // replace indylambda function names by <function1> + override def eval() = { + val lines = super.eval + val r = """\$\$Lambda.*""".r + lines.map(l => r.replaceAllIn(l, "<function1>")) + } } diff --git a/test/files/run/t5652.check b/test/files/run/t5652.check index 11438ef217..a0fb6fe9b4 100644 --- a/test/files/run/t5652.check +++ b/test/files/run/t5652.check @@ -1,8 +1,7 @@ -public static final int T1$class.g$1(T1) -public static int T1$class.f0(T1) -public static void T1$class.$init$(T1) +public default int T1.T1$$g$1() +public default int T1.f0() +public default void T1.$init$() public final int A1.A1$$g$2() public int A1.f1() public final int A2.A2$$g$1() -public int A2.f0() public int A2.f2() diff --git a/test/files/run/t5652/t5652_2.scala b/test/files/run/t5652/t5652_2.scala index 765d16f8f5..d1de937e31 100644 --- a/test/files/run/t5652/t5652_2.scala +++ b/test/files/run/t5652/t5652_2.scala @@ -4,6 +4,6 @@ class A2 extends A1 with T1{ object Test extends A2 { def main(args: Array[String]) { - println(Seq(Class.forName(classOf[T1].getName + "$class"), classOf[A1], classOf[A2]).flatMap(_.getDeclaredMethods.map(_.toString).sorted).mkString("\n")) + println(Seq(classOf[T1], classOf[A1], classOf[A2]).flatMap(_.getDeclaredMethods.map(_.toString).sorted).mkString("\n")) } } diff --git a/test/files/run/t5789.scala b/test/files/run/t5789.scala index 461f6a4aae..677c9ca229 100644 --- a/test/files/run/t5789.scala +++ b/test/files/run/t5789.scala @@ -5,10 +5,17 @@ import scala.tools.partest.ReplTest object Test extends ReplTest { - override def extraSettings = "-Yinline" + override def extraSettings = "-Yopt:l:classpath" def code = """ val n = 2 () => n """ + + // replace indylambda function names by <function0> + override def eval() = { + val lines = super.eval + val r = """\$\$Lambda.*""".r + lines.map(l => r.replaceAllIn(l, "<function0>")) + } } diff --git a/test/files/run/t5943a1.check b/test/files/run/t5943a1.check index 9f4d160af8..4b683a3da5 100644 --- a/test/files/run/t5943a1.check +++ b/test/files/run/t5943a1.check @@ -1 +1 @@ -scala.this.Predef.intWrapper(1).to(3).map[Int, scala.collection.immutable.IndexedSeq[Int]](((x$1: Int) => x$1.+(1)))(immutable.this.IndexedSeq.canBuildFrom[Int]) +scala.Predef.intWrapper(1).to(3).map[Int, scala.collection.immutable.IndexedSeq[Int]](((x$1: Int) => x$1.+(1)))(immutable.this.IndexedSeq.canBuildFrom[Int]) diff --git a/test/files/run/t6028.check b/test/files/run/t6028.check index edc8b22d6d..532d177300 100644 --- a/test/files/run/t6028.check +++ b/test/files/run/t6028.check @@ -38,28 +38,34 @@ package <empty> { <synthetic> <paramaccessor> private[this] val methodLocal$1: Int = _ }; abstract trait MethodLocalTrait$1 extends Object { + def /*MethodLocalTrait$1*/$init$(barParam$1: Int): Unit = { + () + }; + scala.Predef.print(scala.Int.box(barParam$1)); <synthetic> <stable> <artifact> def $outer(): T }; object MethodLocalObject$2 extends Object with T#MethodLocalTrait$1 { def <init>($outer: T, barParam$1: Int): T#MethodLocalObject$2.type = { MethodLocalObject$2.super.<init>(); - MethodLocalObject$2.this.$asInstanceOf[T#MethodLocalTrait$1$class]()./*MethodLocalTrait$1$class*/$init$(barParam$1); + MethodLocalObject$2.super./*MethodLocalTrait$1*/$init$(barParam$1); () }; <synthetic> <paramaccessor> <artifact> private[this] val $outer: T = _; <synthetic> <stable> <artifact> def $outer(): T = MethodLocalObject$2.this.$outer; <synthetic> <stable> <artifact> def $outer(): T = MethodLocalObject$2.this.$outer }; - final <stable> private[this] def MethodLocalObject$1(barParam$1: Int, MethodLocalObject$module$1: runtime.VolatileObjectRef): T#MethodLocalObject$2.type = { - MethodLocalObject$module$1.elem = new T#MethodLocalObject$2.type(T.this, barParam$1); + final <stable> private[this] def MethodLocalObject$lzycompute$1(barParam$1: Int, MethodLocalObject$module$1: runtime.VolatileObjectRef): T#MethodLocalObject$2.type = { + T.this.synchronized({ + if (MethodLocalObject$module$1.elem.$asInstanceOf[T#MethodLocalObject$2.type]().eq(null)) + MethodLocalObject$module$1.elem = new T#MethodLocalObject$2.type(T.this, barParam$1); + scala.runtime.BoxedUnit.UNIT + }); MethodLocalObject$module$1.elem.$asInstanceOf[T#MethodLocalObject$2.type]() }; - abstract trait MethodLocalTrait$1$class extends Object with T#MethodLocalTrait$1 { - def /*MethodLocalTrait$1$class*/$init$(barParam$1: Int): Unit = { - () - }; - scala.this.Predef.print(scala.Int.box(barParam$1)) - }; + final <stable> private[this] def MethodLocalObject$1(barParam$1: Int, MethodLocalObject$module$1: runtime.VolatileObjectRef): T#MethodLocalObject$2.type = if (MethodLocalObject$module$1.elem.$asInstanceOf[T#MethodLocalObject$2.type]().eq(null)) + T.this.MethodLocalObject$lzycompute$1(barParam$1, MethodLocalObject$module$1) + else + MethodLocalObject$module$1.elem.$asInstanceOf[T#MethodLocalObject$2.type](); @SerialVersionUID(value = 0) final <synthetic> class $anonfun$tryy$1 extends scala.runtime.AbstractFunction0$mcV$sp with Serializable { def <init>($outer: T, tryyParam$1: Int, tryyLocal$1: runtime.IntRef): <$anon: Function0> = { $anonfun$tryy$1.super.<init>(); diff --git a/test/files/run/t6089.scala b/test/files/run/t6089.scala index c72d7ba792..c42a9f68c6 100644 --- a/test/files/run/t6089.scala +++ b/test/files/run/t6089.scala @@ -3,7 +3,7 @@ case class Foo(x: Int) object Test { def bippo(result: Boolean): Boolean = result def bungus(m: Foo): Boolean = - bippo(m match { case Foo(2) => bungus(m) }) + bippo((m: @unchecked) match { case Foo(2) => bungus(m) }) def main(args: Array[String]): Unit = try { bungus(Foo(0)) diff --git a/test/files/run/t6102.check b/test/files/run/t6102.check index 07378f5ed4..ce01362503 100644 --- a/test/files/run/t6102.check +++ b/test/files/run/t6102.check @@ -1,37 +1 @@ -[running phase parser on t6102.scala] -[running phase namer on t6102.scala] -[running phase packageobjects on t6102.scala] -[running phase typer on t6102.scala] -[running phase patmat on t6102.scala] -[running phase superaccessors on t6102.scala] -[running phase extmethods on t6102.scala] -[running phase pickler on t6102.scala] -[running phase refchecks on t6102.scala] -[running phase uncurry on t6102.scala] -[running phase tailcalls on t6102.scala] -[running phase specialize on t6102.scala] -[running phase explicitouter on t6102.scala] -[running phase erasure on t6102.scala] -[running phase posterasure on t6102.scala] -[running phase lazyvals on t6102.scala] -[running phase lambdalift on t6102.scala] -[running phase constructors on t6102.scala] -[running phase flatten on t6102.scala] -[running phase mixin on t6102.scala] -[running phase cleanup on t6102.scala] -[running phase delambdafy on t6102.scala] -[running phase icode on t6102.scala] -#partest -optimise -[running phase inliner on t6102.scala] -[running phase inlinehandlers on t6102.scala] -[running phase closelim on t6102.scala] -[running phase constopt on t6102.scala] -#partest -[running phase dce on t6102.scala] -#partest !-Ybackend:GenBCode -[running phase jvm on icode] -#partest -Ybackend:GenBCode -[running phase jvm on t6102.scala] -[running phase jvm on t6102.scala] -#partest hello diff --git a/test/files/run/t6102.flags b/test/files/run/t6102.flags index 726e2a997f..db58cf3b4c 100644 --- a/test/files/run/t6102.flags +++ b/test/files/run/t6102.flags @@ -1 +1 @@ --Ydead-code -Ydebug -Xfatal-warnings +-Yopt:l:classpath -Xfatal-warnings diff --git a/test/files/run/t6188.flags b/test/files/run/t6188.flags index 0ebca3e7af..422d6be431 100644 --- a/test/files/run/t6188.flags +++ b/test/files/run/t6188.flags @@ -1 +1 @@ - -optimize +-Yopt:l:classpath
\ No newline at end of file diff --git a/test/files/run/t6260-delambdafy.check b/test/files/run/t6260-delambdafy.check index b2a7bed988..2fea68afb1 100644 --- a/test/files/run/t6260-delambdafy.check +++ b/test/files/run/t6260-delambdafy.check @@ -1,4 +1,4 @@ f(C@2e) -Test$lambda$1$$apply apply +writeReplace diff --git a/test/files/run/t6260-delambdafy.flags b/test/files/run/t6260-delambdafy.flags deleted file mode 100644 index 48b438ddf8..0000000000 --- a/test/files/run/t6260-delambdafy.flags +++ /dev/null @@ -1 +0,0 @@ --Ydelambdafy:method diff --git a/test/files/run/t6260c.check b/test/files/run/t6260c.check index 78e9b27371..388f6690d6 100644 --- a/test/files/run/t6260c.check +++ b/test/files/run/t6260c.check @@ -1,9 +1,5 @@ f(C@2e) -#partest !-Ydelambdafy:method -Test$$anonfun$$apply -#partest -Ydelambdafy:method -Test$lambda$1$$apply -#partest apply +writeReplace g(C@2e) diff --git a/test/files/run/t6288.check b/test/files/run/t6288.check index a032a10de6..67877fd56d 100644 --- a/test/files/run/t6288.check +++ b/test/files/run/t6288.check @@ -33,11 +33,8 @@ [175]case <synthetic> val x1: [175]Any = [175]""; [175]case5()[195]{ [195]<synthetic> val o7: [195]Option[List[Int]] = [195][195]Case4.unapplySeq([195]x1); - [195]if ([195]o7.isEmpty.unary_!) - [195]if ([195][195][195][195]o7.get.!=([195]null).&&([195][195][195][195]o7.get.lengthCompare([195]1).==([195]0))) - [208][208]matchEnd4([208]()) - else - [195][195]case6() + [195]if ([195][195]o7.isEmpty.unary_!.&&([195][195][195][195]o7.get.!=([195]null).&&([195][195][195][195]o7.get.lengthCompare([195]1).==([195]0)))) + [208][208]matchEnd4([208]()) else [195][195]case6() }; @@ -59,11 +56,8 @@ [273]case <synthetic> val x1: [273]Any = [273]""; [273]case5()[293]{ [293]<synthetic> val o7: [293]Option[List[Int]] = [293][293]Case4.unapplySeq([293]x1); - [293]if ([293]o7.isEmpty.unary_!) - [293]if ([293][293][293][293]o7.get.!=([293]null).&&([293][293][293][293]o7.get.lengthCompare([293]0).==([293]0))) - [304][304]matchEnd4([304]()) - else - [293][293]case6() + [293]if ([293][293]o7.isEmpty.unary_!.&&([293][293][293][293]o7.get.!=([293]null).&&([293][293][293][293]o7.get.lengthCompare([293]0).==([293]0)))) + [304][304]matchEnd4([304]()) else [293][293]case6() }; diff --git a/test/files/run/t6288b-jump-position.check b/test/files/run/t6288b-jump-position.check deleted file mode 100644 index ece88b18f0..0000000000 --- a/test/files/run/t6288b-jump-position.check +++ /dev/null @@ -1,76 +0,0 @@ -object Case3 extends Object { - // fields: - - // methods - def unapply(z: Object (REF(class Object))): Option { - locals: value z - startBlock: 1 - blocks: [1] - - 1: - 2 NEW REF(class Some) - 2 DUP(REF(class Some)) - 2 CONSTANT(-1) - 2 BOX INT - 2 CALL_METHOD scala.Some.<init> (static-instance) - 2 RETURN(REF(class Option)) - - } - Exception handlers: - - def main(args: Array[String] (ARRAY[REF(class String)])): Unit { - locals: value args, value x1, value x - startBlock: 1 - blocks: [1,2,3,6,7] - - 1: - 4 CONSTANT("") - 4 STORE_LOCAL(value x1) - 4 SCOPE_ENTER value x1 - 4 JUMP 2 - - 2: - 5 LOAD_LOCAL(value x1) - 5 IS_INSTANCE REF(class String) - 5 CZJUMP (BOOL)NE ? 3 : 6 - - 3: - 6 LOAD_MODULE object Predef - 6 CONSTANT("case 0") - 6 CALL_METHOD scala.Predef.println (dynamic) - 6 LOAD_FIELD scala.runtime.BoxedUnit.UNIT - 6 STORE_LOCAL(value x) - 6 JUMP 7 - - 6: - 8 LOAD_MODULE object Predef - 8 CONSTANT("default") - 8 CALL_METHOD scala.Predef.println (dynamic) - 8 LOAD_FIELD scala.runtime.BoxedUnit.UNIT - 8 STORE_LOCAL(value x) - 8 JUMP 7 - - 7: - 10 LOAD_MODULE object Predef - 10 CONSTANT("done") - 10 CALL_METHOD scala.Predef.println (dynamic) - 10 RETURN(UNIT) - - } - Exception handlers: - - def <init>(): Case3.type { - locals: - startBlock: 1 - blocks: [1] - - 1: - 12 THIS(Case3) - 12 CALL_METHOD java.lang.Object.<init> (super()) - 12 RETURN(UNIT) - - } - Exception handlers: - - -} diff --git a/test/files/run/t6288b-jump-position.scala b/test/files/run/t6288b-jump-position.scala deleted file mode 100644 index c5f3bbe788..0000000000 --- a/test/files/run/t6288b-jump-position.scala +++ /dev/null @@ -1,19 +0,0 @@ -import scala.tools.partest.IcodeComparison - -object Test extends IcodeComparison { - override def code = - """object Case3 { // 01 - | def unapply(z: Any): Option[Int] = Some(-1) // 02 - | def main(args: Array[String]) { // 03 - | ("": Any) match { // 04 - | case x : String => // 05 Read: <linenumber> JUMP <target basic block id> - | println("case 0") // 06 expecting "6 JUMP 7", was "8 JUMP 7" - | case _ => // 07 - | println("default") // 08 expecting "8 JUMP 7" - | } // 09 - | println("done") // 10 - | } - |}""".stripMargin - - override def show() = showIcode() -} diff --git a/test/files/run/t6331b.check b/test/files/run/t6331b.check index 6ca09e3814..565348ce3f 100644 --- a/test/files/run/t6331b.check +++ b/test/files/run/t6331b.check @@ -10,19 +10,19 @@ else -0.0 res: Double = 0.0 -trace> Test.this.intercept.apply[Any](if (scala.this.Predef.???) +trace> Test.this.intercept.apply[Any](if (scala.Predef.???) -0.0 else 0.0) res: Any = class scala.NotImplementedError -trace> Test.this.intercept.apply[Any](if (scala.this.Predef.???) +trace> Test.this.intercept.apply[Any](if (scala.Predef.???) 0.0 else 0.0) res: Any = class scala.NotImplementedError -trace> Test.this.intercept.apply[Any](if (scala.this.Predef.???) +trace> Test.this.intercept.apply[Any](if (scala.Predef.???) () else ()) diff --git a/test/files/run/t6434.scala b/test/files/run/t6434.scala index e4a4579613..6b6a783299 100644 --- a/test/files/run/t6434.scala +++ b/test/files/run/t6434.scala @@ -5,4 +5,11 @@ object Test extends ReplTest { """def f(x: => Int): Int = x f _ """ + + // replace indylambda function names by <function1> + override def eval() = { + val lines = super.eval + val r = """\$\$Lambda.*""".r + lines.map(l => r.replaceAllIn(l, "<function1>")) + } } diff --git a/test/files/run/t6502.scala b/test/files/run/t6502.scala index f4fc39a03d..dffb0e2f98 100644 --- a/test/files/run/t6502.scala +++ b/test/files/run/t6502.scala @@ -14,11 +14,11 @@ object Test extends StoreReporterDirectTest { compileString(newCompiler("-cp", classpath, "-d", s"${testOutput.path}/$jarFileName"))(code) } - // TODO flat classpath doesn't support the classpath invalidation yet so we force using the recursive one - // it's the only test which needed such a workaround + var classPathKind: String = "" + override def settings = { val settings = new Settings - settings.YclasspathImpl.value = ClassPathRepresentationType.Recursive + settings.YclasspathImpl.value = classPathKind settings } @@ -72,9 +72,8 @@ object Test extends StoreReporterDirectTest { s"[${added}] in [${output.lines.mkString("/")}]" ) lines = lines drop promptLength - assert { - lines.next.contains("testing...") - } + val r = lines.next + assert(r.contains("testing..."), r) } def test2(): Unit = { @@ -91,14 +90,10 @@ object Test extends StoreReporterDirectTest { var lines = output.lines.drop(headerLength) lines = lines drop promptLength val added = lines.next - assert { - added.contains("Added") && added.contains("test1.jar") - } + assert(added.contains("Added") && added.contains("test1.jar"), added) lines = lines drop promptLength val msg = lines.next - assert { - msg.contains("test2.jar") && msg.contains("existing classpath entries conflict") - } + assert(msg.contains("test2.jar") && msg.contains("contains a classfile that already exists on the classpath: test.Test$"), msg) } def test3(): Unit = { @@ -116,13 +111,10 @@ object Test extends StoreReporterDirectTest { var lines = output.lines.drop(headerLength) lines = lines drop promptLength val added = lines.next - assert { - added.contains("Added") && added.contains("test1.jar") - } + assert(added.contains("Added") && added.contains("test1.jar"), added) lines = lines drop (2 * promptLength + 1) - assert { - lines.next.contains("new object in existing package") - } + val r = lines.next + assert(r.contains("new object in existing package"), r) } def test4(): Unit = { @@ -136,14 +128,10 @@ object Test extends StoreReporterDirectTest { var lines = output.lines.drop(headerLength) lines = lines drop promptLength val added = lines.next - assert { - added.contains("Added") && added.contains("test1.jar") - } + assert(added.contains("Added") && added.contains("test1.jar"), added) lines = lines drop promptLength val msg = lines.next - assert { - msg.contains("test1.jar") && msg.contains("existing classpath entries conflict") - } + assert(msg.contains("test1.jar") && msg.contains("contains a classfile that already exists on the classpath: test.Test$"), msg) } def test5(): Unit = { @@ -167,7 +155,7 @@ object Test extends StoreReporterDirectTest { assert(output.contains("created test6.Z"), output) } - def show(): Unit = { + def testAll(): Unit = { test1() test2() test3() @@ -175,4 +163,11 @@ object Test extends StoreReporterDirectTest { test5() test6() } + + def show(): Unit = { + classPathKind = ClassPathRepresentationType.Flat + testAll() + classPathKind = ClassPathRepresentationType.Recursive + testAll() + } } diff --git a/test/files/run/t6546.flags b/test/files/run/t6546.flags deleted file mode 100644 index eb4d19bcb9..0000000000 --- a/test/files/run/t6546.flags +++ /dev/null @@ -1 +0,0 @@ --optimise
\ No newline at end of file diff --git a/test/files/run/t6546/A_1.scala b/test/files/run/t6546/A_1.scala deleted file mode 100644 index bd086c08f8..0000000000 --- a/test/files/run/t6546/A_1.scala +++ /dev/null @@ -1,6 +0,0 @@ -final class Opt { - @inline def getOrElse(x: => String): String = "" -} -class A_1 { - def f(x: Opt): String = x getOrElse null -} diff --git a/test/files/run/t6546/B_2.scala b/test/files/run/t6546/B_2.scala deleted file mode 100644 index 64ec966f75..0000000000 --- a/test/files/run/t6546/B_2.scala +++ /dev/null @@ -1,8 +0,0 @@ -import scala.tools.partest.BytecodeTest - -object Test extends BytecodeTest { - def show: Unit = { - val node = loadClassNode("A_1") - assert(node.innerClasses.isEmpty, node.innerClasses) - } -} diff --git a/test/files/run/t6554.scala b/test/files/run/t6554.scala index 5d29d16666..eed139fea6 100644 --- a/test/files/run/t6554.scala +++ b/test/files/run/t6554.scala @@ -1,8 +1,14 @@ -trait Foo[A] { +trait T1[A] { def minBy[B](b: B): A = ??? } - -class Bar extends Foo[Int] + +// The second trait is needed to make sure there's a forwarder generated in Bar. +// otherwise Bar.minBy is just the inherited default method from T1. +trait T2[A] { self: T1[A] => + override def minBy[B](b: B): A = ??? +} + +class Bar extends T1[Int] with T2[Int] object Test extends App { val sigs = classOf[Bar].getDeclaredMethods.map(m => s"${m.toString} / ${m.toGenericString}").sorted diff --git a/test/files/run/t6634.check b/test/files/run/t6634.check index f6cbb30c67..b085f397e6 100644 --- a/test/files/run/t6634.check +++ b/test/files/run/t6634.check @@ -4,27 +4,31 @@ String OK. Length OK. Trying lb1 ... +java.lang.IndexOutOfBoundsException: at 6 deleting 6 Checking ... String OK. Length OK. Trying lb2 ... +java.lang.IndexOutOfBoundsException: at 99 deleting 6 Checking ... String OK. Length OK. Trying lb3 ... +java.lang.IndexOutOfBoundsException: at 1 deleting 9 Checking ... String OK. Length OK. Trying lb4 ... +java.lang.IndexOutOfBoundsException: at -1 deleting 1 Checking ... String OK. Length OK. Trying lb5 ... -java.lang.IllegalArgumentException: removing negative number (-1) of elements +java.lang.IllegalArgumentException: removing negative number of elements: -1 Checking ... String OK. Length OK. diff --git a/test/files/run/t6634.scala b/test/files/run/t6634.scala index 759e6d519d..081cca7502 100644 --- a/test/files/run/t6634.scala +++ b/test/files/run/t6634.scala @@ -8,7 +8,7 @@ object Test extends App { try { lb0.remove(5, 0) } catch { - // Not thrown in 2.10, will be thrown in 2.11 + // Should not be thrown--nothing is deleted so nothing to do case ex: IndexOutOfBoundsException => println(ex) } checkNotCorrupted(lb0) @@ -17,8 +17,8 @@ object Test extends App { println("Trying lb1 ...") try { lb1.remove(6, 6) - } catch { - // Not thrown in 2.10, will be thrown in 2.11 + } catch { + // Not thrown in 2.11, is thrown in 2.12 case ex: IndexOutOfBoundsException => println(ex) } checkNotCorrupted(lb1) @@ -28,7 +28,7 @@ object Test extends App { try { lb2.remove(99, 6) } catch { - // Not thrown in 2.10, will be thrown in 2.11 + // Not thrown in 2.11, is thrown in 2.12 case ex: IndexOutOfBoundsException => println(ex) } checkNotCorrupted(lb2) @@ -38,26 +38,27 @@ object Test extends App { try { lb3.remove(1, 9) } catch { - // Not thrown in 2.10, will be thrown in 2.11 - case ex: IllegalArgumentException => println(ex) + // Not thrown in 2.11, is thrown in 2.12 + case ex: IndexOutOfBoundsException => println(ex) } - checkNotCorrupted(lb3, "ListBuffer('a)", 1) + checkNotCorrupted(lb3) val lb4 = newLB println("Trying lb4 ...") try { lb4.remove(-1, 1) } catch { - // Not thrown in 2.10, will be thrown in 2.11 + // Not thrown in 2.11, is thrown in 2.12 case ex: IndexOutOfBoundsException => println(ex) } - checkNotCorrupted(lb4, "ListBuffer('b, 'c, 'd, 'e)", 4) + checkNotCorrupted(lb4) val lb5 = newLB println("Trying lb5 ...") try { lb5.remove(1, -1) } catch { + // Was thrown prior to 2.12 also case ex: IllegalArgumentException => println(ex) } checkNotCorrupted(lb5) @@ -77,4 +78,4 @@ object Test extends App { else println("!!! length FAILED: " + len) println() } -}
\ No newline at end of file +} diff --git a/test/files/run/t6827.check b/test/files/run/t6827.check index 3a3a71c67d..4889e05be8 100644 --- a/test/files/run/t6827.check +++ b/test/files/run/t6827.check @@ -1,6 +1,6 @@ -start at -5: java.lang.IllegalArgumentException: requirement failed: start -5 out of range 10 -start at -1: java.lang.IllegalArgumentException: requirement failed: start -1 out of range 10 -start at limit: java.lang.IllegalArgumentException: requirement failed: start 10 out of range 10 +start at -5: java.lang.ArrayIndexOutOfBoundsException: -5 +start at -1: java.lang.ArrayIndexOutOfBoundsException: -1 +start at limit: ok start at limit-1: ok first 10: ok read all: ok @@ -8,8 +8,8 @@ test huge len: ok 5 from 5: ok 20 from 5: ok test len overflow: ok -start beyond limit: java.lang.IllegalArgumentException: requirement failed: start 30 out of range 10 +start beyond limit: ok read 0: ok read -1: ok -invalid read 0: java.lang.IllegalArgumentException: requirement failed: start 30 out of range 10 -invalid read -1: java.lang.IllegalArgumentException: requirement failed: start 30 out of range 10 +invalid read 0: ok +invalid read -1: ok diff --git a/test/files/run/t6827.scala b/test/files/run/t6827.scala index 8e17af09e2..eb020711bb 100644 --- a/test/files/run/t6827.scala +++ b/test/files/run/t6827.scala @@ -31,4 +31,24 @@ object Test extends App { // okay, see SI-7128 "...".toIterator.copyToArray(new Array[Char](0), 0, 0) + + + // Bonus test from @som-snytt to check for overflow in + // index calculations. + def testOverflow(start: Int, len: Int, expected: List[Char]) { + def copyFromIterator = { + val arr = Array.fill[Char](3)('-') + "abc".toIterator.copyToArray(arr, start, len) + arr.toList + } + def copyFromArray = { + val arr = Array.fill[Char](3)('-') + "abc".toArray.copyToArray(arr, start, len) + arr.toList + } + assert(copyFromIterator == expected) + assert(copyFromArray == expected) + } + testOverflow(1, Int.MaxValue - 1, "-ab".toList) + testOverflow(1, Int.MaxValue, "-ab".toList) } diff --git a/test/files/run/t6955.scala b/test/files/run/t6955.scala deleted file mode 100644 index 329af688e4..0000000000 --- a/test/files/run/t6955.scala +++ /dev/null @@ -1,34 +0,0 @@ -import scala.tools.partest.IcodeComparison - -// this class should compile to code that uses switches (twice) -class Switches { - type Tag = Byte - - def switchBad(i: Tag): Int = i match { // notice type of i is Tag = Byte - case 1 => 1 - case 2 => 2 - case 3 => 3 - case _ => 0 - } - - // this worked before, should keep working - def switchOkay(i: Byte): Int = i match { - case 1 => 1 - case 2 => 2 - case 3 => 3 - case _ => 0 - } -} - -object Test extends IcodeComparison { - // ensure we get two switches out of this -- ignore the rest of the output for robustness - // exclude the constant we emit for the "SWITCH ..." string below (we get the icode for all the code you see in this file) - override def show() = { - val expected = 2 - val actual = (collectIcode() filter { - x => x.indexOf("SWITCH ...") >= 0 && x.indexOf("CONSTANT(") == -1 - }).size - assert(actual == expected) - } -} - diff --git a/test/files/run/t6956.scala b/test/files/run/t6956.scala deleted file mode 100644 index 3569adf483..0000000000 --- a/test/files/run/t6956.scala +++ /dev/null @@ -1,31 +0,0 @@ -import scala.tools.partest.IcodeComparison - -class Switches { - private[this] final val ONE = 1 - - def switchBad(i: Byte): Int = i match { - case ONE => 1 - case 2 => 2 - case 3 => 3 - case _ => 0 - } - - def switchOkay(i: Byte): Int = i match { - case 1 => 1 - case 2 => 2 - case 3 => 3 - case _ => 0 - } -} - -object Test extends IcodeComparison { - // ensure we get two switches out of this -- ignore the rest of the output for robustness - // exclude the constant we emit for the "SWITCH ..." string below (we get the icode for all the code you see in this file) - override def show() = { - val expected = 2 - val actual = (collectIcode() filter { - x => x.indexOf("SWITCH ...") >= 0 && x.indexOf("CONSTANT(") == -1 - }).size - assert(actual == expected) - } -} diff --git a/test/files/run/t7008-scala-defined.flags b/test/files/run/t7008-scala-defined.flags deleted file mode 100644 index 49f2d2c4c8..0000000000 --- a/test/files/run/t7008-scala-defined.flags +++ /dev/null @@ -1 +0,0 @@ --Ybackend:GenASM diff --git a/test/files/run/t7171.check b/test/files/run/t7171.check index d826f6cb94..5454142882 100644 --- a/test/files/run/t7171.check +++ b/test/files/run/t7171.check @@ -1,3 +1,6 @@ t7171.scala:2: warning: The outer reference in this type test cannot be checked at run time. final case class A() ^ +t7171.scala:9: warning: The outer reference in this type test cannot be checked at run time. + case _: A => true; case _ => false + ^ diff --git a/test/files/run/t7375b.check b/test/files/run/t7375b.check index d7578e28ba..0993cceca2 100644 --- a/test/files/run/t7375b.check +++ b/test/files/run/t7375b.check @@ -1,4 +1,4 @@ -Predef.this.classOf[C1] -Predef.this.classOf[C2] -Predef.this.classOf[C1] -Predef.this.classOf[C2] +scala.Predef.classOf[C1] +scala.Predef.classOf[C2] +scala.Predef.classOf[C1] +scala.Predef.classOf[C2] diff --git a/test/files/run/t7407.flags b/test/files/run/t7407.flags index ffc65f4b81..bc22511cff 100644 --- a/test/files/run/t7407.flags +++ b/test/files/run/t7407.flags @@ -1 +1 @@ --Yopt:l:none -Ybackend:GenBCode +-Yopt:l:none diff --git a/test/files/run/t7407b.flags b/test/files/run/t7407b.flags deleted file mode 100644 index c30091d3de..0000000000 --- a/test/files/run/t7407b.flags +++ /dev/null @@ -1 +0,0 @@ --Ybackend:GenBCode diff --git a/test/files/run/t7459b-optimize.flags b/test/files/run/t7459b-optimize.flags index 49d036a887..65caa3736e 100644 --- a/test/files/run/t7459b-optimize.flags +++ b/test/files/run/t7459b-optimize.flags @@ -1 +1 @@ --optimize +-Yopt:l:classpath diff --git a/test/files/run/t7459f.scala b/test/files/run/t7459f.scala index 63e2109560..5cd972129a 100644 --- a/test/files/run/t7459f.scala +++ b/test/files/run/t7459f.scala @@ -3,7 +3,7 @@ object Test extends App { case class FooSeq(x: Int, y: String, z: C*) - FooSeq(1, "a", new C()) match { + (FooSeq(1, "a", new C()): @unchecked) match { case FooSeq(1, "a", x@_* ) => //println(x.toList) x.asInstanceOf[x.type] diff --git a/test/files/run/t3452b-bcode/S_3.scala b/test/files/run/t7521/Test.scala index 102b433f47..e9816ad6cb 100644 --- a/test/files/run/t3452b-bcode/S_3.scala +++ b/test/files/run/t7521/Test.scala @@ -1,5 +1,5 @@ object Test { def main(args: Array[String]): Unit = { - J_2.j() + new Wrapper(new Array[Int](1)) } } diff --git a/test/files/run/t7521/Wrapper.scala b/test/files/run/t7521/Wrapper.scala new file mode 100644 index 0000000000..0b923f8924 --- /dev/null +++ b/test/files/run/t7521/Wrapper.scala @@ -0,0 +1 @@ +class Wrapper[Repr](val xs: Repr) extends AnyVal diff --git a/test/files/run/t7521b.check b/test/files/run/t7521b.check new file mode 100644 index 0000000000..4d96df106d --- /dev/null +++ b/test/files/run/t7521b.check @@ -0,0 +1,7 @@ += Java Erased Signatures = +public int C.a(Wrapper) +public int C.b(Wrapper) + += Java Generic Signatures = +public int C.a(Wrapper<int[]>) +public int C.b(Wrapper<java.lang.Object>) diff --git a/test/files/run/t7521b.scala b/test/files/run/t7521b.scala new file mode 100644 index 0000000000..c9e27f28b4 --- /dev/null +++ b/test/files/run/t7521b.scala @@ -0,0 +1,20 @@ +class Wrapper[X](x: X) + +class C { + def a(w: Wrapper[Array[Int]]) = 0 + def b(w: Wrapper[Int]) = 0 +} + +object Test { + def main(args: Array[String]): Unit = { + val c = new C + c.a(new Wrapper(Array(1, 2))) + c.b(new Wrapper(1)) + + val methods = classOf[C].getDeclaredMethods.sortBy(_.getName) + println("= Java Erased Signatures =") + println(methods.mkString("\n")) + println("\n= Java Generic Signatures =") + println(methods.map(_.toGenericString).mkString("\n")) + } +} diff --git a/test/files/run/t7582.check b/test/files/run/t7582.check index 0cfbf08886..58d0f19f5d 100644 --- a/test/files/run/t7582.check +++ b/test/files/run/t7582.check @@ -1 +1,6 @@ +InlineHolder.scala:9: warning: p1/InlineHolder$::inlinable()I is annotated @inline but could not be inlined: +The callee p1/InlineHolder$::inlinable()I contains the instruction INVOKESTATIC p1/PackageProtectedJava.protectedMethod ()I +that would cause an IllegalAccessError when inlined into class O$. + def x = p1.InlineHolder.inlinable + ^ 2 diff --git a/test/files/run/t7582.flags b/test/files/run/t7582.flags index 1182725e86..1f45833eff 100644 --- a/test/files/run/t7582.flags +++ b/test/files/run/t7582.flags @@ -1 +1 @@ --optimize
\ No newline at end of file +-Yopt:l:classpath -Yopt-warnings
\ No newline at end of file diff --git a/test/files/run/t7582/InlineHolder.scala b/test/files/run/t7582/InlineHolder.scala index 3cbf233ce1..a18b9effaa 100644 --- a/test/files/run/t7582/InlineHolder.scala +++ b/test/files/run/t7582/InlineHolder.scala @@ -1,6 +1,3 @@ -/* - * filter: inliner warning; re-run with - */ package p1 { object InlineHolder { @inline def inlinable = p1.PackageProtectedJava.protectedMethod() + 1 diff --git a/test/files/run/t7582b.check b/test/files/run/t7582b.check index 0cfbf08886..58d0f19f5d 100644 --- a/test/files/run/t7582b.check +++ b/test/files/run/t7582b.check @@ -1 +1,6 @@ +InlineHolder.scala:9: warning: p1/InlineHolder$::inlinable()I is annotated @inline but could not be inlined: +The callee p1/InlineHolder$::inlinable()I contains the instruction INVOKESTATIC p1/PackageProtectedJava.protectedMethod ()I +that would cause an IllegalAccessError when inlined into class O$. + def x = p1.InlineHolder.inlinable + ^ 2 diff --git a/test/files/run/t7582b.flags b/test/files/run/t7582b.flags index 1182725e86..1f45833eff 100644 --- a/test/files/run/t7582b.flags +++ b/test/files/run/t7582b.flags @@ -1 +1 @@ --optimize
\ No newline at end of file +-Yopt:l:classpath -Yopt-warnings
\ No newline at end of file diff --git a/test/files/run/t7582b/InlineHolder.scala b/test/files/run/t7582b/InlineHolder.scala index 3cbf233ce1..a18b9effaa 100644 --- a/test/files/run/t7582b/InlineHolder.scala +++ b/test/files/run/t7582b/InlineHolder.scala @@ -1,6 +1,3 @@ -/* - * filter: inliner warning; re-run with - */ package p1 { object InlineHolder { @inline def inlinable = p1.PackageProtectedJava.protectedMethod() + 1 diff --git a/test/files/run/t7700.check b/test/files/run/t7700.check index ca8e686984..1d51e68877 100644 --- a/test/files/run/t7700.check +++ b/test/files/run/t7700.check @@ -1,2 +1,3 @@ -public abstract java.lang.Object C.bar(java.lang.Object) +public default void C.$init$() +public default java.lang.Object C.bar(java.lang.Object) public abstract java.lang.Object C.foo(java.lang.Object) diff --git a/test/files/run/t7747-repl.scala b/test/files/run/t7747-repl.scala index 141c2d9844..9b2d1c40be 100644 --- a/test/files/run/t7747-repl.scala +++ b/test/files/run/t7747-repl.scala @@ -8,6 +8,13 @@ object Test extends ReplTest { s } + // replace indylambda function names by <function0> + override def eval() = { + val lines = super.eval + val r = """\$Lambda.*""".r + lines.map(l => r.replaceAllIn(l, "<function0>")) + } + def code = """ |var x = 10 |var y = 11 diff --git a/test/files/run/t7775.scala b/test/files/run/t7775.scala index 48b0d89974..bc69064e17 100644 --- a/test/files/run/t7775.scala +++ b/test/files/run/t7775.scala @@ -1,3 +1,45 @@ +import scala.concurrent._, duration._ +import ExecutionContext.Implicits.global +import scala.tools.reflect.WrappedProperties.AccessControl._ +import java.util.concurrent.CyclicBarrier + +object Test extends App { + @volatile var done = false + val barrier = new CyclicBarrier(2) + + val probe = Future { + val attempts = 1024 // previously, failed after a few + def fail(i: Int) = s"Failed at $i" + barrier.await() + for (i <- 1 to attempts ; p <- systemProperties) + p match { case (k, v) => assert (k != null && v != null, fail(i)) } + } + probe onComplete { + case _ => done = true + } + + System.setProperty("foo", "fooz") + System.setProperty("bar", "barz") + barrier.await() // just for fun, wait to start mucking with properties + + // continually modify properties trying to break live iteration over sys props + // hint: don't iterate lively over sys props + var alt = true + while (!done) { + if (alt) { + System.getProperties.remove("foo") + System.setProperty("bar", "barz") + alt = false + } else { + System.getProperties.remove("bar") + System.setProperty("foo", "fooz") + alt = true + } + } + Await.result(probe, Duration.Inf) +} + +/* import scala.concurrent.{duration, Future, Await, ExecutionContext} import scala.tools.nsc.Settings import ExecutionContext.Implicits.global @@ -15,3 +57,4 @@ object Test { Await.result(compiler, duration.Duration.Inf) } } +*/ diff --git a/test/files/run/t7807.check b/test/files/run/t7807.check new file mode 100644 index 0000000000..fd22077f2e --- /dev/null +++ b/test/files/run/t7807.check @@ -0,0 +1,3 @@ +... +... +... diff --git a/test/files/run/t7807.scala b/test/files/run/t7807.scala new file mode 100644 index 0000000000..8e3099ec14 --- /dev/null +++ b/test/files/run/t7807.scala @@ -0,0 +1,21 @@ +object Test { + def main(args: Array[String]) { + try { + println("...") + } + finally { + try { + println("...") + } + finally { + try { + println("...") + } + catch { + case ct: scala.util.control.ControlThrowable => throw(ct) + case t: Throwable => t.printStackTrace() + } + } + } + } +} diff --git a/test/files/run/t7817-tree-gen.check b/test/files/run/t7817-tree-gen.check index 4ed4b0d94a..69ad2b2f28 100644 --- a/test/files/run/t7817-tree-gen.check +++ b/test/files/run/t7817-tree-gen.check @@ -38,13 +38,13 @@ Joint Compilation: mixin [ test2.PO] - test2.package$PO cleanup [ test2.PO] - test2.package$PO - typer [ test2.bar] - `package`.this.bar - pickler [ test2.bar] - `package`.this.bar - refchecks [ test2.bar] - `package`.this.bar - uncurry [ test2.bar] - `package`.this.bar - specialize [ test2.bar] - `package`.this.bar - explicitouter [ test2.bar] - `package`.this.bar - erasure [ test2.bar] - `package`.this.bar + typer [ test2.bar] - test2.`package`.bar + pickler [ test2.bar] - test2.`package`.bar + refchecks [ test2.bar] - test2.`package`.bar + uncurry [ test2.bar] - test2.`package`.bar + specialize [ test2.bar] - test2.`package`.bar + explicitouter [ test2.bar] - test2.`package`.bar + erasure [ test2.bar] - test2.`package`.bar posterasure [ test2.bar] - test2.`package`.bar flatten [ test2.bar] - test2.`package`.bar mixin [ test2.bar] - test2.`package`.bar @@ -90,13 +90,13 @@ Separate Compilation: mixin [ PO] - test2.package$PO cleanup [ PO] - test2.package$PO - typer [testSep2.bar] - `package`.this.bar - pickler [testSep2.bar] - `package`.this.bar - refchecks [testSep2.bar] - `package`.this.bar - uncurry [testSep2.bar] - `package`.this.bar - specialize [testSep2.bar] - `package`.this.bar - explicitouter [testSep2.bar] - `package`.this.bar - erasure [testSep2.bar] - `package`.this.bar + typer [testSep2.bar] - test2.`package`.bar + pickler [testSep2.bar] - test2.`package`.bar + refchecks [testSep2.bar] - test2.`package`.bar + uncurry [testSep2.bar] - test2.`package`.bar + specialize [testSep2.bar] - test2.`package`.bar + explicitouter [testSep2.bar] - test2.`package`.bar + erasure [testSep2.bar] - test2.`package`.bar posterasure [testSep2.bar] - test2.`package`.bar flatten [testSep2.bar] - test2.`package`.bar mixin [testSep2.bar] - test2.`package`.bar diff --git a/test/files/run/t7817-tree-gen.flags b/test/files/run/t7817-tree-gen.flags deleted file mode 100644 index ce6e93b3da..0000000000 --- a/test/files/run/t7817-tree-gen.flags +++ /dev/null @@ -1 +0,0 @@ --Ynooptimise
\ No newline at end of file diff --git a/test/files/run/t7852.flags b/test/files/run/t7852.flags index f6262fd3e0..bc22511cff 100644 --- a/test/files/run/t7852.flags +++ b/test/files/run/t7852.flags @@ -1 +1 @@ --Ynooptimise +-Yopt:l:none diff --git a/test/files/run/t7932.check b/test/files/run/t7932.check index 3f0a0c4f62..a2ad84cd46 100644 --- a/test/files/run/t7932.check +++ b/test/files/run/t7932.check @@ -1,3 +1,6 @@ -warning: there was one feature warning; re-run with -feature for details public Category<?> C.category() public Category<scala.Tuple2> C.category1() +public default Category<java.lang.Object> M1.category() +public default Category<scala.Tuple2> M1.category1() +public default Category<java.lang.Object> M2.category() +public default Category<scala.Tuple2> M2.category1() diff --git a/test/files/run/t7932.scala b/test/files/run/t7932.scala index 8743abff88..e6bdbf2417 100644 --- a/test/files/run/t7932.scala +++ b/test/files/run/t7932.scala @@ -1,11 +1,28 @@ +import scala.language.higherKinds + class Category[M[_, _]] -trait M[F] { + +trait M1[F] { type X[a, b] = F def category: Category[X] = null def category1: Category[Tuple2] = null } -abstract class C extends M[Float] + +// The second trait is needed to make sure there's a forwarder generated in C. +// otherwise the trait methods are just the inherited default methods from M1. +trait M2[F] { self: M1[F] => + override def category: Category[X] = null + override def category1: Category[Tuple2] = null +} + +abstract class C extends M1[Float] with M2[Float] + object Test extends App { - val ms = classOf[C].getMethods.filter(_.getName.startsWith("category")) - println(ms.map(_.toGenericString).sorted.mkString("\n")) + def t(c: Class[_]) = { + val ms = c.getMethods.filter(_.getName.startsWith("category")) + println(ms.map(_.toGenericString).sorted.mkString("\n")) + } + t(classOf[C]) + t(classOf[M1[_]]) + t(classOf[M2[_]]) } diff --git a/test/files/run/t7974.check b/test/files/run/t7974.check index 4eae5eb152..f649161ae9 100644 --- a/test/files/run/t7974.check +++ b/test/files/run/t7974.check @@ -1,26 +1,12 @@ - // access flags 0x9 - public static <clinit>()V - GETSTATIC scala/Symbol$.MODULE$ : Lscala/Symbol$; - LDC "Symbolic1" - INVOKEVIRTUAL scala/Symbol$.apply (Ljava/lang/String;)Lscala/Symbol; - PUTSTATIC Symbols.symbol$1 : Lscala/Symbol; - GETSTATIC scala/Symbol$.MODULE$ : Lscala/Symbol$; - LDC "Symbolic2" - INVOKEVIRTUAL scala/Symbol$.apply (Ljava/lang/String;)Lscala/Symbol; - PUTSTATIC Symbols.symbol$2 : Lscala/Symbol; - GETSTATIC scala/Symbol$.MODULE$ : Lscala/Symbol$; - LDC "Symbolic3" - INVOKEVIRTUAL scala/Symbol$.apply (Ljava/lang/String;)Lscala/Symbol; - PUTSTATIC Symbols.symbol$3 : Lscala/Symbol; - RETURN - MAXSTACK = 2 - MAXLOCALS = 0 - - // access flags 0x1 public someSymbol1()Lscala/Symbol; - GETSTATIC Symbols.symbol$1 : Lscala/Symbol; + INVOKEDYNAMIC apply()Lscala/Symbol; [ + // handle kind 0x6 : INVOKESTATIC + scala/runtime/SymbolLiteral.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;)Ljava/lang/invoke/CallSite; + // arguments: + "Symbolic1" + ] ARETURN MAXSTACK = 1 MAXLOCALS = 1 @@ -28,7 +14,12 @@ // access flags 0x1 public someSymbol2()Lscala/Symbol; - GETSTATIC Symbols.symbol$2 : Lscala/Symbol; + INVOKEDYNAMIC apply()Lscala/Symbol; [ + // handle kind 0x6 : INVOKESTATIC + scala/runtime/SymbolLiteral.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;)Ljava/lang/invoke/CallSite; + // arguments: + "Symbolic2" + ] ARETURN MAXSTACK = 1 MAXLOCALS = 1 @@ -36,7 +27,12 @@ // access flags 0x1 public sameSymbol1()Lscala/Symbol; - GETSTATIC Symbols.symbol$1 : Lscala/Symbol; + INVOKEDYNAMIC apply()Lscala/Symbol; [ + // handle kind 0x6 : INVOKESTATIC + scala/runtime/SymbolLiteral.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;)Ljava/lang/invoke/CallSite; + // arguments: + "Symbolic1" + ] ARETURN MAXSTACK = 1 MAXLOCALS = 1 @@ -56,7 +52,12 @@ ALOAD 0 INVOKESPECIAL java/lang/Object.<init> ()V ALOAD 0 - GETSTATIC Symbols.symbol$3 : Lscala/Symbol; + INVOKEDYNAMIC apply()Lscala/Symbol; [ + // handle kind 0x6 : INVOKESTATIC + scala/runtime/SymbolLiteral.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;)Ljava/lang/invoke/CallSite; + // arguments: + "Symbolic3" + ] PUTFIELD Symbols.someSymbol3 : Lscala/Symbol; RETURN MAXSTACK = 2 diff --git a/test/files/run/t8199.scala b/test/files/run/t8199.scala index 50994159ed..ebe14a74df 100644 --- a/test/files/run/t8199.scala +++ b/test/files/run/t8199.scala @@ -21,17 +21,17 @@ class cls01234567 class cls012345678 class cls0123456789 class cls01234567890 -trait trt0 { def x = Test.checkCallerImplClassName() } -trait trt01 { def x = Test.checkCallerImplClassName() } -trait trt012 { def x = Test.checkCallerImplClassName() } -trait trt0123 { def x = Test.checkCallerImplClassName() } -trait trt01234 { def x = Test.checkCallerImplClassName() } -trait trt012345 { def x = Test.checkCallerImplClassName() } -trait trt0123456 { def x = Test.checkCallerImplClassName() } -trait trt01234567 { def x = Test.checkCallerImplClassName() } -trait trt012345678 { def x = Test.checkCallerImplClassName() } -trait trt0123456789 { def x = Test.checkCallerImplClassName() } -trait trt01234567890 { def x = Test.checkCallerImplClassName() } +trait trt0 +trait trt01 +trait trt012 +trait trt0123 +trait trt01234 +trait trt012345 +trait trt0123456 +trait trt01234567 +trait trt012345678 +trait trt0123456789 +trait trt01234567890 } object Test extends App { @@ -42,11 +42,6 @@ object Test extends App { val defaultMaxClassFileLength = 255 assert((name + ".class").length <= defaultMaxClassFileLength, name) } - def checkCallerImplClassName() { - val name = Thread.currentThread.getStackTrace.apply(2).getClassName - assert(name.contains("$class")) - Test.checkClassName(name) - } val c = new reallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongname import c._ @@ -75,7 +70,6 @@ object Test extends App { check(classOf[cls0123456789]) check(classOf[cls01234567890]) - // interface facets check(classOf[trt0]) check(classOf[trt01]) check(classOf[trt012]) @@ -88,18 +82,6 @@ object Test extends App { check(classOf[trt0123456789]) check(classOf[trt01234567890]) - // impl classes are harder to find the names of to test! - (new trt0 {}).x - (new trt01 {}).x - (new trt012 {}).x - (new trt0123 {}).x - (new trt01234 {}).x - (new trt012345 {}).x - (new trt0123456 {}).x - (new trt01234567 {}).x - (new trt012345678 {}).x - (new trt0123456789 {}).x - (new trt01234567890 {}).x } // filename too long: reallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongnamereallylongname$obj012345$.class diff --git a/test/files/run/t8233-bcode.flags b/test/files/run/t8233-bcode.flags deleted file mode 100644 index c30091d3de..0000000000 --- a/test/files/run/t8233-bcode.flags +++ /dev/null @@ -1 +0,0 @@ --Ybackend:GenBCode diff --git a/test/files/run/t8233-bcode.scala b/test/files/run/t8233-bcode.scala deleted file mode 100644 index 72d013e553..0000000000 --- a/test/files/run/t8233-bcode.scala +++ /dev/null @@ -1,31 +0,0 @@ -object Test { - def bar(s: String) = s; - val o: Option[Null] = None - def nullReference { - val a: Null = o.get - bar(a) // Was: VerifyError under GenICode - } - - def literal { - val a: Null = null - bar(a) - } - - /** Check SI-8330 for details */ - def expectedUnitInABranch(b: Boolean): Boolean = { - if (b) { - val x = 12 - () - } else { - // here expected type is (unboxed) Unit - null - } - true - } - - def main(args: Array[String]): Unit = { - try { nullReference } catch { case _: NoSuchElementException => } - literal - expectedUnitInABranch(true) - } -} diff --git a/test/files/run/t8334.scala b/test/files/run/t8334.scala new file mode 100644 index 0000000000..bc7e97bd04 --- /dev/null +++ b/test/files/run/t8334.scala @@ -0,0 +1,17 @@ +object Test extends App { + def f: Boolean = { + val xs = Nil map (_ => return false) + true + } + + def g: Boolean = { + val xs = Nil collect { case _ => return false } + true + } + + def h: Boolean = { + val xs = Nil flatMap { _ => return false } + true + } + assert(f && g && h) +} diff --git a/test/files/run/t8549.scala b/test/files/run/t8549.scala index cb254e3810..e2d0d335b0 100644 --- a/test/files/run/t8549.scala +++ b/test/files/run/t8549.scala @@ -79,7 +79,7 @@ object Test extends App { } } - // Generated on 20141010-14:01:28 with Scala version 2.11.2) + // Generated on 20160328-17:47:35 with Scala version 2.12.0-20160328-174205-d46145c) overwrite.foreach(updateComment) check(Some(1))("rO0ABXNyAApzY2FsYS5Tb21lESLyaV6hi3QCAAFMAAF4dAASTGphdmEvbGFuZy9PYmplY3Q7eHIADHNjYWxhLk9wdGlvbv5pN/3bDmZ0AgAAeHBzcgARamF2YS5sYW5nLkludGVnZXIS4qCk94GHOAIAAUkABXZhbHVleHIAEGphdmEubGFuZy5OdW1iZXKGrJUdC5TgiwIAAHhwAAAAAQ==") @@ -95,10 +95,13 @@ object Test extends App { import collection.{ mutable, immutable } class C - check(reflect.classTag[C])("rO0ABXNyAB5zY2FsYS5yZWZsZWN0LkNsYXNzVGFnJCRhbm9uJDG7ePPrmQBkhgIAAUwAD3J1bnRpbWVDbGFzczEkMXQAEUxqYXZhL2xhbmcvQ2xhc3M7eHB2cgAGVGVzdCRDAAAAAAAAAAAAAAB4cA==") - check(reflect.classTag[Int])("rO0ABXNyACVzY2FsYS5yZWZsZWN0Lk1hbmlmZXN0RmFjdG9yeSQkYW5vbiQ5zfmiSVNjtVICAAB4cgAcc2NhbGEucmVmbGVjdC5BbnlWYWxNYW5pZmVzdAAAAAAAAAABAgABTAAIdG9TdHJpbmd0ABJMamF2YS9sYW5nL1N0cmluZzt4cHQAA0ludA==") - check(reflect.classTag[String])("rO0ABXNyAB5zY2FsYS5yZWZsZWN0LkNsYXNzVGFnJCRhbm9uJDG7ePPrmQBkhgIAAUwAD3J1bnRpbWVDbGFzczEkMXQAEUxqYXZhL2xhbmcvQ2xhc3M7eHB2cgAQamF2YS5sYW5nLlN0cmluZ6DwpDh6O7NCAgAAeHA=") - check(reflect.classTag[Object])("rO0ABXNyACVzY2FsYS5yZWZsZWN0Lk1hbmlmZXN0RmFjdG9yeSQkYW5vbiQymPrtq/Ci1gsCAAB4cgAtc2NhbGEucmVmbGVjdC5NYW5pZmVzdEZhY3RvcnkkUGhhbnRvbU1hbmlmZXN0rzigP7KRh/kCAAFMAAh0b1N0cmluZ3QAEkxqYXZhL2xhbmcvU3RyaW5nO3hyAC9zY2FsYS5yZWZsZWN0Lk1hbmlmZXN0RmFjdG9yeSRDbGFzc1R5cGVNYW5pZmVzdFq6NWvfTgYFAgADTAAGcHJlZml4dAAOTHNjYWxhL09wdGlvbjtMAAxydW50aW1lQ2xhc3N0ABFMamF2YS9sYW5nL0NsYXNzO0wADXR5cGVBcmd1bWVudHN0ACFMc2NhbGEvY29sbGVjdGlvbi9pbW11dGFibGUvTGlzdDt4cHNyAAtzY2FsYS5Ob25lJEZQJPZTypSsAgAAeHIADHNjYWxhLk9wdGlvbv5pN/3bDmZ0AgAAeHB2cgAQamF2YS5sYW5nLk9iamVjdAAAAAAAAAAAAAAAeHBzcgAyc2NhbGEuY29sbGVjdGlvbi5pbW11dGFibGUuTGlzdCRTZXJpYWxpemF0aW9uUHJveHkAAAAAAAAAAQMAAHhwc3IALHNjYWxhLmNvbGxlY3Rpb24uaW1tdXRhYmxlLkxpc3RTZXJpYWxpemVFbmQkilxjW/dTC20CAAB4cHh0AAZPYmplY3Q=") + // TODO IMPLCLASS not stable across trait encoding change (removal of impl classes) + // java.io.InvalidClassException: scala.reflect.ClassTag$$anon$1; local class incompatible: stream classdesc serialVersionUID = -4937928798201944954, local class serialVersionUID = 4714485091895415501 + // Switch to using named, rather than anoymous classes, in the class tag implementation, or maybe use a `readResolve` / `writeReplace` approach. + // check(reflect.classTag[C])("rO0ABXNyAB5zY2FsYS5yZWZsZWN0LkNsYXNzVGFnJCRhbm9uJDG7ePPrmQBkhgIAAUwAD3J1bnRpbWVDbGFzczEkMXQAEUxqYXZhL2xhbmcvQ2xhc3M7eHB2cgAGVGVzdCRDAAAAAAAAAAAAAAB4cA==") + // check(reflect.classTag[Int])("rO0ABXNyACVzY2FsYS5yZWZsZWN0Lk1hbmlmZXN0RmFjdG9yeSQkYW5vbiQ5zfmiSVNjtVICAAB4cgAcc2NhbGEucmVmbGVjdC5BbnlWYWxNYW5pZmVzdAAAAAAAAAABAgABTAAIdG9TdHJpbmd0ABJMamF2YS9sYW5nL1N0cmluZzt4cHQAA0ludA==") + // check(reflect.classTag[String])("rO0ABXNyAB5zY2FsYS5yZWZsZWN0LkNsYXNzVGFnJCRhbm9uJDG7ePPrmQBkhgIAAUwAD3J1bnRpbWVDbGFzczEkMXQAEUxqYXZhL2xhbmcvQ2xhc3M7eHB2cgAQamF2YS5sYW5nLlN0cmluZ6DwpDh6O7NCAgAAeHA=") + // check(reflect.classTag[Object])("rO0ABXNyACVzY2FsYS5yZWZsZWN0Lk1hbmlmZXN0RmFjdG9yeSQkYW5vbiQymPrtq/Ci1gsCAAB4cgAtc2NhbGEucmVmbGVjdC5NYW5pZmVzdEZhY3RvcnkkUGhhbnRvbU1hbmlmZXN0rzigP7KRh/kCAAFMAAh0b1N0cmluZ3QAEkxqYXZhL2xhbmcvU3RyaW5nO3hyAC9zY2FsYS5yZWZsZWN0Lk1hbmlmZXN0RmFjdG9yeSRDbGFzc1R5cGVNYW5pZmVzdFq6NWvfTgYFAgADTAAGcHJlZml4dAAOTHNjYWxhL09wdGlvbjtMAAxydW50aW1lQ2xhc3N0ABFMamF2YS9sYW5nL0NsYXNzO0wADXR5cGVBcmd1bWVudHN0ACFMc2NhbGEvY29sbGVjdGlvbi9pbW11dGFibGUvTGlzdDt4cHNyAAtzY2FsYS5Ob25lJEZQJPZTypSsAgAAeHIADHNjYWxhLk9wdGlvbv5pN/3bDmZ0AgAAeHB2cgAQamF2YS5sYW5nLk9iamVjdAAAAAAAAAAAAAAAeHBzcgAyc2NhbGEuY29sbGVjdGlvbi5pbW11dGFibGUuTGlzdCRTZXJpYWxpemF0aW9uUHJveHkAAAAAAAAAAQMAAHhwc3IALHNjYWxhLmNvbGxlY3Rpb24uaW1tdXRhYmxlLkxpc3RTZXJpYWxpemVFbmQkilxjW/dTC20CAAB4cHh0AAZPYmplY3Q=") // TODO SI-8576 unstable under -Xcheckinit // check(Enum)( "rO0ABXNyAApUZXN0JEVudW0ketCIyQ8C23MCAAJMAAJWMXQAGUxzY2FsYS9FbnVtZXJhdGlvbiRWYWx1ZTtMAAJWMnQAF0xzY2FsYS9FbnVtZXJhdGlvbiRWYWw7eHIAEXNjYWxhLkVudW1lcmF0aW9udaDN3ZgOWY4CAAhJAAZuZXh0SWRJABtzY2FsYSRFbnVtZXJhdGlvbiQkYm90dG9tSWRJABhzY2FsYSRFbnVtZXJhdGlvbiQkdG9wSWRMABRWYWx1ZU9yZGVyaW5nJG1vZHVsZXQAIkxzY2FsYS9FbnVtZXJhdGlvbiRWYWx1ZU9yZGVyaW5nJDtMAA9WYWx1ZVNldCRtb2R1bGV0AB1Mc2NhbGEvRW51bWVyYXRpb24kVmFsdWVTZXQkO0wACG5leHROYW1ldAAbTHNjYWxhL2NvbGxlY3Rpb24vSXRlcmF0b3I7TAAXc2NhbGEkRW51bWVyYXRpb24kJG5tYXB0AB5Mc2NhbGEvY29sbGVjdGlvbi9tdXRhYmxlL01hcDtMABdzY2FsYSRFbnVtZXJhdGlvbiQkdm1hcHEAfgAHeHAAAAArAAAAAAAAACtwcHBzcgAgc2NhbGEuY29sbGVjdGlvbi5tdXRhYmxlLkhhc2hNYXAAAAAAAAAAAQMAAHhwdw0AAALuAAAAAAAAAAQAeHNxAH4ACXcNAAAC7gAAAAEAAAAEAHNyABFqYXZhLmxhbmcuSW50ZWdlchLioKT3gYc4AgABSQAFdmFsdWV4cgAQamF2YS5sYW5nLk51bWJlcoaslR0LlOCLAgAAeHAAAAAqc3IAFXNjYWxhLkVudW1lcmF0aW9uJFZhbM9pZ6/J/O1PAgACSQAYc2NhbGEkRW51bWVyYXRpb24kVmFsJCRpTAAEbmFtZXQAEkxqYXZhL2xhbmcvU3RyaW5nO3hyABdzY2FsYS5FbnVtZXJhdGlvbiRWYWx1ZWJpfC/tIR1RAgACTAAGJG91dGVydAATTHNjYWxhL0VudW1lcmF0aW9uO0wAHHNjYWxhJEVudW1lcmF0aW9uJCRvdXRlckVudW1xAH4AEnhwcQB+AAhxAH4ACAAAACpweHNyABFUZXN0JEVudW0kJGFub24kMVlIjlmE1sXaAgAAeHEAfgARcQB+AAhxAH4ACHEAfgAT") @@ -116,6 +119,20 @@ object Test extends App { // TODO SI-8576 unstable under -Xcheckinit check(collection.convert.Wrappers)( "rO0ABXNyACJzY2FsYS5jb2xsZWN0aW9uLmNvbnZlcnQuV3JhcHBlcnMkrrSziizavIECABJMABhEaWN0aW9uYXJ5V3JhcHBlciRtb2R1bGV0ADZMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJERpY3Rpb25hcnlXcmFwcGVyJDtMABZJdGVyYWJsZVdyYXBwZXIkbW9kdWxldAA0THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRJdGVyYWJsZVdyYXBwZXIkO0wAFkl0ZXJhdG9yV3JhcHBlciRtb2R1bGV0ADRMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEl0ZXJhdG9yV3JhcHBlciQ7TAAZSkNvbGxlY3Rpb25XcmFwcGVyJG1vZHVsZXQAN0xzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkNvbGxlY3Rpb25XcmFwcGVyJDtMABxKQ29uY3VycmVudE1hcFdyYXBwZXIkbW9kdWxldAA6THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKQ29uY3VycmVudE1hcFdyYXBwZXIkO0wAGUpEaWN0aW9uYXJ5V3JhcHBlciRtb2R1bGV0ADdMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpEaWN0aW9uYXJ5V3JhcHBlciQ7TAAaSkVudW1lcmF0aW9uV3JhcHBlciRtb2R1bGV0ADhMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpFbnVtZXJhdGlvbldyYXBwZXIkO0wAF0pJdGVyYWJsZVdyYXBwZXIkbW9kdWxldAA1THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKSXRlcmFibGVXcmFwcGVyJDtMABdKSXRlcmF0b3JXcmFwcGVyJG1vZHVsZXQANUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkl0ZXJhdG9yV3JhcHBlciQ7TAATSkxpc3RXcmFwcGVyJG1vZHVsZXQAMUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkxpc3RXcmFwcGVyJDtMABJKTWFwV3JhcHBlciRtb2R1bGV0ADBMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpNYXBXcmFwcGVyJDtMABlKUHJvcGVydGllc1dyYXBwZXIkbW9kdWxldAA3THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKUHJvcGVydGllc1dyYXBwZXIkO0wAEkpTZXRXcmFwcGVyJG1vZHVsZXQAMExzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSlNldFdyYXBwZXIkO0wAG011dGFibGVCdWZmZXJXcmFwcGVyJG1vZHVsZXQAOUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZUJ1ZmZlcldyYXBwZXIkO0wAGE11dGFibGVNYXBXcmFwcGVyJG1vZHVsZXQANkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZU1hcFdyYXBwZXIkO0wAGE11dGFibGVTZXFXcmFwcGVyJG1vZHVsZXQANkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZVNlcVdyYXBwZXIkO0wAGE11dGFibGVTZXRXcmFwcGVyJG1vZHVsZXQANkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZVNldFdyYXBwZXIkO0wAEVNlcVdyYXBwZXIkbW9kdWxldAAvTHNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRTZXFXcmFwcGVyJDt4cHBwcHBwcHBwcHBwcHBwcHBwcA==") + // TODO IMPLCLASS java.io.InvalidClassException: scala.collection.immutable.Set$EmptySet$; local class incompatible: stream classdesc serialVersionUID = -1118802231467657162, local class serialVersionUID = -5214304379191661165 + // check(new collection.convert.Wrappers.SetWrapper(immutable.Set()))("rO0ABXNyACxzY2FsYS5jb2xsZWN0aW9uLmNvbnZlcnQuV3JhcHBlcnMkU2V0V3JhcHBlcgAAAAAAAAABAgACTAAGJG91dGVydAAjTHNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycztMADhzY2FsYSRjb2xsZWN0aW9uJGNvbnZlcnQkV3JhcHBlcnMkU2V0V3JhcHBlciQkdW5kZXJseWluZ3QAFkxzY2FsYS9jb2xsZWN0aW9uL1NldDt4cHNyACJzY2FsYS5jb2xsZWN0aW9uLmNvbnZlcnQuV3JhcHBlcnMkrrSziizavIECABJMABhEaWN0aW9uYXJ5V3JhcHBlciRtb2R1bGV0ADZMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJERpY3Rpb25hcnlXcmFwcGVyJDtMABZJdGVyYWJsZVdyYXBwZXIkbW9kdWxldAA0THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRJdGVyYWJsZVdyYXBwZXIkO0wAFkl0ZXJhdG9yV3JhcHBlciRtb2R1bGV0ADRMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEl0ZXJhdG9yV3JhcHBlciQ7TAAZSkNvbGxlY3Rpb25XcmFwcGVyJG1vZHVsZXQAN0xzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkNvbGxlY3Rpb25XcmFwcGVyJDtMABxKQ29uY3VycmVudE1hcFdyYXBwZXIkbW9kdWxldAA6THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKQ29uY3VycmVudE1hcFdyYXBwZXIkO0wAGUpEaWN0aW9uYXJ5V3JhcHBlciRtb2R1bGV0ADdMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpEaWN0aW9uYXJ5V3JhcHBlciQ7TAAaSkVudW1lcmF0aW9uV3JhcHBlciRtb2R1bGV0ADhMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpFbnVtZXJhdGlvbldyYXBwZXIkO0wAF0pJdGVyYWJsZVdyYXBwZXIkbW9kdWxldAA1THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKSXRlcmFibGVXcmFwcGVyJDtMABdKSXRlcmF0b3JXcmFwcGVyJG1vZHVsZXQANUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkl0ZXJhdG9yV3JhcHBlciQ7TAATSkxpc3RXcmFwcGVyJG1vZHVsZXQAMUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkxpc3RXcmFwcGVyJDtMABJKTWFwV3JhcHBlciRtb2R1bGV0ADBMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpNYXBXcmFwcGVyJDtMABlKUHJvcGVydGllc1dyYXBwZXIkbW9kdWxldAA3THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKUHJvcGVydGllc1dyYXBwZXIkO0wAEkpTZXRXcmFwcGVyJG1vZHVsZXQAMExzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSlNldFdyYXBwZXIkO0wAG011dGFibGVCdWZmZXJXcmFwcGVyJG1vZHVsZXQAOUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZUJ1ZmZlcldyYXBwZXIkO0wAGE11dGFibGVNYXBXcmFwcGVyJG1vZHVsZXQANkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZU1hcFdyYXBwZXIkO0wAGE11dGFibGVTZXFXcmFwcGVyJG1vZHVsZXQANkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZVNlcVdyYXBwZXIkO0wAGE11dGFibGVTZXRXcmFwcGVyJG1vZHVsZXQANkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZVNldFdyYXBwZXIkO0wAEVNlcVdyYXBwZXIkbW9kdWxldAAvTHNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRTZXFXcmFwcGVyJDt4cHBwcHBwcHBwcHBwcHBwcHBwcHNyAChzY2FsYS5jb2xsZWN0aW9uLmltbXV0YWJsZS5TZXQkRW1wdHlTZXQk8Hk3TFN0uDYCAAB4cA==") + check(new collection.convert.Wrappers.SetWrapper(immutable.Set(1, 2, 3)))("rO0ABXNyACxzY2FsYS5jb2xsZWN0aW9uLmNvbnZlcnQuV3JhcHBlcnMkU2V0V3JhcHBlcgAAAAAAAAABAgACTAAGJG91dGVydAAjTHNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycztMADhzY2FsYSRjb2xsZWN0aW9uJGNvbnZlcnQkV3JhcHBlcnMkU2V0V3JhcHBlciQkdW5kZXJseWluZ3QAFkxzY2FsYS9jb2xsZWN0aW9uL1NldDt4cHNyACJzY2FsYS5jb2xsZWN0aW9uLmNvbnZlcnQuV3JhcHBlcnMkrrSziizavIECABJMABhEaWN0aW9uYXJ5V3JhcHBlciRtb2R1bGV0ADZMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJERpY3Rpb25hcnlXcmFwcGVyJDtMABZJdGVyYWJsZVdyYXBwZXIkbW9kdWxldAA0THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRJdGVyYWJsZVdyYXBwZXIkO0wAFkl0ZXJhdG9yV3JhcHBlciRtb2R1bGV0ADRMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEl0ZXJhdG9yV3JhcHBlciQ7TAAZSkNvbGxlY3Rpb25XcmFwcGVyJG1vZHVsZXQAN0xzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkNvbGxlY3Rpb25XcmFwcGVyJDtMABxKQ29uY3VycmVudE1hcFdyYXBwZXIkbW9kdWxldAA6THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKQ29uY3VycmVudE1hcFdyYXBwZXIkO0wAGUpEaWN0aW9uYXJ5V3JhcHBlciRtb2R1bGV0ADdMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpEaWN0aW9uYXJ5V3JhcHBlciQ7TAAaSkVudW1lcmF0aW9uV3JhcHBlciRtb2R1bGV0ADhMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpFbnVtZXJhdGlvbldyYXBwZXIkO0wAF0pJdGVyYWJsZVdyYXBwZXIkbW9kdWxldAA1THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKSXRlcmFibGVXcmFwcGVyJDtMABdKSXRlcmF0b3JXcmFwcGVyJG1vZHVsZXQANUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkl0ZXJhdG9yV3JhcHBlciQ7TAATSkxpc3RXcmFwcGVyJG1vZHVsZXQAMUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkxpc3RXcmFwcGVyJDtMABJKTWFwV3JhcHBlciRtb2R1bGV0ADBMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpNYXBXcmFwcGVyJDtMABlKUHJvcGVydGllc1dyYXBwZXIkbW9kdWxldAA3THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKUHJvcGVydGllc1dyYXBwZXIkO0wAEkpTZXRXcmFwcGVyJG1vZHVsZXQAMExzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSlNldFdyYXBwZXIkO0wAG011dGFibGVCdWZmZXJXcmFwcGVyJG1vZHVsZXQAOUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZUJ1ZmZlcldyYXBwZXIkO0wAGE11dGFibGVNYXBXcmFwcGVyJG1vZHVsZXQANkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZU1hcFdyYXBwZXIkO0wAGE11dGFibGVTZXFXcmFwcGVyJG1vZHVsZXQANkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZVNlcVdyYXBwZXIkO0wAGE11dGFibGVTZXRXcmFwcGVyJG1vZHVsZXQANkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZVNldFdyYXBwZXIkO0wAEVNlcVdyYXBwZXIkbW9kdWxldAAvTHNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRTZXFXcmFwcGVyJDt4cHBwcHBwcHBwcHBwcHBwcHBwcHNyACNzY2FsYS5jb2xsZWN0aW9uLmltbXV0YWJsZS5TZXQkU2V0M84syT0560SgAgADTAAFZWxlbTF0ABJMamF2YS9sYW5nL09iamVjdDtMAAVlbGVtMnEAfgAZTAAFZWxlbTNxAH4AGXhwc3IAEWphdmEubGFuZy5JbnRlZ2VyEuKgpPeBhzgCAAFJAAV2YWx1ZXhyABBqYXZhLmxhbmcuTnVtYmVyhqyVHQuU4IsCAAB4cAAAAAFzcQB+ABsAAAACc3EAfgAbAAAAAw==") + check(new collection.convert.Wrappers.SetWrapper(mutable.Set()))("rO0ABXNyACxzY2FsYS5jb2xsZWN0aW9uLmNvbnZlcnQuV3JhcHBlcnMkU2V0V3JhcHBlcgAAAAAAAAABAgACTAAGJG91dGVydAAjTHNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycztMADhzY2FsYSRjb2xsZWN0aW9uJGNvbnZlcnQkV3JhcHBlcnMkU2V0V3JhcHBlciQkdW5kZXJseWluZ3QAFkxzY2FsYS9jb2xsZWN0aW9uL1NldDt4cHNyACJzY2FsYS5jb2xsZWN0aW9uLmNvbnZlcnQuV3JhcHBlcnMkrrSziizavIECABJMABhEaWN0aW9uYXJ5V3JhcHBlciRtb2R1bGV0ADZMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJERpY3Rpb25hcnlXcmFwcGVyJDtMABZJdGVyYWJsZVdyYXBwZXIkbW9kdWxldAA0THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRJdGVyYWJsZVdyYXBwZXIkO0wAFkl0ZXJhdG9yV3JhcHBlciRtb2R1bGV0ADRMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEl0ZXJhdG9yV3JhcHBlciQ7TAAZSkNvbGxlY3Rpb25XcmFwcGVyJG1vZHVsZXQAN0xzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkNvbGxlY3Rpb25XcmFwcGVyJDtMABxKQ29uY3VycmVudE1hcFdyYXBwZXIkbW9kdWxldAA6THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKQ29uY3VycmVudE1hcFdyYXBwZXIkO0wAGUpEaWN0aW9uYXJ5V3JhcHBlciRtb2R1bGV0ADdMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpEaWN0aW9uYXJ5V3JhcHBlciQ7TAAaSkVudW1lcmF0aW9uV3JhcHBlciRtb2R1bGV0ADhMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpFbnVtZXJhdGlvbldyYXBwZXIkO0wAF0pJdGVyYWJsZVdyYXBwZXIkbW9kdWxldAA1THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKSXRlcmFibGVXcmFwcGVyJDtMABdKSXRlcmF0b3JXcmFwcGVyJG1vZHVsZXQANUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkl0ZXJhdG9yV3JhcHBlciQ7TAATSkxpc3RXcmFwcGVyJG1vZHVsZXQAMUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkxpc3RXcmFwcGVyJDtMABJKTWFwV3JhcHBlciRtb2R1bGV0ADBMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpNYXBXcmFwcGVyJDtMABlKUHJvcGVydGllc1dyYXBwZXIkbW9kdWxldAA3THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKUHJvcGVydGllc1dyYXBwZXIkO0wAEkpTZXRXcmFwcGVyJG1vZHVsZXQAMExzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSlNldFdyYXBwZXIkO0wAG011dGFibGVCdWZmZXJXcmFwcGVyJG1vZHVsZXQAOUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZUJ1ZmZlcldyYXBwZXIkO0wAGE11dGFibGVNYXBXcmFwcGVyJG1vZHVsZXQANkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZU1hcFdyYXBwZXIkO0wAGE11dGFibGVTZXFXcmFwcGVyJG1vZHVsZXQANkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZVNlcVdyYXBwZXIkO0wAGE11dGFibGVTZXRXcmFwcGVyJG1vZHVsZXQANkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZVNldFdyYXBwZXIkO0wAEVNlcVdyYXBwZXIkbW9kdWxldAAvTHNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRTZXFXcmFwcGVyJDt4cHBwcHBwcHBwcHBwcHBwcHBwcHNyACBzY2FsYS5jb2xsZWN0aW9uLm11dGFibGUuSGFzaFNldAAAAAAAAAABAwAAeHB3DQAAAcIAAAAAAAAABQB4") + check(new collection.convert.Wrappers.SetWrapper(mutable.Set(1, 2, 3)))("rO0ABXNyACxzY2FsYS5jb2xsZWN0aW9uLmNvbnZlcnQuV3JhcHBlcnMkU2V0V3JhcHBlcgAAAAAAAAABAgACTAAGJG91dGVydAAjTHNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycztMADhzY2FsYSRjb2xsZWN0aW9uJGNvbnZlcnQkV3JhcHBlcnMkU2V0V3JhcHBlciQkdW5kZXJseWluZ3QAFkxzY2FsYS9jb2xsZWN0aW9uL1NldDt4cHNyACJzY2FsYS5jb2xsZWN0aW9uLmNvbnZlcnQuV3JhcHBlcnMkrrSziizavIECABJMABhEaWN0aW9uYXJ5V3JhcHBlciRtb2R1bGV0ADZMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJERpY3Rpb25hcnlXcmFwcGVyJDtMABZJdGVyYWJsZVdyYXBwZXIkbW9kdWxldAA0THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRJdGVyYWJsZVdyYXBwZXIkO0wAFkl0ZXJhdG9yV3JhcHBlciRtb2R1bGV0ADRMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEl0ZXJhdG9yV3JhcHBlciQ7TAAZSkNvbGxlY3Rpb25XcmFwcGVyJG1vZHVsZXQAN0xzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkNvbGxlY3Rpb25XcmFwcGVyJDtMABxKQ29uY3VycmVudE1hcFdyYXBwZXIkbW9kdWxldAA6THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKQ29uY3VycmVudE1hcFdyYXBwZXIkO0wAGUpEaWN0aW9uYXJ5V3JhcHBlciRtb2R1bGV0ADdMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpEaWN0aW9uYXJ5V3JhcHBlciQ7TAAaSkVudW1lcmF0aW9uV3JhcHBlciRtb2R1bGV0ADhMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpFbnVtZXJhdGlvbldyYXBwZXIkO0wAF0pJdGVyYWJsZVdyYXBwZXIkbW9kdWxldAA1THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKSXRlcmFibGVXcmFwcGVyJDtMABdKSXRlcmF0b3JXcmFwcGVyJG1vZHVsZXQANUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkl0ZXJhdG9yV3JhcHBlciQ7TAATSkxpc3RXcmFwcGVyJG1vZHVsZXQAMUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkxpc3RXcmFwcGVyJDtMABJKTWFwV3JhcHBlciRtb2R1bGV0ADBMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpNYXBXcmFwcGVyJDtMABlKUHJvcGVydGllc1dyYXBwZXIkbW9kdWxldAA3THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKUHJvcGVydGllc1dyYXBwZXIkO0wAEkpTZXRXcmFwcGVyJG1vZHVsZXQAMExzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSlNldFdyYXBwZXIkO0wAG011dGFibGVCdWZmZXJXcmFwcGVyJG1vZHVsZXQAOUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZUJ1ZmZlcldyYXBwZXIkO0wAGE11dGFibGVNYXBXcmFwcGVyJG1vZHVsZXQANkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZU1hcFdyYXBwZXIkO0wAGE11dGFibGVTZXFXcmFwcGVyJG1vZHVsZXQANkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZVNlcVdyYXBwZXIkO0wAGE11dGFibGVTZXRXcmFwcGVyJG1vZHVsZXQANkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZVNldFdyYXBwZXIkO0wAEVNlcVdyYXBwZXIkbW9kdWxldAAvTHNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRTZXFXcmFwcGVyJDt4cHBwcHBwcHBwcHBwcHBwcHBwcHNyACBzY2FsYS5jb2xsZWN0aW9uLm11dGFibGUuSGFzaFNldAAAAAAAAAABAwAAeHB3DQAAAcIAAAADAAAABQBzcgARamF2YS5sYW5nLkludGVnZXIS4qCk94GHOAIAAUkABXZhbHVleHIAEGphdmEubGFuZy5OdW1iZXKGrJUdC5TgiwIAAHhwAAAAAXNxAH4AGgAAAAJzcQB+ABoAAAADeA==") + check(new collection.convert.Wrappers.MutableSetWrapper(mutable.Set()))("rO0ABXNyADNzY2FsYS5jb2xsZWN0aW9uLmNvbnZlcnQuV3JhcHBlcnMkTXV0YWJsZVNldFdyYXBwZXK9XXTONonwwgIAAUwACnVuZGVybHlpbmd0AB5Mc2NhbGEvY29sbGVjdGlvbi9tdXRhYmxlL1NldDt4cgAsc2NhbGEuY29sbGVjdGlvbi5jb252ZXJ0LldyYXBwZXJzJFNldFdyYXBwZXIAAAAAAAAAAQIAAkwABiRvdXRlcnQAI0xzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnM7TAA4c2NhbGEkY29sbGVjdGlvbiRjb252ZXJ0JFdyYXBwZXJzJFNldFdyYXBwZXIkJHVuZGVybHlpbmd0ABZMc2NhbGEvY29sbGVjdGlvbi9TZXQ7eHBzcgAic2NhbGEuY29sbGVjdGlvbi5jb252ZXJ0LldyYXBwZXJzJK60s4os2ryBAgASTAAYRGljdGlvbmFyeVdyYXBwZXIkbW9kdWxldAA2THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyREaWN0aW9uYXJ5V3JhcHBlciQ7TAAWSXRlcmFibGVXcmFwcGVyJG1vZHVsZXQANExzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSXRlcmFibGVXcmFwcGVyJDtMABZJdGVyYXRvcldyYXBwZXIkbW9kdWxldAA0THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRJdGVyYXRvcldyYXBwZXIkO0wAGUpDb2xsZWN0aW9uV3JhcHBlciRtb2R1bGV0ADdMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpDb2xsZWN0aW9uV3JhcHBlciQ7TAAcSkNvbmN1cnJlbnRNYXBXcmFwcGVyJG1vZHVsZXQAOkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkNvbmN1cnJlbnRNYXBXcmFwcGVyJDtMABlKRGljdGlvbmFyeVdyYXBwZXIkbW9kdWxldAA3THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKRGljdGlvbmFyeVdyYXBwZXIkO0wAGkpFbnVtZXJhdGlvbldyYXBwZXIkbW9kdWxldAA4THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKRW51bWVyYXRpb25XcmFwcGVyJDtMABdKSXRlcmFibGVXcmFwcGVyJG1vZHVsZXQANUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkl0ZXJhYmxlV3JhcHBlciQ7TAAXSkl0ZXJhdG9yV3JhcHBlciRtb2R1bGV0ADVMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpJdGVyYXRvcldyYXBwZXIkO0wAE0pMaXN0V3JhcHBlciRtb2R1bGV0ADFMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpMaXN0V3JhcHBlciQ7TAASSk1hcFdyYXBwZXIkbW9kdWxldAAwTHNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKTWFwV3JhcHBlciQ7TAAZSlByb3BlcnRpZXNXcmFwcGVyJG1vZHVsZXQAN0xzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSlByb3BlcnRpZXNXcmFwcGVyJDtMABJKU2V0V3JhcHBlciRtb2R1bGV0ADBMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpTZXRXcmFwcGVyJDtMABtNdXRhYmxlQnVmZmVyV3JhcHBlciRtb2R1bGV0ADlMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJE11dGFibGVCdWZmZXJXcmFwcGVyJDtMABhNdXRhYmxlTWFwV3JhcHBlciRtb2R1bGV0ADZMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJE11dGFibGVNYXBXcmFwcGVyJDtMABhNdXRhYmxlU2VxV3JhcHBlciRtb2R1bGV0ADZMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJE11dGFibGVTZXFXcmFwcGVyJDtMABhNdXRhYmxlU2V0V3JhcHBlciRtb2R1bGV0ADZMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJE11dGFibGVTZXRXcmFwcGVyJDtMABFTZXFXcmFwcGVyJG1vZHVsZXQAL0xzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkU2VxV3JhcHBlciQ7eHBwcHBwcHBwcHBwcHBwcHBwcHBzcgAgc2NhbGEuY29sbGVjdGlvbi5tdXRhYmxlLkhhc2hTZXQAAAAAAAAAAQMAAHhwdw0AAAHCAAAAAAAAAAUAeHEAfgAb") + check(new collection.convert.Wrappers.MutableSetWrapper(mutable.Set(1, 2, 3)))("rO0ABXNyADNzY2FsYS5jb2xsZWN0aW9uLmNvbnZlcnQuV3JhcHBlcnMkTXV0YWJsZVNldFdyYXBwZXK9XXTONonwwgIAAUwACnVuZGVybHlpbmd0AB5Mc2NhbGEvY29sbGVjdGlvbi9tdXRhYmxlL1NldDt4cgAsc2NhbGEuY29sbGVjdGlvbi5jb252ZXJ0LldyYXBwZXJzJFNldFdyYXBwZXIAAAAAAAAAAQIAAkwABiRvdXRlcnQAI0xzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnM7TAA4c2NhbGEkY29sbGVjdGlvbiRjb252ZXJ0JFdyYXBwZXJzJFNldFdyYXBwZXIkJHVuZGVybHlpbmd0ABZMc2NhbGEvY29sbGVjdGlvbi9TZXQ7eHBzcgAic2NhbGEuY29sbGVjdGlvbi5jb252ZXJ0LldyYXBwZXJzJK60s4os2ryBAgASTAAYRGljdGlvbmFyeVdyYXBwZXIkbW9kdWxldAA2THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyREaWN0aW9uYXJ5V3JhcHBlciQ7TAAWSXRlcmFibGVXcmFwcGVyJG1vZHVsZXQANExzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSXRlcmFibGVXcmFwcGVyJDtMABZJdGVyYXRvcldyYXBwZXIkbW9kdWxldAA0THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRJdGVyYXRvcldyYXBwZXIkO0wAGUpDb2xsZWN0aW9uV3JhcHBlciRtb2R1bGV0ADdMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpDb2xsZWN0aW9uV3JhcHBlciQ7TAAcSkNvbmN1cnJlbnRNYXBXcmFwcGVyJG1vZHVsZXQAOkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkNvbmN1cnJlbnRNYXBXcmFwcGVyJDtMABlKRGljdGlvbmFyeVdyYXBwZXIkbW9kdWxldAA3THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKRGljdGlvbmFyeVdyYXBwZXIkO0wAGkpFbnVtZXJhdGlvbldyYXBwZXIkbW9kdWxldAA4THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKRW51bWVyYXRpb25XcmFwcGVyJDtMABdKSXRlcmFibGVXcmFwcGVyJG1vZHVsZXQANUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkl0ZXJhYmxlV3JhcHBlciQ7TAAXSkl0ZXJhdG9yV3JhcHBlciRtb2R1bGV0ADVMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpJdGVyYXRvcldyYXBwZXIkO0wAE0pMaXN0V3JhcHBlciRtb2R1bGV0ADFMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpMaXN0V3JhcHBlciQ7TAASSk1hcFdyYXBwZXIkbW9kdWxldAAwTHNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKTWFwV3JhcHBlciQ7TAAZSlByb3BlcnRpZXNXcmFwcGVyJG1vZHVsZXQAN0xzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSlByb3BlcnRpZXNXcmFwcGVyJDtMABJKU2V0V3JhcHBlciRtb2R1bGV0ADBMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpTZXRXcmFwcGVyJDtMABtNdXRhYmxlQnVmZmVyV3JhcHBlciRtb2R1bGV0ADlMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJE11dGFibGVCdWZmZXJXcmFwcGVyJDtMABhNdXRhYmxlTWFwV3JhcHBlciRtb2R1bGV0ADZMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJE11dGFibGVNYXBXcmFwcGVyJDtMABhNdXRhYmxlU2VxV3JhcHBlciRtb2R1bGV0ADZMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJE11dGFibGVTZXFXcmFwcGVyJDtMABhNdXRhYmxlU2V0V3JhcHBlciRtb2R1bGV0ADZMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJE11dGFibGVTZXRXcmFwcGVyJDtMABFTZXFXcmFwcGVyJG1vZHVsZXQAL0xzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkU2VxV3JhcHBlciQ7eHBwcHBwcHBwcHBwcHBwcHBwcHBzcgAgc2NhbGEuY29sbGVjdGlvbi5tdXRhYmxlLkhhc2hTZXQAAAAAAAAAAQMAAHhwdw0AAAHCAAAAAwAAAAUAc3IAEWphdmEubGFuZy5JbnRlZ2VyEuKgpPeBhzgCAAFJAAV2YWx1ZXhyABBqYXZhLmxhbmcuTnVtYmVyhqyVHQuU4IsCAAB4cAAAAAFzcQB+ABwAAAACc3EAfgAcAAAAA3hxAH4AGw==") + check(new collection.convert.Wrappers.MapWrapper(immutable.Map()))("rO0ABXNyACxzY2FsYS5jb2xsZWN0aW9uLmNvbnZlcnQuV3JhcHBlcnMkTWFwV3JhcHBlcgAAAAAAAAABAgACTAAGJG91dGVydAAjTHNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycztMADhzY2FsYSRjb2xsZWN0aW9uJGNvbnZlcnQkV3JhcHBlcnMkTWFwV3JhcHBlciQkdW5kZXJseWluZ3QAFkxzY2FsYS9jb2xsZWN0aW9uL01hcDt4cHNyACJzY2FsYS5jb2xsZWN0aW9uLmNvbnZlcnQuV3JhcHBlcnMkrrSziizavIECABJMABhEaWN0aW9uYXJ5V3JhcHBlciRtb2R1bGV0ADZMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJERpY3Rpb25hcnlXcmFwcGVyJDtMABZJdGVyYWJsZVdyYXBwZXIkbW9kdWxldAA0THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRJdGVyYWJsZVdyYXBwZXIkO0wAFkl0ZXJhdG9yV3JhcHBlciRtb2R1bGV0ADRMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEl0ZXJhdG9yV3JhcHBlciQ7TAAZSkNvbGxlY3Rpb25XcmFwcGVyJG1vZHVsZXQAN0xzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkNvbGxlY3Rpb25XcmFwcGVyJDtMABxKQ29uY3VycmVudE1hcFdyYXBwZXIkbW9kdWxldAA6THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKQ29uY3VycmVudE1hcFdyYXBwZXIkO0wAGUpEaWN0aW9uYXJ5V3JhcHBlciRtb2R1bGV0ADdMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpEaWN0aW9uYXJ5V3JhcHBlciQ7TAAaSkVudW1lcmF0aW9uV3JhcHBlciRtb2R1bGV0ADhMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpFbnVtZXJhdGlvbldyYXBwZXIkO0wAF0pJdGVyYWJsZVdyYXBwZXIkbW9kdWxldAA1THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKSXRlcmFibGVXcmFwcGVyJDtMABdKSXRlcmF0b3JXcmFwcGVyJG1vZHVsZXQANUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkl0ZXJhdG9yV3JhcHBlciQ7TAATSkxpc3RXcmFwcGVyJG1vZHVsZXQAMUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkxpc3RXcmFwcGVyJDtMABJKTWFwV3JhcHBlciRtb2R1bGV0ADBMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpNYXBXcmFwcGVyJDtMABlKUHJvcGVydGllc1dyYXBwZXIkbW9kdWxldAA3THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKUHJvcGVydGllc1dyYXBwZXIkO0wAEkpTZXRXcmFwcGVyJG1vZHVsZXQAMExzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSlNldFdyYXBwZXIkO0wAG011dGFibGVCdWZmZXJXcmFwcGVyJG1vZHVsZXQAOUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZUJ1ZmZlcldyYXBwZXIkO0wAGE11dGFibGVNYXBXcmFwcGVyJG1vZHVsZXQANkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZU1hcFdyYXBwZXIkO0wAGE11dGFibGVTZXFXcmFwcGVyJG1vZHVsZXQANkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZVNlcVdyYXBwZXIkO0wAGE11dGFibGVTZXRXcmFwcGVyJG1vZHVsZXQANkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZVNldFdyYXBwZXIkO0wAEVNlcVdyYXBwZXIkbW9kdWxldAAvTHNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRTZXFXcmFwcGVyJDt4cHBwcHBwcHBwcHBwcHBwcHBwcHNyAChzY2FsYS5jb2xsZWN0aW9uLmltbXV0YWJsZS5NYXAkRW1wdHlNYXAknTcK54mVQiQCAAB4cA==") + check(new collection.convert.Wrappers.MapWrapper(immutable.Map[Int, Int](1 -> 2, 2 -> 3, 3 -> 4)))("rO0ABXNyACxzY2FsYS5jb2xsZWN0aW9uLmNvbnZlcnQuV3JhcHBlcnMkTWFwV3JhcHBlcgAAAAAAAAABAgACTAAGJG91dGVydAAjTHNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycztMADhzY2FsYSRjb2xsZWN0aW9uJGNvbnZlcnQkV3JhcHBlcnMkTWFwV3JhcHBlciQkdW5kZXJseWluZ3QAFkxzY2FsYS9jb2xsZWN0aW9uL01hcDt4cHNyACJzY2FsYS5jb2xsZWN0aW9uLmNvbnZlcnQuV3JhcHBlcnMkrrSziizavIECABJMABhEaWN0aW9uYXJ5V3JhcHBlciRtb2R1bGV0ADZMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJERpY3Rpb25hcnlXcmFwcGVyJDtMABZJdGVyYWJsZVdyYXBwZXIkbW9kdWxldAA0THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRJdGVyYWJsZVdyYXBwZXIkO0wAFkl0ZXJhdG9yV3JhcHBlciRtb2R1bGV0ADRMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEl0ZXJhdG9yV3JhcHBlciQ7TAAZSkNvbGxlY3Rpb25XcmFwcGVyJG1vZHVsZXQAN0xzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkNvbGxlY3Rpb25XcmFwcGVyJDtMABxKQ29uY3VycmVudE1hcFdyYXBwZXIkbW9kdWxldAA6THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKQ29uY3VycmVudE1hcFdyYXBwZXIkO0wAGUpEaWN0aW9uYXJ5V3JhcHBlciRtb2R1bGV0ADdMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpEaWN0aW9uYXJ5V3JhcHBlciQ7TAAaSkVudW1lcmF0aW9uV3JhcHBlciRtb2R1bGV0ADhMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpFbnVtZXJhdGlvbldyYXBwZXIkO0wAF0pJdGVyYWJsZVdyYXBwZXIkbW9kdWxldAA1THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKSXRlcmFibGVXcmFwcGVyJDtMABdKSXRlcmF0b3JXcmFwcGVyJG1vZHVsZXQANUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkl0ZXJhdG9yV3JhcHBlciQ7TAATSkxpc3RXcmFwcGVyJG1vZHVsZXQAMUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkxpc3RXcmFwcGVyJDtMABJKTWFwV3JhcHBlciRtb2R1bGV0ADBMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpNYXBXcmFwcGVyJDtMABlKUHJvcGVydGllc1dyYXBwZXIkbW9kdWxldAA3THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKUHJvcGVydGllc1dyYXBwZXIkO0wAEkpTZXRXcmFwcGVyJG1vZHVsZXQAMExzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSlNldFdyYXBwZXIkO0wAG011dGFibGVCdWZmZXJXcmFwcGVyJG1vZHVsZXQAOUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZUJ1ZmZlcldyYXBwZXIkO0wAGE11dGFibGVNYXBXcmFwcGVyJG1vZHVsZXQANkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZU1hcFdyYXBwZXIkO0wAGE11dGFibGVTZXFXcmFwcGVyJG1vZHVsZXQANkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZVNlcVdyYXBwZXIkO0wAGE11dGFibGVTZXRXcmFwcGVyJG1vZHVsZXQANkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZVNldFdyYXBwZXIkO0wAEVNlcVdyYXBwZXIkbW9kdWxldAAvTHNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRTZXFXcmFwcGVyJDt4cHBwcHBwcHBwcHBwcHBwcHBwcHNyACNzY2FsYS5jb2xsZWN0aW9uLmltbXV0YWJsZS5NYXAkTWFwM6csFD+HjyRxAgAGTAAEa2V5MXQAEkxqYXZhL2xhbmcvT2JqZWN0O0wABGtleTJxAH4AGUwABGtleTNxAH4AGUwABnZhbHVlMXEAfgAZTAAGdmFsdWUycQB+ABlMAAZ2YWx1ZTNxAH4AGXhwc3IAEWphdmEubGFuZy5JbnRlZ2VyEuKgpPeBhzgCAAFJAAV2YWx1ZXhyABBqYXZhLmxhbmcuTnVtYmVyhqyVHQuU4IsCAAB4cAAAAAFzcQB+ABsAAAACc3EAfgAbAAAAA3EAfgAecQB+AB9zcQB+ABsAAAAE") + check(new collection.convert.Wrappers.MapWrapper(mutable.Map()))("rO0ABXNyACxzY2FsYS5jb2xsZWN0aW9uLmNvbnZlcnQuV3JhcHBlcnMkTWFwV3JhcHBlcgAAAAAAAAABAgACTAAGJG91dGVydAAjTHNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycztMADhzY2FsYSRjb2xsZWN0aW9uJGNvbnZlcnQkV3JhcHBlcnMkTWFwV3JhcHBlciQkdW5kZXJseWluZ3QAFkxzY2FsYS9jb2xsZWN0aW9uL01hcDt4cHNyACJzY2FsYS5jb2xsZWN0aW9uLmNvbnZlcnQuV3JhcHBlcnMkrrSziizavIECABJMABhEaWN0aW9uYXJ5V3JhcHBlciRtb2R1bGV0ADZMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJERpY3Rpb25hcnlXcmFwcGVyJDtMABZJdGVyYWJsZVdyYXBwZXIkbW9kdWxldAA0THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRJdGVyYWJsZVdyYXBwZXIkO0wAFkl0ZXJhdG9yV3JhcHBlciRtb2R1bGV0ADRMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEl0ZXJhdG9yV3JhcHBlciQ7TAAZSkNvbGxlY3Rpb25XcmFwcGVyJG1vZHVsZXQAN0xzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkNvbGxlY3Rpb25XcmFwcGVyJDtMABxKQ29uY3VycmVudE1hcFdyYXBwZXIkbW9kdWxldAA6THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKQ29uY3VycmVudE1hcFdyYXBwZXIkO0wAGUpEaWN0aW9uYXJ5V3JhcHBlciRtb2R1bGV0ADdMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpEaWN0aW9uYXJ5V3JhcHBlciQ7TAAaSkVudW1lcmF0aW9uV3JhcHBlciRtb2R1bGV0ADhMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpFbnVtZXJhdGlvbldyYXBwZXIkO0wAF0pJdGVyYWJsZVdyYXBwZXIkbW9kdWxldAA1THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKSXRlcmFibGVXcmFwcGVyJDtMABdKSXRlcmF0b3JXcmFwcGVyJG1vZHVsZXQANUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkl0ZXJhdG9yV3JhcHBlciQ7TAATSkxpc3RXcmFwcGVyJG1vZHVsZXQAMUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkxpc3RXcmFwcGVyJDtMABJKTWFwV3JhcHBlciRtb2R1bGV0ADBMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpNYXBXcmFwcGVyJDtMABlKUHJvcGVydGllc1dyYXBwZXIkbW9kdWxldAA3THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKUHJvcGVydGllc1dyYXBwZXIkO0wAEkpTZXRXcmFwcGVyJG1vZHVsZXQAMExzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSlNldFdyYXBwZXIkO0wAG011dGFibGVCdWZmZXJXcmFwcGVyJG1vZHVsZXQAOUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZUJ1ZmZlcldyYXBwZXIkO0wAGE11dGFibGVNYXBXcmFwcGVyJG1vZHVsZXQANkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZU1hcFdyYXBwZXIkO0wAGE11dGFibGVTZXFXcmFwcGVyJG1vZHVsZXQANkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZVNlcVdyYXBwZXIkO0wAGE11dGFibGVTZXRXcmFwcGVyJG1vZHVsZXQANkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZVNldFdyYXBwZXIkO0wAEVNlcVdyYXBwZXIkbW9kdWxldAAvTHNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRTZXFXcmFwcGVyJDt4cHBwcHBwcHBwcHBwcHBwcHBwcHNyACBzY2FsYS5jb2xsZWN0aW9uLm11dGFibGUuSGFzaE1hcAAAAAAAAAABAwAAeHB3DQAAAu4AAAAAAAAABAB4") + check(new collection.convert.Wrappers.MapWrapper(mutable.Map[Int, Int](1 -> 2, 2 -> 3, 3 -> 4)))("rO0ABXNyACxzY2FsYS5jb2xsZWN0aW9uLmNvbnZlcnQuV3JhcHBlcnMkTWFwV3JhcHBlcgAAAAAAAAABAgACTAAGJG91dGVydAAjTHNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycztMADhzY2FsYSRjb2xsZWN0aW9uJGNvbnZlcnQkV3JhcHBlcnMkTWFwV3JhcHBlciQkdW5kZXJseWluZ3QAFkxzY2FsYS9jb2xsZWN0aW9uL01hcDt4cHNyACJzY2FsYS5jb2xsZWN0aW9uLmNvbnZlcnQuV3JhcHBlcnMkrrSziizavIECABJMABhEaWN0aW9uYXJ5V3JhcHBlciRtb2R1bGV0ADZMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJERpY3Rpb25hcnlXcmFwcGVyJDtMABZJdGVyYWJsZVdyYXBwZXIkbW9kdWxldAA0THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRJdGVyYWJsZVdyYXBwZXIkO0wAFkl0ZXJhdG9yV3JhcHBlciRtb2R1bGV0ADRMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEl0ZXJhdG9yV3JhcHBlciQ7TAAZSkNvbGxlY3Rpb25XcmFwcGVyJG1vZHVsZXQAN0xzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkNvbGxlY3Rpb25XcmFwcGVyJDtMABxKQ29uY3VycmVudE1hcFdyYXBwZXIkbW9kdWxldAA6THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKQ29uY3VycmVudE1hcFdyYXBwZXIkO0wAGUpEaWN0aW9uYXJ5V3JhcHBlciRtb2R1bGV0ADdMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpEaWN0aW9uYXJ5V3JhcHBlciQ7TAAaSkVudW1lcmF0aW9uV3JhcHBlciRtb2R1bGV0ADhMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpFbnVtZXJhdGlvbldyYXBwZXIkO0wAF0pJdGVyYWJsZVdyYXBwZXIkbW9kdWxldAA1THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKSXRlcmFibGVXcmFwcGVyJDtMABdKSXRlcmF0b3JXcmFwcGVyJG1vZHVsZXQANUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkl0ZXJhdG9yV3JhcHBlciQ7TAATSkxpc3RXcmFwcGVyJG1vZHVsZXQAMUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkxpc3RXcmFwcGVyJDtMABJKTWFwV3JhcHBlciRtb2R1bGV0ADBMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpNYXBXcmFwcGVyJDtMABlKUHJvcGVydGllc1dyYXBwZXIkbW9kdWxldAA3THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKUHJvcGVydGllc1dyYXBwZXIkO0wAEkpTZXRXcmFwcGVyJG1vZHVsZXQAMExzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSlNldFdyYXBwZXIkO0wAG011dGFibGVCdWZmZXJXcmFwcGVyJG1vZHVsZXQAOUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZUJ1ZmZlcldyYXBwZXIkO0wAGE11dGFibGVNYXBXcmFwcGVyJG1vZHVsZXQANkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZU1hcFdyYXBwZXIkO0wAGE11dGFibGVTZXFXcmFwcGVyJG1vZHVsZXQANkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZVNlcVdyYXBwZXIkO0wAGE11dGFibGVTZXRXcmFwcGVyJG1vZHVsZXQANkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkTXV0YWJsZVNldFdyYXBwZXIkO0wAEVNlcVdyYXBwZXIkbW9kdWxldAAvTHNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRTZXFXcmFwcGVyJDt4cHBwcHBwcHBwcHBwcHBwcHBwcHNyACBzY2FsYS5jb2xsZWN0aW9uLm11dGFibGUuSGFzaE1hcAAAAAAAAAABAwAAeHB3DQAAAu4AAAADAAAABABzcgARamF2YS5sYW5nLkludGVnZXIS4qCk94GHOAIAAUkABXZhbHVleHIAEGphdmEubGFuZy5OdW1iZXKGrJUdC5TgiwIAAHhwAAAAAnNxAH4AGgAAAANzcQB+ABoAAAABcQB+ABxxAH4AHXNxAH4AGgAAAAR4") + check(new collection.convert.Wrappers.MutableMapWrapper(mutable.Map()))("rO0ABXNyADNzY2FsYS5jb2xsZWN0aW9uLmNvbnZlcnQuV3JhcHBlcnMkTXV0YWJsZU1hcFdyYXBwZXJ4TG6ffKy11wIAAUwACnVuZGVybHlpbmd0AB5Mc2NhbGEvY29sbGVjdGlvbi9tdXRhYmxlL01hcDt4cgAsc2NhbGEuY29sbGVjdGlvbi5jb252ZXJ0LldyYXBwZXJzJE1hcFdyYXBwZXIAAAAAAAAAAQIAAkwABiRvdXRlcnQAI0xzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnM7TAA4c2NhbGEkY29sbGVjdGlvbiRjb252ZXJ0JFdyYXBwZXJzJE1hcFdyYXBwZXIkJHVuZGVybHlpbmd0ABZMc2NhbGEvY29sbGVjdGlvbi9NYXA7eHBzcgAic2NhbGEuY29sbGVjdGlvbi5jb252ZXJ0LldyYXBwZXJzJK60s4os2ryBAgASTAAYRGljdGlvbmFyeVdyYXBwZXIkbW9kdWxldAA2THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyREaWN0aW9uYXJ5V3JhcHBlciQ7TAAWSXRlcmFibGVXcmFwcGVyJG1vZHVsZXQANExzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSXRlcmFibGVXcmFwcGVyJDtMABZJdGVyYXRvcldyYXBwZXIkbW9kdWxldAA0THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRJdGVyYXRvcldyYXBwZXIkO0wAGUpDb2xsZWN0aW9uV3JhcHBlciRtb2R1bGV0ADdMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpDb2xsZWN0aW9uV3JhcHBlciQ7TAAcSkNvbmN1cnJlbnRNYXBXcmFwcGVyJG1vZHVsZXQAOkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkNvbmN1cnJlbnRNYXBXcmFwcGVyJDtMABlKRGljdGlvbmFyeVdyYXBwZXIkbW9kdWxldAA3THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKRGljdGlvbmFyeVdyYXBwZXIkO0wAGkpFbnVtZXJhdGlvbldyYXBwZXIkbW9kdWxldAA4THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKRW51bWVyYXRpb25XcmFwcGVyJDtMABdKSXRlcmFibGVXcmFwcGVyJG1vZHVsZXQANUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkl0ZXJhYmxlV3JhcHBlciQ7TAAXSkl0ZXJhdG9yV3JhcHBlciRtb2R1bGV0ADVMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpJdGVyYXRvcldyYXBwZXIkO0wAE0pMaXN0V3JhcHBlciRtb2R1bGV0ADFMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpMaXN0V3JhcHBlciQ7TAASSk1hcFdyYXBwZXIkbW9kdWxldAAwTHNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKTWFwV3JhcHBlciQ7TAAZSlByb3BlcnRpZXNXcmFwcGVyJG1vZHVsZXQAN0xzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSlByb3BlcnRpZXNXcmFwcGVyJDtMABJKU2V0V3JhcHBlciRtb2R1bGV0ADBMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpTZXRXcmFwcGVyJDtMABtNdXRhYmxlQnVmZmVyV3JhcHBlciRtb2R1bGV0ADlMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJE11dGFibGVCdWZmZXJXcmFwcGVyJDtMABhNdXRhYmxlTWFwV3JhcHBlciRtb2R1bGV0ADZMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJE11dGFibGVNYXBXcmFwcGVyJDtMABhNdXRhYmxlU2VxV3JhcHBlciRtb2R1bGV0ADZMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJE11dGFibGVTZXFXcmFwcGVyJDtMABhNdXRhYmxlU2V0V3JhcHBlciRtb2R1bGV0ADZMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJE11dGFibGVTZXRXcmFwcGVyJDtMABFTZXFXcmFwcGVyJG1vZHVsZXQAL0xzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkU2VxV3JhcHBlciQ7eHBwcHBwcHBwcHBwcHBwcHBwcHBzcgAgc2NhbGEuY29sbGVjdGlvbi5tdXRhYmxlLkhhc2hNYXAAAAAAAAAAAQMAAHhwdw0AAALuAAAAAAAAAAQAeHEAfgAb") + check(new collection.convert.Wrappers.MutableMapWrapper(mutable.Map[Int, Int](1 -> 2, 2 -> 3, 3 -> 4)))("rO0ABXNyADNzY2FsYS5jb2xsZWN0aW9uLmNvbnZlcnQuV3JhcHBlcnMkTXV0YWJsZU1hcFdyYXBwZXJ4TG6ffKy11wIAAUwACnVuZGVybHlpbmd0AB5Mc2NhbGEvY29sbGVjdGlvbi9tdXRhYmxlL01hcDt4cgAsc2NhbGEuY29sbGVjdGlvbi5jb252ZXJ0LldyYXBwZXJzJE1hcFdyYXBwZXIAAAAAAAAAAQIAAkwABiRvdXRlcnQAI0xzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnM7TAA4c2NhbGEkY29sbGVjdGlvbiRjb252ZXJ0JFdyYXBwZXJzJE1hcFdyYXBwZXIkJHVuZGVybHlpbmd0ABZMc2NhbGEvY29sbGVjdGlvbi9NYXA7eHBzcgAic2NhbGEuY29sbGVjdGlvbi5jb252ZXJ0LldyYXBwZXJzJK60s4os2ryBAgASTAAYRGljdGlvbmFyeVdyYXBwZXIkbW9kdWxldAA2THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyREaWN0aW9uYXJ5V3JhcHBlciQ7TAAWSXRlcmFibGVXcmFwcGVyJG1vZHVsZXQANExzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSXRlcmFibGVXcmFwcGVyJDtMABZJdGVyYXRvcldyYXBwZXIkbW9kdWxldAA0THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRJdGVyYXRvcldyYXBwZXIkO0wAGUpDb2xsZWN0aW9uV3JhcHBlciRtb2R1bGV0ADdMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpDb2xsZWN0aW9uV3JhcHBlciQ7TAAcSkNvbmN1cnJlbnRNYXBXcmFwcGVyJG1vZHVsZXQAOkxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkNvbmN1cnJlbnRNYXBXcmFwcGVyJDtMABlKRGljdGlvbmFyeVdyYXBwZXIkbW9kdWxldAA3THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKRGljdGlvbmFyeVdyYXBwZXIkO0wAGkpFbnVtZXJhdGlvbldyYXBwZXIkbW9kdWxldAA4THNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKRW51bWVyYXRpb25XcmFwcGVyJDtMABdKSXRlcmFibGVXcmFwcGVyJG1vZHVsZXQANUxzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSkl0ZXJhYmxlV3JhcHBlciQ7TAAXSkl0ZXJhdG9yV3JhcHBlciRtb2R1bGV0ADVMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpJdGVyYXRvcldyYXBwZXIkO0wAE0pMaXN0V3JhcHBlciRtb2R1bGV0ADFMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpMaXN0V3JhcHBlciQ7TAASSk1hcFdyYXBwZXIkbW9kdWxldAAwTHNjYWxhL2NvbGxlY3Rpb24vY29udmVydC9XcmFwcGVycyRKTWFwV3JhcHBlciQ7TAAZSlByb3BlcnRpZXNXcmFwcGVyJG1vZHVsZXQAN0xzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkSlByb3BlcnRpZXNXcmFwcGVyJDtMABJKU2V0V3JhcHBlciRtb2R1bGV0ADBMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJEpTZXRXcmFwcGVyJDtMABtNdXRhYmxlQnVmZmVyV3JhcHBlciRtb2R1bGV0ADlMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJE11dGFibGVCdWZmZXJXcmFwcGVyJDtMABhNdXRhYmxlTWFwV3JhcHBlciRtb2R1bGV0ADZMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJE11dGFibGVNYXBXcmFwcGVyJDtMABhNdXRhYmxlU2VxV3JhcHBlciRtb2R1bGV0ADZMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJE11dGFibGVTZXFXcmFwcGVyJDtMABhNdXRhYmxlU2V0V3JhcHBlciRtb2R1bGV0ADZMc2NhbGEvY29sbGVjdGlvbi9jb252ZXJ0L1dyYXBwZXJzJE11dGFibGVTZXRXcmFwcGVyJDtMABFTZXFXcmFwcGVyJG1vZHVsZXQAL0xzY2FsYS9jb2xsZWN0aW9uL2NvbnZlcnQvV3JhcHBlcnMkU2VxV3JhcHBlciQ7eHBwcHBwcHBwcHBwcHBwcHBwcHBzcgAgc2NhbGEuY29sbGVjdGlvbi5tdXRhYmxlLkhhc2hNYXAAAAAAAAAAAQMAAHhwdw0AAALuAAAAAwAAAAQAc3IAEWphdmEubGFuZy5JbnRlZ2VyEuKgpPeBhzgCAAFJAAV2YWx1ZXhyABBqYXZhLmxhbmcuTnVtYmVyhqyVHQuU4IsCAAB4cAAAAAJzcQB+ABwAAAADc3EAfgAcAAAAAXEAfgAecQB+AB9zcQB+ABwAAAAEeHEAfgAb") + check(immutable.BitSet(1, 2, 3))( "rO0ABXNyAClzY2FsYS5jb2xsZWN0aW9uLmltbXV0YWJsZS5CaXRTZXQkQml0U2V0MR9dg8JGRI8UAgABSgAFZWxlbXN4cgAhc2NhbGEuY29sbGVjdGlvbi5pbW11dGFibGUuQml0U2V0Flz5Ms3qxsoCAAB4cAAAAAAAAAAO") check(immutable.HashMap())( "rO0ABXNyADVzY2FsYS5jb2xsZWN0aW9uLmltbXV0YWJsZS5IYXNoTWFwJFNlcmlhbGl6YXRpb25Qcm94eQAAAAAAAAACAwAAeHB3BAAAAAB4") check(immutable.HashMap(1 -> 2))( "rO0ABXNyADVzY2FsYS5jb2xsZWN0aW9uLmltbXV0YWJsZS5IYXNoTWFwJFNlcmlhbGl6YXRpb25Qcm94eQAAAAAAAAACAwAAeHB3BAAAAAFzcgARamF2YS5sYW5nLkludGVnZXIS4qCk94GHOAIAAUkABXZhbHVleHIAEGphdmEubGFuZy5OdW1iZXKGrJUdC5TgiwIAAHhwAAAAAXNxAH4AAgAAAAJ4") @@ -136,7 +153,8 @@ object Test extends App { // TODO SI-8576 throws scala.UnitializedFieldError under -Xcheckinit // check(new immutable.Range(0, 1, 1))( "rO0ABXNyACBzY2FsYS5jb2xsZWN0aW9uLmltbXV0YWJsZS5SYW5nZWm7o1SrFTINAgAHSQADZW5kWgAHaXNFbXB0eUkAC2xhc3RFbGVtZW50SQAQbnVtUmFuZ2VFbGVtZW50c0kABXN0YXJ0SQAEc3RlcEkAD3Rlcm1pbmFsRWxlbWVudHhwAAAAAQAAAAAAAAAAAQAAAAAAAAABAAAAAQ==") - check(immutable.Set())( "rO0ABXNyAChzY2FsYS5jb2xsZWN0aW9uLmltbXV0YWJsZS5TZXQkRW1wdHlTZXQk8Hk3TFN0uDYCAAB4cA==") + // TODO IMPLCLASS java.io.InvalidClassException: scala.collection.immutable.Set$EmptySet$; local class incompatible: stream classdesc serialVersionUID = -1118802231467657162, local class serialVersionUID = -5214304379191661165 + // check(immutable.Set())( "rO0ABXNyAChzY2FsYS5jb2xsZWN0aW9uLmltbXV0YWJsZS5TZXQkRW1wdHlTZXQk8Hk3TFN0uDYCAAB4cA==") check(immutable.Set(1))( "rO0ABXNyACNzY2FsYS5jb2xsZWN0aW9uLmltbXV0YWJsZS5TZXQkU2V0MREd3c4yqtWTAgABTAAFZWxlbTF0ABJMamF2YS9sYW5nL09iamVjdDt4cHNyABFqYXZhLmxhbmcuSW50ZWdlchLioKT3gYc4AgABSQAFdmFsdWV4cgAQamF2YS5sYW5nLk51bWJlcoaslR0LlOCLAgAAeHAAAAAB") check(immutable.Set(1, 2))( "rO0ABXNyACNzY2FsYS5jb2xsZWN0aW9uLmltbXV0YWJsZS5TZXQkU2V0MqaV02sZQzV0AgACTAAFZWxlbTF0ABJMamF2YS9sYW5nL09iamVjdDtMAAVlbGVtMnEAfgABeHBzcgARamF2YS5sYW5nLkludGVnZXIS4qCk94GHOAIAAUkABXZhbHVleHIAEGphdmEubGFuZy5OdW1iZXKGrJUdC5TgiwIAAHhwAAAAAXNxAH4AAwAAAAI=") check(immutable.Set(1, 2, 3))( "rO0ABXNyACNzY2FsYS5jb2xsZWN0aW9uLmltbXV0YWJsZS5TZXQkU2V0M84syT0560SgAgADTAAFZWxlbTF0ABJMamF2YS9sYW5nL09iamVjdDtMAAVlbGVtMnEAfgABTAAFZWxlbTNxAH4AAXhwc3IAEWphdmEubGFuZy5JbnRlZ2VyEuKgpPeBhzgCAAFJAAV2YWx1ZXhyABBqYXZhLmxhbmcuTnVtYmVyhqyVHQuU4IsCAAB4cAAAAAFzcQB+AAMAAAACc3EAfgADAAAAAw==") @@ -148,7 +166,8 @@ object Test extends App { // TODO SI-8576 Uninitialized field: IndexedSeqLike.scala: 56 // check(immutable.Stream(1, 2, 3))( "rO0ABXNyACZzY2FsYS5jb2xsZWN0aW9uLmltbXV0YWJsZS5TdHJlYW0kQ29uc/ekjBXM3TlFAgADTAACaGR0ABJMamF2YS9sYW5nL09iamVjdDtMAAV0bEdlbnQAEUxzY2FsYS9GdW5jdGlvbjA7TAAFdGxWYWx0ACNMc2NhbGEvY29sbGVjdGlvbi9pbW11dGFibGUvU3RyZWFtO3hyACFzY2FsYS5jb2xsZWN0aW9uLmltbXV0YWJsZS5TdHJlYW0552RDntM42gIAAHhwc3IAEWphdmEubGFuZy5JbnRlZ2VyEuKgpPeBhzgCAAFJAAV2YWx1ZXhyABBqYXZhLmxhbmcuTnVtYmVyhqyVHQuU4IsCAAB4cAAAAAFzcgAtc2NhbGEuY29sbGVjdGlvbi5JdGVyYXRvciQkYW5vbmZ1biR0b1N0cmVhbSQxRWR4We0SX0UCAAFMAAYkb3V0ZXJ0ABtMc2NhbGEvY29sbGVjdGlvbi9JdGVyYXRvcjt4cHNyAChzY2FsYS5jb2xsZWN0aW9uLkluZGV4ZWRTZXFMaWtlJEVsZW1lbnRzGF+1cBwmcx0CAANJAANlbmRJAAVpbmRleEwABiRvdXRlcnQAIUxzY2FsYS9jb2xsZWN0aW9uL0luZGV4ZWRTZXFMaWtlO3hwAAAAAwAAAAFzcgArc2NhbGEuY29sbGVjdGlvbi5tdXRhYmxlLldyYXBwZWRBcnJheSRvZkludMmRLBcI15VjAgABWwAFYXJyYXl0AAJbSXhwdXIAAltJTbpgJnbqsqUCAAB4cAAAAAMAAAABAAAAAgAAAANw") - check(immutable.TreeSet[Int]())( "rO0ABXNyACJzY2FsYS5jb2xsZWN0aW9uLmltbXV0YWJsZS5UcmVlU2V0sRdVIDjbWAsCAAJMAAhvcmRlcmluZ3QAFUxzY2FsYS9tYXRoL09yZGVyaW5nO0wABHRyZWV0AC5Mc2NhbGEvY29sbGVjdGlvbi9pbW11dGFibGUvUmVkQmxhY2tUcmVlJFRyZWU7eHBzcgAYc2NhbGEubWF0aC5PcmRlcmluZyRJbnQkC4BMdr1Z51wCAAB4cHA=") + // TODO IMPLCLASS java.io.InvalidClassException: scala.math.Ordering$Int$; local class incompatible: stream classdesc serialVersionUID = 828746404302808924, local class serialVersionUID = -4070467079371527467 + // check(immutable.TreeSet[Int]())( "rO0ABXNyACJzY2FsYS5jb2xsZWN0aW9uLmltbXV0YWJsZS5UcmVlU2V0sRdVIDjbWAsCAAJMAAhvcmRlcmluZ3QAFUxzY2FsYS9tYXRoL09yZGVyaW5nO0wABHRyZWV0AC5Mc2NhbGEvY29sbGVjdGlvbi9pbW11dGFibGUvUmVkQmxhY2tUcmVlJFRyZWU7eHBzcgAYc2NhbGEubWF0aC5PcmRlcmluZyRJbnQkC4BMdr1Z51wCAAB4cHA=") // TODO SI-8576 unstable under -Xcheckinit // check(immutable.TreeSet(1, 2, 3))( "rO0ABXNyACJzY2FsYS5jb2xsZWN0aW9uLmltbXV0YWJsZS5UcmVlU2V0sRdVIDjbWAsCAAJMAAhvcmRlcmluZ3QAFUxzY2FsYS9tYXRoL09yZGVyaW5nO0wABHRyZWV0AC5Mc2NhbGEvY29sbGVjdGlvbi9pbW11dGFibGUvUmVkQmxhY2tUcmVlJFRyZWU7eHBzcgAYc2NhbGEubWF0aC5PcmRlcmluZyRJbnQkC4BMdr1Z51wCAAB4cHNyADFzY2FsYS5jb2xsZWN0aW9uLmltbXV0YWJsZS5SZWRCbGFja1RyZWUkQmxhY2tUcmVlzRxnCKenVAECAAB4cgAsc2NhbGEuY29sbGVjdGlvbi5pbW11dGFibGUuUmVkQmxhY2tUcmVlJFRyZWVrqCSyHJbsMgIABUkABWNvdW50TAADa2V5dAASTGphdmEvbGFuZy9PYmplY3Q7TAAEbGVmdHEAfgACTAAFcmlnaHRxAH4AAkwABXZhbHVlcQB+AAh4cAAAAANzcgARamF2YS5sYW5nLkludGVnZXIS4qCk94GHOAIAAUkABXZhbHVleHIAEGphdmEubGFuZy5OdW1iZXKGrJUdC5TgiwIAAHhwAAAAAnNxAH4ABgAAAAFzcQB+AAoAAAABcHBzcgAXc2NhbGEucnVudGltZS5Cb3hlZFVuaXR0pn1HHezLmgIAAHhwc3EAfgAGAAAAAXNxAH4ACgAAAANwcHEAfgAQcQB+ABA=") @@ -157,12 +176,20 @@ object Test extends App { // check(mutable.ArrayBuffer(1, 2, 3))( "rO0ABXNyACRzY2FsYS5jb2xsZWN0aW9uLm11dGFibGUuQXJyYXlCdWZmZXIVOLBTg4KOcwIAA0kAC2luaXRpYWxTaXplSQAFc2l6ZTBbAAVhcnJheXQAE1tMamF2YS9sYW5nL09iamVjdDt4cAAAABAAAAADdXIAE1tMamF2YS5sYW5nLk9iamVjdDuQzlifEHMpbAIAAHhwAAAAEHNyABFqYXZhLmxhbmcuSW50ZWdlchLioKT3gYc4AgABSQAFdmFsdWV4cgAQamF2YS5sYW5nLk51bWJlcoaslR0LlOCLAgAAeHAAAAABc3EAfgAFAAAAAnNxAH4ABQAAAANwcHBwcHBwcHBwcHBw") // TODO SI-8576 Uninitialized field under -Xcheckinit // check(mutable.ArraySeq(1, 2, 3))( "rO0ABXNyACFzY2FsYS5jb2xsZWN0aW9uLm11dGFibGUuQXJyYXlTZXEVPD3SKEkOcwIAAkkABmxlbmd0aFsABWFycmF5dAATW0xqYXZhL2xhbmcvT2JqZWN0O3hwAAAAA3VyABNbTGphdmEubGFuZy5PYmplY3Q7kM5YnxBzKWwCAAB4cAAAAANzcgARamF2YS5sYW5nLkludGVnZXIS4qCk94GHOAIAAUkABXZhbHVleHIAEGphdmEubGFuZy5OdW1iZXKGrJUdC5TgiwIAAHhwAAAAAXNxAH4ABQAAAAJzcQB+AAUAAAAD") + check(mutable.AnyRefMap("a" -> "A"))( "rO0ABXNyACJzY2FsYS5jb2xsZWN0aW9uLm11dGFibGUuQW55UmVmTWFwAAAAAAAAAAECAAdJAAVfc2l6ZUkAB192YWNhbnRJAARtYXNrTAAMZGVmYXVsdEVudHJ5dAARTHNjYWxhL0Z1bmN0aW9uMTtbACtzY2FsYSRjb2xsZWN0aW9uJG11dGFibGUkQW55UmVmTWFwJCRfaGFzaGVzdAACW0lbAClzY2FsYSRjb2xsZWN0aW9uJG11dGFibGUkQW55UmVmTWFwJCRfa2V5c3QAE1tMamF2YS9sYW5nL09iamVjdDtbACtzY2FsYSRjb2xsZWN0aW9uJG11dGFibGUkQW55UmVmTWFwJCRfdmFsdWVzcQB+AAN4cAAAAAEAAAAAAAAAB3NyADNzY2FsYS5jb2xsZWN0aW9uLm11dGFibGUuQW55UmVmTWFwJEV4Y2VwdGlvbkRlZmF1bHQAAAAAAAAAAQIAAHhwdXIAAltJTbpgJnbqsqUCAAB4cAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA+UkA2AAAAAHVyABNbTGphdmEubGFuZy5PYmplY3Q7kM5YnxBzKWwCAAB4cAAAAAhwcHBwcHB0AAFhcHVxAH4ACQAAAAhwcHBwcHB0AAFBcA==") check(mutable.ArrayStack(1, 2, 3))( "rO0ABXNyACNzY2FsYS5jb2xsZWN0aW9uLm11dGFibGUuQXJyYXlTdGFja3bdxXbcnLBeAgACSQAqc2NhbGEkY29sbGVjdGlvbiRtdXRhYmxlJEFycmF5U3RhY2skJGluZGV4WwAqc2NhbGEkY29sbGVjdGlvbiRtdXRhYmxlJEFycmF5U3RhY2skJHRhYmxldAATW0xqYXZhL2xhbmcvT2JqZWN0O3hwAAAAA3VyABNbTGphdmEubGFuZy5PYmplY3Q7kM5YnxBzKWwCAAB4cAAAAANzcgARamF2YS5sYW5nLkludGVnZXIS4qCk94GHOAIAAUkABXZhbHVleHIAEGphdmEubGFuZy5OdW1iZXKGrJUdC5TgiwIAAHhwAAAAA3NxAH4ABQAAAAJzcQB+AAUAAAAB") check(mutable.DoubleLinkedList(1, 2, 3))( "rO0ABXNyAClzY2FsYS5jb2xsZWN0aW9uLm11dGFibGUuRG91YmxlTGlua2VkTGlzdI73LKsKRr1RAgADTAAEZWxlbXQAEkxqYXZhL2xhbmcvT2JqZWN0O0wABG5leHR0AB5Mc2NhbGEvY29sbGVjdGlvbi9tdXRhYmxlL1NlcTtMAARwcmV2cQB+AAJ4cHNyABFqYXZhLmxhbmcuSW50ZWdlchLioKT3gYc4AgABSQAFdmFsdWV4cgAQamF2YS5sYW5nLk51bWJlcoaslR0LlOCLAgAAeHAAAAABc3EAfgAAc3EAfgAEAAAAAnNxAH4AAHNxAH4ABAAAAANzcQB+AABwcQB+AAtxAH4ACXEAfgAHcQB+AANw") check(mutable.HashMap())( "rO0ABXNyACBzY2FsYS5jb2xsZWN0aW9uLm11dGFibGUuSGFzaE1hcAAAAAAAAAABAwAAeHB3DQAAAu4AAAAAAAAABAB4") check(mutable.HashMap(1 -> 1))( "rO0ABXNyACBzY2FsYS5jb2xsZWN0aW9uLm11dGFibGUuSGFzaE1hcAAAAAAAAAABAwAAeHB3DQAAAu4AAAABAAAABABzcgARamF2YS5sYW5nLkludGVnZXIS4qCk94GHOAIAAUkABXZhbHVleHIAEGphdmEubGFuZy5OdW1iZXKGrJUdC5TgiwIAAHhwAAAAAXEAfgAEeA==") check(mutable.HashSet(1, 2, 3))( "rO0ABXNyACBzY2FsYS5jb2xsZWN0aW9uLm11dGFibGUuSGFzaFNldAAAAAAAAAABAwAAeHB3DQAAAcIAAAADAAAABQBzcgARamF2YS5sYW5nLkludGVnZXIS4qCk94GHOAIAAUkABXZhbHVleHIAEGphdmEubGFuZy5OdW1iZXKGrJUdC5TgiwIAAHhwAAAAAXNxAH4AAgAAAAJzcQB+AAIAAAADeA==") + // TODO IMPLCLASS java.io.InvalidClassException: scala.math.Ordering$Int$; local class incompatible: stream classdesc serialVersionUID = 828746404302808924, local class serialVersionUID = -4070467079371527467 + // check(mutable.TreeMap[Int, Int]())( "rO0ABXNyACBzY2FsYS5jb2xsZWN0aW9uLm11dGFibGUuVHJlZU1hcNx8qC229ZvwAgACTAAIb3JkZXJpbmd0ABVMc2NhbGEvbWF0aC9PcmRlcmluZztMACZzY2FsYSRjb2xsZWN0aW9uJG11dGFibGUkVHJlZU1hcCQkdHJlZXQALExzY2FsYS9jb2xsZWN0aW9uL211dGFibGUvUmVkQmxhY2tUcmVlJFRyZWU7eHBzcgAYc2NhbGEubWF0aC5PcmRlcmluZyRJbnQkC4BMdr1Z51wCAAB4cHNyACpzY2FsYS5jb2xsZWN0aW9uLm11dGFibGUuUmVkQmxhY2tUcmVlJFRyZWUATKc08DWmFQIAAkkABHNpemVMAARyb290dAAsTHNjYWxhL2NvbGxlY3Rpb24vbXV0YWJsZS9SZWRCbGFja1RyZWUkTm9kZTt4cAAAAABw") + // check(mutable.TreeMap(1 -> 1, 3 -> 6))( "rO0ABXNyACBzY2FsYS5jb2xsZWN0aW9uLm11dGFibGUuVHJlZU1hcNx8qC229ZvwAgACTAAIb3JkZXJpbmd0ABVMc2NhbGEvbWF0aC9PcmRlcmluZztMACZzY2FsYSRjb2xsZWN0aW9uJG11dGFibGUkVHJlZU1hcCQkdHJlZXQALExzY2FsYS9jb2xsZWN0aW9uL211dGFibGUvUmVkQmxhY2tUcmVlJFRyZWU7eHBzcgAYc2NhbGEubWF0aC5PcmRlcmluZyRJbnQkC4BMdr1Z51wCAAB4cHNyACpzY2FsYS5jb2xsZWN0aW9uLm11dGFibGUuUmVkQmxhY2tUcmVlJFRyZWUATKc08DWmFQIAAkkABHNpemVMAARyb290dAAsTHNjYWxhL2NvbGxlY3Rpb24vbXV0YWJsZS9SZWRCbGFja1RyZWUkTm9kZTt4cAAAAAJzcgAqc2NhbGEuY29sbGVjdGlvbi5tdXRhYmxlLlJlZEJsYWNrVHJlZSROb2RlGxHsFtValgACAAZaAANyZWRMAANrZXl0ABJMamF2YS9sYW5nL09iamVjdDtMAARsZWZ0cQB+AAdMAAZwYXJlbnRxAH4AB0wABXJpZ2h0cQB+AAdMAAV2YWx1ZXEAfgAKeHAAc3IAEWphdmEubGFuZy5JbnRlZ2VyEuKgpPeBhzgCAAFJAAV2YWx1ZXhyABBqYXZhLmxhbmcuTnVtYmVyhqyVHQuU4IsCAAB4cAAAAAFwcHNxAH4ACQFzcQB+AAwAAAADcHEAfgALcHNxAH4ADAAAAAZxAH4ADg==") + // check(mutable.TreeMap(1 -> 1, 3 -> 6).range(1, 2))( "rO0ABXNyACxzY2FsYS5jb2xsZWN0aW9uLm11dGFibGUuVHJlZU1hcCRUcmVlTWFwVmlldx7MCZxLhVQ8AgADTAAGJG91dGVydAAiTHNjYWxhL2NvbGxlY3Rpb24vbXV0YWJsZS9UcmVlTWFwO0wABGZyb210AA5Mc2NhbGEvT3B0aW9uO0wABXVudGlscQB+AAJ4cgAgc2NhbGEuY29sbGVjdGlvbi5tdXRhYmxlLlRyZWVNYXDcfKgttvWb8AIAAkwACG9yZGVyaW5ndAAVTHNjYWxhL21hdGgvT3JkZXJpbmc7TAAmc2NhbGEkY29sbGVjdGlvbiRtdXRhYmxlJFRyZWVNYXAkJHRyZWV0ACxMc2NhbGEvY29sbGVjdGlvbi9tdXRhYmxlL1JlZEJsYWNrVHJlZSRUcmVlO3hwc3IAGHNjYWxhLm1hdGguT3JkZXJpbmckSW50JAuATHa9WedcAgAAeHBzcgAqc2NhbGEuY29sbGVjdGlvbi5tdXRhYmxlLlJlZEJsYWNrVHJlZSRUcmVlAEynNPA1phUCAAJJAARzaXplTAAEcm9vdHQALExzY2FsYS9jb2xsZWN0aW9uL211dGFibGUvUmVkQmxhY2tUcmVlJE5vZGU7eHAAAAACc3IAKnNjYWxhLmNvbGxlY3Rpb24ubXV0YWJsZS5SZWRCbGFja1RyZWUkTm9kZRsR7BbVWpYAAgAGWgADcmVkTAADa2V5dAASTGphdmEvbGFuZy9PYmplY3Q7TAAEbGVmdHEAfgAKTAAGcGFyZW50cQB+AApMAAVyaWdodHEAfgAKTAAFdmFsdWVxAH4ADXhwAHNyABFqYXZhLmxhbmcuSW50ZWdlchLioKT3gYc4AgABSQAFdmFsdWV4cgAQamF2YS5sYW5nLk51bWJlcoaslR0LlOCLAgAAeHAAAAABcHBzcQB+AAwBc3EAfgAPAAAAA3BxAH4ADnBzcQB+AA8AAAAGcQB+ABFzcQB+AANxAH4ACHEAfgALc3IACnNjYWxhLlNvbWURIvJpXqGLdAIAAUwAAXhxAH4ADXhyAAxzY2FsYS5PcHRpb27+aTf92w5mdAIAAHhwcQB+ABFzcQB+ABZzcQB+AA8AAAAC") + // check(mutable.TreeSet[Int]())( "rO0ABXNyACBzY2FsYS5jb2xsZWN0aW9uLm11dGFibGUuVHJlZVNldM10nxFQDpt4AgACTAAIb3JkZXJpbmd0ABVMc2NhbGEvbWF0aC9PcmRlcmluZztMACZzY2FsYSRjb2xsZWN0aW9uJG11dGFibGUkVHJlZVNldCQkdHJlZXQALExzY2FsYS9jb2xsZWN0aW9uL211dGFibGUvUmVkQmxhY2tUcmVlJFRyZWU7eHBzcgAYc2NhbGEubWF0aC5PcmRlcmluZyRJbnQkC4BMdr1Z51wCAAB4cHNyACpzY2FsYS5jb2xsZWN0aW9uLm11dGFibGUuUmVkQmxhY2tUcmVlJFRyZWUATKc08DWmFQIAAkkABHNpemVMAARyb290dAAsTHNjYWxhL2NvbGxlY3Rpb24vbXV0YWJsZS9SZWRCbGFja1RyZWUkTm9kZTt4cAAAAABw") + // check(mutable.TreeSet(1, 3))( "rO0ABXNyACBzY2FsYS5jb2xsZWN0aW9uLm11dGFibGUuVHJlZVNldM10nxFQDpt4AgACTAAIb3JkZXJpbmd0ABVMc2NhbGEvbWF0aC9PcmRlcmluZztMACZzY2FsYSRjb2xsZWN0aW9uJG11dGFibGUkVHJlZVNldCQkdHJlZXQALExzY2FsYS9jb2xsZWN0aW9uL211dGFibGUvUmVkQmxhY2tUcmVlJFRyZWU7eHBzcgAYc2NhbGEubWF0aC5PcmRlcmluZyRJbnQkC4BMdr1Z51wCAAB4cHNyACpzY2FsYS5jb2xsZWN0aW9uLm11dGFibGUuUmVkQmxhY2tUcmVlJFRyZWUATKc08DWmFQIAAkkABHNpemVMAARyb290dAAsTHNjYWxhL2NvbGxlY3Rpb24vbXV0YWJsZS9SZWRCbGFja1RyZWUkTm9kZTt4cAAAAAJzcgAqc2NhbGEuY29sbGVjdGlvbi5tdXRhYmxlLlJlZEJsYWNrVHJlZSROb2RlGxHsFtValgACAAZaAANyZWRMAANrZXl0ABJMamF2YS9sYW5nL09iamVjdDtMAARsZWZ0cQB+AAdMAAZwYXJlbnRxAH4AB0wABXJpZ2h0cQB+AAdMAAV2YWx1ZXEAfgAKeHAAc3IAEWphdmEubGFuZy5JbnRlZ2VyEuKgpPeBhzgCAAFJAAV2YWx1ZXhyABBqYXZhLmxhbmcuTnVtYmVyhqyVHQuU4IsCAAB4cAAAAAFwcHNxAH4ACQFzcQB+AAwAAAADcHEAfgALcHBw") + // check(mutable.TreeSet(1, 3).range(1, 2))( "rO0ABXNyACxzY2FsYS5jb2xsZWN0aW9uLm11dGFibGUuVHJlZVNldCRUcmVlU2V0Vmlld2JdAzqy0DpGAgADTAAGJG91dGVydAAiTHNjYWxhL2NvbGxlY3Rpb24vbXV0YWJsZS9UcmVlU2V0O0wABGZyb210AA5Mc2NhbGEvT3B0aW9uO0wABXVudGlscQB+AAJ4cgAgc2NhbGEuY29sbGVjdGlvbi5tdXRhYmxlLlRyZWVTZXTNdJ8RUA6beAIAAkwACG9yZGVyaW5ndAAVTHNjYWxhL21hdGgvT3JkZXJpbmc7TAAmc2NhbGEkY29sbGVjdGlvbiRtdXRhYmxlJFRyZWVTZXQkJHRyZWV0ACxMc2NhbGEvY29sbGVjdGlvbi9tdXRhYmxlL1JlZEJsYWNrVHJlZSRUcmVlO3hwc3IAGHNjYWxhLm1hdGguT3JkZXJpbmckSW50JAuATHa9WedcAgAAeHBzcgAqc2NhbGEuY29sbGVjdGlvbi5tdXRhYmxlLlJlZEJsYWNrVHJlZSRUcmVlAEynNPA1phUCAAJJAARzaXplTAAEcm9vdHQALExzY2FsYS9jb2xsZWN0aW9uL211dGFibGUvUmVkQmxhY2tUcmVlJE5vZGU7eHAAAAACc3IAKnNjYWxhLmNvbGxlY3Rpb24ubXV0YWJsZS5SZWRCbGFja1RyZWUkTm9kZRsR7BbVWpYAAgAGWgADcmVkTAADa2V5dAASTGphdmEvbGFuZy9PYmplY3Q7TAAEbGVmdHEAfgAKTAAGcGFyZW50cQB+AApMAAVyaWdodHEAfgAKTAAFdmFsdWVxAH4ADXhwAHNyABFqYXZhLmxhbmcuSW50ZWdlchLioKT3gYc4AgABSQAFdmFsdWV4cgAQamF2YS5sYW5nLk51bWJlcoaslR0LlOCLAgAAeHAAAAABcHBzcQB+AAwBc3EAfgAPAAAAA3BxAH4ADnBwcHNxAH4AA3EAfgAIcQB+AAtzcgAKc2NhbGEuU29tZREi8mleoYt0AgABTAABeHEAfgANeHIADHNjYWxhLk9wdGlvbv5pN/3bDmZ0AgAAeHBxAH4AEXNxAH4AFXNxAH4ADwAAAAI=") // TODO SI-8576 Uninitialized field under -Xcheckinit // check(new mutable.History())( "rO0ABXNyACBzY2FsYS5jb2xsZWN0aW9uLm11dGFibGUuSGlzdG9yeUhuXxDIFJrsAgACSQAKbWF4SGlzdG9yeUwAA2xvZ3QAIExzY2FsYS9jb2xsZWN0aW9uL211dGFibGUvUXVldWU7eHAAAAPoc3IAHnNjYWxhLmNvbGxlY3Rpb24ubXV0YWJsZS5RdWV1ZbjMURVfOuHHAgAAeHIAJHNjYWxhLmNvbGxlY3Rpb24ubXV0YWJsZS5NdXRhYmxlTGlzdFJpnjJ+gFbAAgADSQADbGVuTAAGZmlyc3QwdAAlTHNjYWxhL2NvbGxlY3Rpb24vbXV0YWJsZS9MaW5rZWRMaXN0O0wABWxhc3QwcQB+AAV4cAAAAABzcgAjc2NhbGEuY29sbGVjdGlvbi5tdXRhYmxlLkxpbmtlZExpc3Sak+nGCZHaUQIAAkwABGVsZW10ABJMamF2YS9sYW5nL09iamVjdDtMAARuZXh0dAAeTHNjYWxhL2NvbGxlY3Rpb24vbXV0YWJsZS9TZXE7eHBwcQB+AApxAH4ACg==") check(mutable.LinkedHashMap(1 -> 2))( "rO0ABXNyACZzY2FsYS5jb2xsZWN0aW9uLm11dGFibGUuTGlua2VkSGFzaE1hcAAAAAAAAAABAwAAeHB3DQAAAu4AAAABAAAABABzcgARamF2YS5sYW5nLkludGVnZXIS4qCk94GHOAIAAUkABXZhbHVleHIAEGphdmEubGFuZy5OdW1iZXKGrJUdC5TgiwIAAHhwAAAAAXNxAH4AAgAAAAJ4") @@ -186,4 +213,4 @@ object Test extends App { check("...".r)("rO0ABXNyABlzY2FsYS51dGlsLm1hdGNoaW5nLlJlZ2V44u3Vap7wIb8CAAJMAAdwYXR0ZXJudAAZTGphdmEvdXRpbC9yZWdleC9QYXR0ZXJuO0wAJXNjYWxhJHV0aWwkbWF0Y2hpbmckUmVnZXgkJGdyb3VwTmFtZXN0ABZMc2NhbGEvY29sbGVjdGlvbi9TZXE7eHBzcgAXamF2YS51dGlsLnJlZ2V4LlBhdHRlcm5GZ9VrbkkCDQIAAkkABWZsYWdzTAAHcGF0dGVybnQAEkxqYXZhL2xhbmcvU3RyaW5nO3hwAAAAAHQAAy4uLnNyADJzY2FsYS5jb2xsZWN0aW9uLmltbXV0YWJsZS5MaXN0JFNlcmlhbGl6YXRpb25Qcm94eQAAAAAAAAABAwAAeHBzcgAsc2NhbGEuY29sbGVjdGlvbi5pbW11dGFibGUuTGlzdFNlcmlhbGl6ZUVuZCSKXGNb91MLbQIAAHhweA==", r => (r.toString)) -} +}
\ No newline at end of file diff --git a/test/files/run/t8575.scala b/test/files/run/t8575.scala new file mode 100644 index 0000000000..fb8f603f3e --- /dev/null +++ b/test/files/run/t8575.scala @@ -0,0 +1,32 @@ +class E[F] +class A +class B +class C + +trait TypeMember { + type X + + // This call throws an AbstractMethodError, because it invokes the erasure of + // consume(X): Unit that is consume(Object): Unit. But the corresponding + // bridge method is not generated. + consume(value) + + def value: X + def consume(x: X): Unit +} + +object Test extends TypeMember { + type F = A with B + + // works if replaced by type X = E[A with B with C] + type X = E[F with C] + + def value = new E[F with C] + + // This call passes, since it invokes consume(E): Unit + def consume(x: X) {} + + def main(args: Array[String]) { + consume(value) + } +} diff --git a/test/files/run/t8575b.scala b/test/files/run/t8575b.scala new file mode 100644 index 0000000000..0d731ccf9f --- /dev/null +++ b/test/files/run/t8575b.scala @@ -0,0 +1,17 @@ +class A +class B +class C + +object Test { + type F = A with B + + def main(args: Array[String]) { + import reflect.runtime.universe._ + val t1 = typeOf[F with C] + val t2 = typeOf[(A with B) with C] + val t3 = typeOf[A with B with C] + assert(t1 =:= t2) + assert(t2 =:= t3) + assert(t3 =:= t1) + } +} diff --git a/test/files/run/t8575c.scala b/test/files/run/t8575c.scala new file mode 100644 index 0000000000..8219952299 --- /dev/null +++ b/test/files/run/t8575c.scala @@ -0,0 +1,23 @@ +class C + +trait TypeMember { + type X + type Y + type Z +} + +object Test extends TypeMember { + type A = X with Y + type B = Z with A + type F = A with B + + def main(args: Array[String]) { + import reflect.runtime.universe._ + val t1 = typeOf[F with C] + val t2 = typeOf[(A with B) with C] + val t3 = typeOf[A with B with C] + assert(t1 =:= t2) + assert(t2 =:= t3) + assert(t3 =:= t1) + } +} diff --git a/test/files/run/t8601-closure-elim.flags b/test/files/run/t8601-closure-elim.flags index 9158076b71..642187ff4c 100644 --- a/test/files/run/t8601-closure-elim.flags +++ b/test/files/run/t8601-closure-elim.flags @@ -1 +1 @@ --optimize -Ydelambdafy:inline -Ybackend:GenASM +-Ydelambdafy:method -Yopt:l:classpath diff --git a/test/files/run/t8601-closure-elim.scala b/test/files/run/t8601-closure-elim.scala index ebeb16e0c7..40fbf1fe0e 100644 --- a/test/files/run/t8601-closure-elim.scala +++ b/test/files/run/t8601-closure-elim.scala @@ -1,4 +1,5 @@ import scala.tools.partest.BytecodeTest +import scala.tools.partest.ASMConverters.instructionsFromMethod import scala.tools.asm import scala.tools.asm.util._ import scala.collection.JavaConverters._ @@ -10,8 +11,9 @@ object Test extends BytecodeTest { def test(methodName: String) { val classNode = loadClassNode("Foo") val methodNode = getMethod(classNode, "b") + val instrs = instructionsFromMethod(methodNode) val ops = methodNode.instructions.iterator.asScala.map(_.getOpcode).toList - assert(!ops.contains(asm.Opcodes.NEW), ops)// should be allocation free if the closure is eliminated + assert(!ops.contains(asm.Opcodes.NEW), instrs)// should be allocation free if the closure is eliminated } test("b") } diff --git a/test/files/run/t8601.flags b/test/files/run/t8601.flags index 1182725e86..65caa3736e 100644 --- a/test/files/run/t8601.flags +++ b/test/files/run/t8601.flags @@ -1 +1 @@ --optimize
\ No newline at end of file +-Yopt:l:classpath diff --git a/test/files/run/t8601b.flags b/test/files/run/t8601b.flags index 1182725e86..65caa3736e 100644 --- a/test/files/run/t8601b.flags +++ b/test/files/run/t8601b.flags @@ -1 +1 @@ --optimize
\ No newline at end of file +-Yopt:l:classpath diff --git a/test/files/run/t8601c.flags b/test/files/run/t8601c.flags index 1182725e86..65caa3736e 100644 --- a/test/files/run/t8601c.flags +++ b/test/files/run/t8601c.flags @@ -1 +1 @@ --optimize
\ No newline at end of file +-Yopt:l:classpath diff --git a/test/files/run/t8601d.flags b/test/files/run/t8601d.flags index 1182725e86..65caa3736e 100644 --- a/test/files/run/t8601d.flags +++ b/test/files/run/t8601d.flags @@ -1 +1 @@ --optimize
\ No newline at end of file +-Yopt:l:classpath diff --git a/test/files/run/t8601e.flags b/test/files/run/t8601e.flags index 49d036a887..65caa3736e 100644 --- a/test/files/run/t8601e.flags +++ b/test/files/run/t8601e.flags @@ -1 +1 @@ --optimize +-Yopt:l:classpath diff --git a/test/files/run/t8710.scala b/test/files/run/t8710.scala new file mode 100644 index 0000000000..15aab5b8a4 --- /dev/null +++ b/test/files/run/t8710.scala @@ -0,0 +1,17 @@ +class Bar(val x: Int) extends AnyVal { + def f: String = f(0) + private def f(x: Int): String = "" +} + +class Baz(val x: Int) extends AnyVal { + def f: String = "123" + private def f(x: Int): String = "" +} +object Baz { + def x(b: Baz) = b.f(0) +} + +object Test extends App { + new Bar(23).f + new Baz(23).f +} diff --git a/test/files/run/t8764.check b/test/files/run/t8764.check deleted file mode 100644 index 6260069602..0000000000 --- a/test/files/run/t8764.check +++ /dev/null @@ -1,5 +0,0 @@ -IntOnly: should return an unboxed int -Int: int -IntAndDouble: should just box and return Anyval -Double: class java.lang.Double -Int: class java.lang.Integer diff --git a/test/files/run/t8764.flags b/test/files/run/t8764.flags deleted file mode 100644 index 48fd867160..0000000000 --- a/test/files/run/t8764.flags +++ /dev/null @@ -1 +0,0 @@ --Xexperimental diff --git a/test/files/run/t8764.scala b/test/files/run/t8764.scala deleted file mode 100644 index decc658f6e..0000000000 --- a/test/files/run/t8764.scala +++ /dev/null @@ -1,16 +0,0 @@ -object Test extends App { -case class IntOnly(i: Int, j: Int) - -println("IntOnly: should return an unboxed int") -val a = IntOnly(1, 2) -val i: Int = a.productElement(0) -println(s"Int: ${a.productElement(0).getClass}") - -case class IntAndDouble(i: Int, d: Double) - -println("IntAndDouble: should just box and return Anyval") -val b = IntAndDouble(1, 2.0) -val j: AnyVal = b.productElement(0) -println(s"Double: ${b.productElement(1).getClass}") -println(s"Int: ${b.productElement(0).getClass}") -} diff --git a/test/files/run/t8845.flags b/test/files/run/t8845.flags deleted file mode 100644 index c30091d3de..0000000000 --- a/test/files/run/t8845.flags +++ /dev/null @@ -1 +0,0 @@ --Ybackend:GenBCode diff --git a/test/files/run/t8918-unary-ids.check b/test/files/run/t8918-unary-ids.check new file mode 100644 index 0000000000..92f02371c7 --- /dev/null +++ b/test/files/run/t8918-unary-ids.check @@ -0,0 +1,7 @@ +Expected 41 lines, got 39 +--- expected ++++ actual +@@ -1,3 +1,1 @@ +-Type in expressions to have them evaluated. +-Type :help for more information. + diff --git a/test/files/run/t8918-unary-ids.scala b/test/files/run/t8918-unary-ids.scala new file mode 100644 index 0000000000..3aa990f72c --- /dev/null +++ b/test/files/run/t8918-unary-ids.scala @@ -0,0 +1,49 @@ + + +import scala.tools.partest.SessionTest + +// Taking unary ids as plain +object Test extends SessionTest { + def session = +"""Type in expressions to have them evaluated. +Type :help for more information. + +scala> val - = 42 +-: Int = 42 + +scala> val i = - +i: Int = 42 + +scala> - { 42 } +res0: Int = -42 + +scala> - if (true) 1 else 2 +<console>:1: error: illegal start of simple expression +- if (true) 1 else 2 + ^ + +scala> - - 1 +<console>:1: error: ';' expected but integer literal found. +- - 1 + ^ + +scala> -.-(1) +res1: Int = 41 + +scala> - +res2: Int = 42 + +scala> - - +res3: Int = -42 + +scala> + - +res4: Int = 42 + +scala> object X { def -(i: Int) = 42 - i ; def f(g: Int => Int) = g(7) ; def j = f(-) } +defined object X + +scala> X.j +res5: Int = 35 + +scala> :quit""" +} diff --git a/test/files/run/t8925.flags b/test/files/run/t8925.flags index ffc65f4b81..bc22511cff 100644 --- a/test/files/run/t8925.flags +++ b/test/files/run/t8925.flags @@ -1 +1 @@ --Yopt:l:none -Ybackend:GenBCode +-Yopt:l:none diff --git a/test/files/run/t8944/A_1.scala b/test/files/run/t8944/A_1.scala new file mode 100644 index 0000000000..7ff80327b0 --- /dev/null +++ b/test/files/run/t8944/A_1.scala @@ -0,0 +1 @@ +case class A(private val x: String) diff --git a/test/files/run/t8944/A_2.scala b/test/files/run/t8944/A_2.scala new file mode 100644 index 0000000000..3dcdea1583 --- /dev/null +++ b/test/files/run/t8944/A_2.scala @@ -0,0 +1,6 @@ +case class Other(private val x: String) // consume a fresh name suffix + +// the param accessor will now be called "x$2", +// whereas the previously compiled client expects it to be called +// x$1 +case class A(private val x: String) diff --git a/test/files/run/t8944/Test_1.scala b/test/files/run/t8944/Test_1.scala new file mode 100644 index 0000000000..fe466693cf --- /dev/null +++ b/test/files/run/t8944/Test_1.scala @@ -0,0 +1,3 @@ +object Test extends App { + val A("") = new A("") +} diff --git a/test/files/run/t8944b.scala b/test/files/run/t8944b.scala new file mode 100644 index 0000000000..f469122ce6 --- /dev/null +++ b/test/files/run/t8944b.scala @@ -0,0 +1,9 @@ +case class A(private var foo: Any) { + def m = { def foo = 42 /*will be lamba lifted to `A#foo$1`*/ } +} +object Test { + def main(args: Array[String]): Unit = { + val A("") = new A("") + new A("").m + } +} diff --git a/test/files/run/t8944c.check b/test/files/run/t8944c.check new file mode 100644 index 0000000000..7738f76980 --- /dev/null +++ b/test/files/run/t8944c.check @@ -0,0 +1,5 @@ +private java.lang.Object Foo.ant() +public java.lang.Object Foo.ant$access$0() +private scala.collection.Seq Foo.cat() +public scala.collection.Seq Foo.cat$access$2() +public java.lang.Object Foo.elk() diff --git a/test/files/run/t8944c.scala b/test/files/run/t8944c.scala new file mode 100644 index 0000000000..95c2143851 --- /dev/null +++ b/test/files/run/t8944c.scala @@ -0,0 +1,8 @@ +case class Foo[A](private val ant: Any, elk: Any, private val cat: A*) + +object Test { + def main(args: Array[String]): Unit = { + def pred(name: String) = Set("ant", "elk", "cat").exists(name contains _) + println(classOf[Foo[_]].getDeclaredMethods.filter(m => pred(m.getName)).sortBy(_.getName).mkString("\n")) + } +} diff --git a/test/files/run/t8955.scala b/test/files/run/t8955.scala new file mode 100644 index 0000000000..afa31aa5d7 --- /dev/null +++ b/test/files/run/t8955.scala @@ -0,0 +1,12 @@ +import scala.collection.parallel.immutable.ParSet + +object Test { + def main(args: Array[String]): Unit = { + for (i <- 1 to 2000) test() + } + + def test() { + ParSet[Int]((1 to 10000): _*) foreach (x => ()) // hangs non deterministically + } +} + diff --git a/test/files/run/t8960.scala b/test/files/run/t8960.scala index a58ac53d33..a43d5679d8 100644 --- a/test/files/run/t8960.scala +++ b/test/files/run/t8960.scala @@ -1,5 +1,5 @@ object Test extends App { - def test(o: AnyRef, sp: Boolean = false) = { + def testAnonFunClass(o: AnyRef, sp: Boolean = false) = { val isSpecialized = o.getClass.getSuperclass.getName contains "$sp" val isDelambdafyMethod = o.getClass.getName contains "$lambda$" assert( @@ -11,62 +11,68 @@ object Test extends App { assert(f.getLong(null) == 0l) } - test(() => (), sp = true) - test(() => 1, sp = true) - test(() => "") + def testIndyLambda(o: AnyRef, sp: Boolean = false) = { + val isSpecialized = o.getClass.getInterfaces.exists(_.getName contains "$sp") + assert(sp == isSpecialized, o.getClass.getName) + } + + + testIndyLambda(() => (), sp = true) + testIndyLambda(() => 1, sp = true) + testIndyLambda(() => "") - test((x: Int) => x, sp = true) - test((x: Boolean) => x) - test((x: Int) => "") + testIndyLambda((x: Int) => x, sp = true) + testIndyLambda((x: Boolean) => x) + testIndyLambda((x: Int) => "") - test((x1: Int, x2: Int) => 0d, sp = true) - test((x1: Int, x2: AnyRef) => 0d) - test((x1: Any, x2: Any) => x1) + testIndyLambda((x1: Int, x2: Int) => 0d, sp = true) + testIndyLambda((x1: Int, x2: AnyRef) => 0d) + testIndyLambda((x1: Any, x2: Any) => x1) - // scala> println((for (i <- 3 to 22) yield (for (j <- 1 to i) yield s"x$j: Int").mkString(" test((", ", ", ") => x1)")).mkString("\n")) + // scala> println((for (i <- 3 to 22) yield (for (j <- 1 to i) yield s"x$j: Int").mkString(" testIndyLambda((", ", ", ") => x1)")).mkString("\n")) - test((x1: Int, x2: Int, x3: Int) => x1) - test((x1: Int, x2: Int, x3: Int, x4: Int) => x1) - test((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int) => x1) - test((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int) => x1) - test((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int) => x1) - test((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int) => x1) - test((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int) => x1) - test((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int) => x1) - test((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int) => x1) - test((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int) => x1) - test((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int) => x1) - test((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int) => x1) - test((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int) => x1) - test((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int, x16: Int) => x1) - test((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int, x16: Int, x17: Int) => x1) - test((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int, x16: Int, x17: Int, x18: Int) => x1) - test((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int, x16: Int, x17: Int, x18: Int, x19: Int) => x1) - test((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int, x16: Int, x17: Int, x18: Int, x19: Int, x20: Int) => x1) - test((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int, x16: Int, x17: Int, x18: Int, x19: Int, x20: Int, x21: Int) => x1) - test((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int, x16: Int, x17: Int, x18: Int, x19: Int, x20: Int, x21: Int, x22: Int) => x1) + testIndyLambda((x1: Int, x2: Int, x3: Int) => x1) + testIndyLambda((x1: Int, x2: Int, x3: Int, x4: Int) => x1) + testIndyLambda((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int) => x1) + testIndyLambda((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int) => x1) + testIndyLambda((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int) => x1) + testIndyLambda((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int) => x1) + testIndyLambda((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int) => x1) + testIndyLambda((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int) => x1) + testIndyLambda((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int) => x1) + testIndyLambda((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int) => x1) + testIndyLambda((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int) => x1) + testIndyLambda((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int) => x1) + testIndyLambda((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int) => x1) + testIndyLambda((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int, x16: Int) => x1) + testIndyLambda((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int, x16: Int, x17: Int) => x1) + testIndyLambda((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int, x16: Int, x17: Int, x18: Int) => x1) + testIndyLambda((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int, x16: Int, x17: Int, x18: Int, x19: Int) => x1) + testIndyLambda((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int, x16: Int, x17: Int, x18: Int, x19: Int, x20: Int) => x1) + testIndyLambda((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int, x16: Int, x17: Int, x18: Int, x19: Int, x20: Int, x21: Int) => x1) + testIndyLambda((x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int, x16: Int, x17: Int, x18: Int, x19: Int, x20: Int, x21: Int, x22: Int) => x1) - test({ + testAnonFunClass({ case x: Int => x }: PartialFunction[Int, Int], sp = true) - test({ + testAnonFunClass({ case x: Int => x }: PartialFunction[Any, Any]) - test({ + testAnonFunClass({ case x: Int => () }: PartialFunction[Int, Unit], sp = true) - test({ + testAnonFunClass({ case x: String => 1 }: PartialFunction[String, Int]) - test({ + testAnonFunClass({ case x: String => () }: PartialFunction[String, Unit]) - test({ + testAnonFunClass({ case x: String => x }: PartialFunction[String, String]) } diff --git a/test/files/run/t9003.flags b/test/files/run/t9003.flags index 49d036a887..65caa3736e 100644 --- a/test/files/run/t9003.flags +++ b/test/files/run/t9003.flags @@ -1 +1 @@ --optimize +-Yopt:l:classpath diff --git a/test/files/run/t9097.scala b/test/files/run/t9097.scala index aa2b23bbac..49c0bbe79a 100644 --- a/test/files/run/t9097.scala +++ b/test/files/run/t9097.scala @@ -6,7 +6,6 @@ object Test extends StoreReporterDirectTest { override def extraSettings: String = List( "-usejavacp", "-Xfatal-warnings", - "-Ybackend:GenBCode", "-Ydelambdafy:method", "-Xprint:delambdafy", s"-d ${testOutput.path}" @@ -29,6 +28,6 @@ object Test extends StoreReporterDirectTest { assert(!storeReporter.hasErrors, message = filteredInfos map (_.msg) mkString "; ") val out = baos.toString("UTF-8") // was 2 before the fix, the two PackageDefs for a would both contain the ClassDef for the closure - assert(out.lines.count(_ contains "class hihi$1") == 1, out) + assert(out.lines.count(_ contains "def $anonfun$1(x$1: Int): String") == 1, out) } } diff --git a/test/files/run/t9110.scala b/test/files/run/t9110.scala new file mode 100644 index 0000000000..660291a4d1 --- /dev/null +++ b/test/files/run/t9110.scala @@ -0,0 +1,27 @@ +trait Event + +trait Domain { + case class Created(name: String) extends Event +} + +// declare three instances of Domain trait, one here and two +// in an inner scope + +object DomainC extends Domain + +object Test { + def main(args: Array[String]) { + object DomainA extends Domain + object DomainB extends Domain + + def lookingForAs(event: Event): Unit = { + event match { + case DomainB.Created(_) => throw null + case DomainC.Created(_) => throw null + case DomainA.Created(_) => // okay + } + } + + lookingForAs(DomainA.Created("I am an A")) + } +} diff --git a/test/files/run/t9174.check b/test/files/run/t9174.check new file mode 100644 index 0000000000..14d6bc10db --- /dev/null +++ b/test/files/run/t9174.check @@ -0,0 +1,17 @@ + +scala> import scala.util.{Success, Failure} +import scala.util.{Success, Failure} + +scala> def f1(b: Boolean) = if (b) Left(1) else Right(2) +f1: (b: Boolean)scala.util.Either[Int,Int] + +scala> def f2(b: Boolean) = if (b) Nil else 1 :: Nil +f2: (b: Boolean)List[Int] + +scala> def f3(b: Boolean) = if (b) Stream.Empty else new Stream.Cons(1, Stream.Empty) +f3: (b: Boolean)scala.collection.immutable.Stream[Int] + +scala> def f4(b: Boolean) = if (b) Success(1) else Failure(new Exception("")) +f4: (b: Boolean)scala.util.Try[Int] + +scala> :quit diff --git a/test/files/run/t9174.scala b/test/files/run/t9174.scala new file mode 100644 index 0000000000..0c70e9bca9 --- /dev/null +++ b/test/files/run/t9174.scala @@ -0,0 +1,11 @@ +import scala.tools.partest.ReplTest + +object Test extends ReplTest { + def code = """ + |import scala.util.{Success, Failure} + |def f1(b: Boolean) = if (b) Left(1) else Right(2) + |def f2(b: Boolean) = if (b) Nil else 1 :: Nil + |def f3(b: Boolean) = if (b) Stream.Empty else new Stream.Cons(1, Stream.Empty) + |def f4(b: Boolean) = if (b) Success(1) else Failure(new Exception("")) + |""".stripMargin +} diff --git a/test/files/neg/sammy_wrong_arity.flags b/test/files/run/t9178a.flags index 48fd867160..48fd867160 100644 --- a/test/files/neg/sammy_wrong_arity.flags +++ b/test/files/run/t9178a.flags diff --git a/test/files/run/t9178a.scala b/test/files/run/t9178a.scala new file mode 100644 index 0000000000..4788841f8d --- /dev/null +++ b/test/files/run/t9178a.scala @@ -0,0 +1,15 @@ +trait Sam { def apply(): Unit } +abstract class Test { + def foo(): Sam + // no parens, instantiateToMethodType would wrap in a `new Sam { def apply = foo }` + // rather than applying to an empty param list() */ + val f: Sam = foo +} + +object Test extends Test { + lazy val samIAm = new Sam { def apply() {} } + def foo() = samIAm + def main(args: Array[String]): Unit = { + assert(f eq samIAm, f) + } +} diff --git a/test/files/run/t9200/Test.java b/test/files/run/t9200/Test.java new file mode 100644 index 0000000000..8ff0314f6c --- /dev/null +++ b/test/files/run/t9200/Test.java @@ -0,0 +1,6 @@ +public class Test { + public static void main(String[] args) { + new C1(new C2()); // Was NoSuchMethodError + } +} + diff --git a/test/files/run/t9200/test.scala b/test/files/run/t9200/test.scala new file mode 100644 index 0000000000..6fa7e91571 --- /dev/null +++ b/test/files/run/t9200/test.scala @@ -0,0 +1,12 @@ +trait W + +trait T1 +trait T2 extends T1 + +object O1 { + type t = T1 with T2 +} + +class C1[w<:W](o: O1.t) + +class C2 extends T1 with T2 diff --git a/test/files/run/t9349/data.scala b/test/files/run/t9349/data.scala new file mode 100644 index 0000000000..f88a6cfaeb --- /dev/null +++ b/test/files/run/t9349/data.scala @@ -0,0 +1 @@ +case class Outer(i: Int) { class Inner } diff --git a/test/files/run/t9349/test.scala b/test/files/run/t9349/test.scala new file mode 100644 index 0000000000..ebce4e77dd --- /dev/null +++ b/test/files/run/t9349/test.scala @@ -0,0 +1,21 @@ +object Test { + def main(args: Array[String]): Unit = { + val o1 = Outer(5) + o1 match { + case o @ Outer(_) => + val i = new o.Inner + } + o1 match { + case o : Outer => + val i = new o.Inner + + } + object Extractor { + def unapply(a: Any): Option[Outer] = Some(o1) + } + null match { + case Extractor(o2) => + val i = new o2.Inner + } + } +} diff --git a/test/files/run/t9375.check b/test/files/run/t9375.check index 87551dccd1..8f43fab025 100644 --- a/test/files/run/t9375.check +++ b/test/files/run/t9375.check @@ -21,7 +21,7 @@ now initializing nested objects konstruktor: class A$T$O$ konstruktor: class A$T$Op$ konstruktor: class A$O$11$ - konstruktor: class A$$anonfun$1$O$13$ + konstruktor: class A$O$13$ konstruktor: class A$$anon$1$O$ konstruktor: class A$$anon$1$Op$ konstruktor: class T$O$ @@ -33,7 +33,7 @@ now initializing nested objects konstruktor: class T$T$O$ konstruktor: class T$T$Op$ konstruktor: class T$O$14$ - konstruktor: class T$$anonfun$2$O$16$ + konstruktor: class T$O$16$ konstruktor: class T$$anon$2$O$ konstruktor: class T$$anon$2$Op$ no object konstruktors called when serializing / deserializing objects (starting at the outer or the object itself) @@ -56,5 +56,5 @@ init lazy val M.w objects declared in lazy val are not static modules either konstruktor: class M$O$19$ object declared in a function: new instance created on each invocation - konstruktor: class M$$anonfun$3$O$20$ - konstruktor: class M$$anonfun$3$O$20$ + konstruktor: class M$O$20$ + konstruktor: class M$O$20$ diff --git a/test/files/run/t9375.scala b/test/files/run/t9375.scala index 6ff4a425f8..3995b38666 100644 --- a/test/files/run/t9375.scala +++ b/test/files/run/t9375.scala @@ -1,6 +1,3 @@ -/* - * filter: inliner warning - */ import java.io._ object SerDes { diff --git a/test/files/run/t9388-bin-compat.scala b/test/files/run/t9388-bin-compat.scala deleted file mode 100644 index a03646612f..0000000000 --- a/test/files/run/t9388-bin-compat.scala +++ /dev/null @@ -1,16 +0,0 @@ -class C { - private object N extends Serializable { override def toString = "N" } - def foo = N.toString -} -object Test { - def main(args: Array[String]): Unit = { - val c = Class.forName("C") - assert(c.getDeclaredFields().toList.map(_.toString) == - List("private volatile C$N$ C.C$$N$module")) // field is name-mangled (C$$N$module instead of just N$module) - assert(c.getDeclaredMethods().toList.map(_.toString).sorted == - List("private C$N$ C.C$$N$lzycompute()", - "public C$N$ C.C$$N()", - "public java.lang.String C.foo()")) // accessor is public, name-mangled - assert((new C).foo == "N") - } -} diff --git a/test/files/run/t9403.flags b/test/files/run/t9403.flags index 307668060c..65caa3736e 100644 --- a/test/files/run/t9403.flags +++ b/test/files/run/t9403.flags @@ -1 +1 @@ --Ybackend:GenASM -optimize +-Yopt:l:classpath diff --git a/test/files/run/t9408.scala b/test/files/run/t9408.scala new file mode 100644 index 0000000000..231dca4ce7 --- /dev/null +++ b/test/files/run/t9408.scala @@ -0,0 +1,61 @@ +class Outer { + def assertNoFields(c: Class[_]) { + assert(c.getDeclaredFields.isEmpty) + } + def assertHasOuter(c: Class[_]) { + assert(c.getDeclaredFields.exists(_.getName.contains("outer"))) + } + class Member + final class FinalMember + + def test { + assertHasOuter(classOf[Member]) + assertNoFields(classOf[FinalMember]) + final class C + assertNoFields(classOf[C]) + class D + assertNoFields(classOf[D]) + (() => {class E; assertNoFields(classOf[E])}).apply() + + // The outer reference elision currently runs on a class-by-class basis. If it cannot rule out that a class has + // subclasses, it will not remove the outer reference. A smarter analysis here could detect if no members of + // a sealed (or effectively sealed) hierarchy use the outer reference, the optimization could be performed. + class Parent + class Child extends Parent + assertHasOuter(classOf[Parent]) + + // Note: outer references (if they haven't been elided) are used in pattern matching as follows. + // This isn't relevant to term-owned classes, as you can't refer to them with a prefix that includes + // the outer class. + val outer1 = new Outer + val outer2 = new Outer + (new outer1.Member: Any) match { + case _: outer2.Member => sys.error("wrong match!") + case _: outer1.Member => // okay + } + + // ... continuing on that theme, note that `Member` isn't considered as a local class, it is owned by a the class + // `LocalOuter`, which itself happens to be term-owned. So we expect that it has an outer reference, and that this + // is respected in type tests. + class LocalOuter { + class Member + final class FinalMember + } + assertNoFields(classOf[LocalOuter]) + assertHasOuter(classOf[LocalOuter#Member]) + val localOuter1 = new LocalOuter + val localOuter2 = new LocalOuter + (new localOuter1.Member: Any) match { + case _: localOuter2.Member => sys.error("wrong match!") + case _: localOuter1.Member => // okay + } + // Final member classes still lose the outer reference. + assertNoFields(classOf[LocalOuter#FinalMember]) + } +} + +object Test { + def main(args: Array[String]): Unit = { + new Outer().test + } +} diff --git a/test/files/run/t9437a.check b/test/files/run/t9437a.check new file mode 100644 index 0000000000..564213c587 --- /dev/null +++ b/test/files/run/t9437a.check @@ -0,0 +1,10 @@ +name: a; isNamePresent: true; isSynthetic: false +name: _; isNamePresent: true; isSynthetic: false +name: ***; isNamePresent: true; isSynthetic: false +name: unary_!; isNamePresent: true; isSynthetic: false +name: ABC; isNamePresent: true; isSynthetic: false +name: a; isNamePresent: true; isSynthetic: false +name: _; isNamePresent: true; isSynthetic: false +name: ***; isNamePresent: true; isSynthetic: false +name: unary_!; isNamePresent: true; isSynthetic: false +name: ABC; isNamePresent: true; isSynthetic: false diff --git a/test/files/run/t9437a/Test.scala b/test/files/run/t9437a/Test.scala new file mode 100644 index 0000000000..a86c17b646 --- /dev/null +++ b/test/files/run/t9437a/Test.scala @@ -0,0 +1,20 @@ +class Foo(a: Int, `_`: String, *** : Long, `unary_!` : Float, ABC: Double) { + def bar(a: Int, `_`: String, *** : Long, `unary_!` : Float, ABC: Double) = null +} + +object Test extends App { + val constrParams = classOf[Foo].getConstructors.head.getParameters + val methodParams = classOf[Foo].getDeclaredMethods.head.getParameters + + def printParams(params: Array[java.lang.reflect.Parameter]) = { + params.foreach { param => + println(s"name: ${param.getName}; isNamePresent: ${param.isNamePresent}; isSynthetic: ${param.isSynthetic}") + } + } + + printParams(constrParams) + printParams(methodParams) + + val foo = new Foo(a = 1, `_` = "2", *** = 3L, `unary_!` = 4.0f, ABC = 5.0) + foo.bar(a = 1, `_` = "2", *** = 3L, `unary_!` = 4.0f, ABC = 5.0) +} diff --git a/test/files/run/t9437b.check b/test/files/run/t9437b.check new file mode 100644 index 0000000000..564213c587 --- /dev/null +++ b/test/files/run/t9437b.check @@ -0,0 +1,10 @@ +name: a; isNamePresent: true; isSynthetic: false +name: _; isNamePresent: true; isSynthetic: false +name: ***; isNamePresent: true; isSynthetic: false +name: unary_!; isNamePresent: true; isSynthetic: false +name: ABC; isNamePresent: true; isSynthetic: false +name: a; isNamePresent: true; isSynthetic: false +name: _; isNamePresent: true; isSynthetic: false +name: ***; isNamePresent: true; isSynthetic: false +name: unary_!; isNamePresent: true; isSynthetic: false +name: ABC; isNamePresent: true; isSynthetic: false diff --git a/test/files/run/t9437b/Foo_1.scala b/test/files/run/t9437b/Foo_1.scala new file mode 100644 index 0000000000..ca6c9c6156 --- /dev/null +++ b/test/files/run/t9437b/Foo_1.scala @@ -0,0 +1,3 @@ +class Foo(a: Int, `_`: String, *** : Long, `unary_!` : Float, ABC: Double) { + def bar(a: Int, `_`: String, *** : Long, `unary_!` : Float, ABC: Double) = null +} diff --git a/test/files/run/t9437b/Test_2.scala b/test/files/run/t9437b/Test_2.scala new file mode 100644 index 0000000000..521f525f1d --- /dev/null +++ b/test/files/run/t9437b/Test_2.scala @@ -0,0 +1,16 @@ +object Test extends App { + val constrParams = classOf[Foo].getConstructors.head.getParameters + val methodParams = classOf[Foo].getDeclaredMethods.head.getParameters + + def printParams(params: Array[java.lang.reflect.Parameter]) = { + params.foreach { param => + println(s"name: ${param.getName}; isNamePresent: ${param.isNamePresent}; isSynthetic: ${param.isSynthetic}") + } + } + + printParams(constrParams) + printParams(methodParams) + + val foo = new Foo(a = 1, `_` = "2", *** = 3L, `unary_!` = 4.0f, ABC = 5.0) + foo.bar(a = 1, `_` = "2", *** = 3L, `unary_!` = 4.0f, ABC = 5.0) +} diff --git a/test/files/run/t9437c.check b/test/files/run/t9437c.check new file mode 100644 index 0000000000..564213c587 --- /dev/null +++ b/test/files/run/t9437c.check @@ -0,0 +1,10 @@ +name: a; isNamePresent: true; isSynthetic: false +name: _; isNamePresent: true; isSynthetic: false +name: ***; isNamePresent: true; isSynthetic: false +name: unary_!; isNamePresent: true; isSynthetic: false +name: ABC; isNamePresent: true; isSynthetic: false +name: a; isNamePresent: true; isSynthetic: false +name: _; isNamePresent: true; isSynthetic: false +name: ***; isNamePresent: true; isSynthetic: false +name: unary_!; isNamePresent: true; isSynthetic: false +name: ABC; isNamePresent: true; isSynthetic: false diff --git a/test/files/run/t9437c/Test.scala b/test/files/run/t9437c/Test.scala new file mode 100644 index 0000000000..4be233a258 --- /dev/null +++ b/test/files/run/t9437c/Test.scala @@ -0,0 +1,92 @@ +import java.io.{File, FileOutputStream} + +import scala.tools.nsc.settings.ScalaVersion +import scala.tools.partest._ +import scala.tools.asm +import asm.{AnnotationVisitor, ClassWriter, FieldVisitor, Handle, MethodVisitor, Opcodes} +import Opcodes._ + +// This test ensures that we can read JDK 8 (classfile format 52) files with +// parameter names. To do that it first uses ASM to generate a class containing +// these additional attributes. Then it runs a normal compile on Scala source +// that uses the class with named arguments. +// Any failure will be dumped to std out. +object Test extends DirectTest { + override def extraSettings: String = "-usejavacp -d " + testOutput.path + " -cp " + testOutput.path + + def generateCode(): Unit = { + val className = "Foo" + + val cw = new ClassWriter(0) + cw.visit(52, ACC_PUBLIC + ACC_SUPER, className, null, "java/lang/Object", null); + + val mvC = cw.visitMethod(ACC_PUBLIC, "<init>", "(ILjava/lang/String;JFD)V", null, null); + mvC.visitParameter("a", ACC_FINAL); + mvC.visitParameter("_", ACC_FINAL); + mvC.visitParameter("***", ACC_FINAL); + mvC.visitParameter("unary_!", ACC_FINAL); + mvC.visitParameter("ABC", ACC_FINAL); + mvC.visitCode(); + mvC.visitVarInsn(ALOAD, 0); + mvC.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V", false); + mvC.visitInsn(RETURN); + mvC.visitMaxs(1, 8); + mvC.visitEnd(); + + val mvM = cw.visitMethod(ACC_PUBLIC, "bar", "(ILjava/lang/String;JFD)Lscala/runtime/Null$;", null, null); + mvM.visitParameter("a", ACC_FINAL); + mvM.visitParameter("_", ACC_FINAL); + mvM.visitParameter("***", ACC_FINAL); + mvM.visitParameter("unary_!", ACC_FINAL); + mvM.visitParameter("ABC", ACC_FINAL); + mvM.visitCode(); + mvM.visitInsn(ACONST_NULL); + mvM.visitInsn(ARETURN); + mvM.visitMaxs(1, 8); + mvM.visitEnd(); + + cw.visitEnd(); + + val bytes = cw.toByteArray() + + val fos = new FileOutputStream(new File(s"${testOutput.path}/$className.class")) + try + fos write bytes + finally + fos.close() + + } + + def code = +""" +class Driver { + val constrParams = classOf[Foo].getConstructors.head.getParameters + val methodParams = classOf[Foo].getDeclaredMethods.head.getParameters + + def printParams(params: Array[java.lang.reflect.Parameter]) = { + params.foreach { param => + println(s"name: ${param.getName}; isNamePresent: ${param.isNamePresent}; isSynthetic: ${param.isSynthetic}") + } + } + + printParams(constrParams) + printParams(methodParams) + + val foo = new Foo(a = 1, `_` = "2", *** = 3L, `unary_!` = 4.0f, ABC = 5.0) + foo.bar(a = 1, `_` = "2", *** = 3L, `unary_!` = 4.0f, ABC = 5.0) +} +""" + + override def show(): Unit = { + // redirect err to out, for logging + val prevErr = System.err + System.setErr(System.out) + try { + generateCode() + compile() + Class.forName("Driver").newInstance() + } + finally + System.setErr(prevErr) + } +} diff --git a/test/files/neg/t8764.flags b/test/files/run/t9489.flags index 48fd867160..48fd867160 100644 --- a/test/files/neg/t8764.flags +++ b/test/files/run/t9489.flags diff --git a/test/files/run/t9489/A.java b/test/files/run/t9489/A.java new file mode 100644 index 0000000000..c3536faa14 --- /dev/null +++ b/test/files/run/t9489/A.java @@ -0,0 +1,3 @@ +public class A { + public B b() { return null; } +} diff --git a/test/files/run/t9489/B.java b/test/files/run/t9489/B.java new file mode 100644 index 0000000000..e5d1278cd7 --- /dev/null +++ b/test/files/run/t9489/B.java @@ -0,0 +1,3 @@ +public abstract class B { + public abstract int m(); +} diff --git a/test/files/run/t9489/test.scala b/test/files/run/t9489/test.scala new file mode 100644 index 0000000000..1b745af865 --- /dev/null +++ b/test/files/run/t9489/test.scala @@ -0,0 +1,10 @@ +class T { + def f(a: A) = g(a.b) // was: "found Int, required B" + def g(b: => B) = null +} + +object Test extends T { + def main(args: Array[String]): Unit = { + f(new A) + } +} diff --git a/test/files/run/t9535.scala b/test/files/run/t9535.scala new file mode 100644 index 0000000000..62e156e456 --- /dev/null +++ b/test/files/run/t9535.scala @@ -0,0 +1,22 @@ +class C[E <: Exception] { + @throws[E] def f = 1 + + @throws(classOf[Exception]) def g: E = ??? + + @throws[E] @throws[Exception] def h = 1 +} + +object Test extends App { + val c = classOf[C[_]] + def sig(method: String) = c.getDeclaredMethod(method).toString + def genSig(method: String) = c.getDeclaredMethod(method).toGenericString + + assert(sig("f") == "public int C.f() throws java.lang.Exception") + assert(genSig("f") == "public int C.f() throws E") + + assert(sig("g") == "public java.lang.Exception C.g() throws java.lang.Exception") + assert(genSig("g") == "public E C.g() throws java.lang.Exception") + + assert(sig("h") == "public int C.h() throws java.lang.Exception,java.lang.Exception") + assert(genSig("h") == "public int C.h() throws E,java.lang.Exception") +} diff --git a/test/files/run/t9749-repl-dot.check b/test/files/run/t9749-repl-dot.check new file mode 100644 index 0000000000..5ffec4ce60 --- /dev/null +++ b/test/files/run/t9749-repl-dot.check @@ -0,0 +1,8 @@ + +scala> "3" +res0: String = 3 + +scala> .toInt +res1: Int = 3 + +scala> :quit diff --git a/test/files/run/t9749-repl-dot.scala b/test/files/run/t9749-repl-dot.scala new file mode 100644 index 0000000000..19cecbf444 --- /dev/null +++ b/test/files/run/t9749-repl-dot.scala @@ -0,0 +1,10 @@ + +import scala.tools.partest.ReplTest + +object Test extends ReplTest { + def code = + """ +"3" + .toInt + """ +} diff --git a/test/files/run/test-cpp.check b/test/files/run/test-cpp.check deleted file mode 100644 index 13f4c64be3..0000000000 --- a/test/files/run/test-cpp.check +++ /dev/null @@ -1,81 +0,0 @@ ---- a -+++ b -@@ -36,3 +36,3 @@ - def main(args: Array[String] (ARRAY[REF(class String)])): Unit { -- locals: value args, value x, value y -+ locals: value args - startBlock: 1 -@@ -41,10 +41,6 @@ - 1: -- 52 CONSTANT(2) -- 52 STORE_LOCAL(value x) - 52 SCOPE_ENTER value x -- 53 LOAD_LOCAL(value x) -- 53 STORE_LOCAL(value y) - 53 SCOPE_ENTER value y - 54 LOAD_MODULE object Predef -- 54 LOAD_LOCAL(value y) -+ 54 CONSTANT(2) - 54 BOX INT -@@ -91,3 +87,3 @@ - def main(args: Array[String] (ARRAY[REF(class String)])): Unit { -- locals: value args, value x, value y -+ locals: value args, value x - startBlock: 1 -@@ -100,7 +96,5 @@ - 81 SCOPE_ENTER value x -- 82 LOAD_LOCAL(value x) -- 82 STORE_LOCAL(value y) - 82 SCOPE_ENTER value y - 83 LOAD_MODULE object Predef -- 83 LOAD_LOCAL(value y) -+ 83 LOAD_LOCAL(value x) - 83 BOX INT -@@ -134,3 +128,3 @@ - def main(args: Array[String] (ARRAY[REF(class String)])): Unit { -- locals: value args, value x, value y -+ locals: value args - startBlock: 1 -@@ -139,10 +133,6 @@ - 1: -- 66 THIS(TestAliasChainDerefThis) -- 66 STORE_LOCAL(value x) - 66 SCOPE_ENTER value x -- 67 LOAD_LOCAL(value x) -- 67 STORE_LOCAL(value y) - 67 SCOPE_ENTER value y - 68 LOAD_MODULE object Predef -- 68 LOAD_LOCAL(value y) -+ 68 THIS(Object) - 68 CALL_METHOD scala.Predef.println (dynamic) -@@ -175,3 +165,3 @@ - def test(x: Int (INT)): Unit { -- locals: value x, value y -+ locals: value x - startBlock: 1 -@@ -180,7 +170,5 @@ - 1: -- 29 LOAD_LOCAL(value x) -- 29 STORE_LOCAL(value y) - 29 SCOPE_ENTER value y - 30 LOAD_MODULE object Predef -- 30 LOAD_LOCAL(value y) -+ 30 LOAD_LOCAL(value x) - 30 BOX INT -@@ -222,7 +210,5 @@ - 96 SCOPE_ENTER variable x -- 97 LOAD_LOCAL(variable x) -- 97 STORE_LOCAL(variable y) - 97 SCOPE_ENTER variable y - 98 LOAD_MODULE object Predef -- 98 LOAD_LOCAL(variable y) -+ 98 LOAD_LOCAL(variable x) - 98 BOX INT -@@ -232,6 +218,4 @@ - 100 STORE_LOCAL(variable y) -- 101 LOAD_LOCAL(variable y) -- 101 STORE_LOCAL(variable x) - 102 LOAD_MODULE object Predef -- 102 LOAD_LOCAL(variable x) -+ 102 LOAD_LOCAL(variable y) - 102 BOX INT diff --git a/test/files/run/test-cpp.scala b/test/files/run/test-cpp.scala deleted file mode 100644 index 4fca67d51e..0000000000 --- a/test/files/run/test-cpp.scala +++ /dev/null @@ -1,104 +0,0 @@ -/** - * The only change is in the decision to replace a LOAD_LOCAL(l) - * in the copy-propagation performed before ClosureElimination. - * - * In the general case, the local variable 'l' is connected through - * an alias chain with other local variables and at the end of the - * alias chain there may be a Value, call it 'v'. - * - * If 'v' is cheaper to access (it is a Deref(This) or Const(_)), then - * replace the instruction to load it from the cheaper place. - * Otherwise, we use the local variable at the end of the alias chain - * instead of 'l'. - */ - -import scala.tools.partest.IcodeComparison - -object Test extends IcodeComparison { - override def printIcodeAfterPhase = "dce" -} - -import scala.util.Random._ - -/** - * The example in the bug report (Issue-5321): an alias chain which store - * an Unknown. Should remove local variable 'y'. - */ -object TestBugReport { - def test(x: Int) = { - val y = x - println(y) - } -} - -/** - * The code taken from scala.tools.nsc.settings.Settings: - * After inlining of the setter is performed, there is an opportunity for - * copy-propagation to eliminate some local variables. - */ -object TestSetterInline { - private var _postSetHook: this.type => Unit = (x: this.type) => () - def withPostSetHook(f: this.type => Unit): this.type = { _postSetHook = f ; this } -} - - -/** - * The access of the local variable 'y' should be replaced by the - * constant. - */ -object TestAliasChainConstant { - - def main(args: Array[String]): Unit = { - val x = 2 - val y = x - println(y) - } -} - -/** - * At the end of the alias chain we have a reference to 'this'. - * The local variables should be all discarded and replace by a - * direct reference to this - */ -class TestAliasChainDerefThis { - - def main(args: Array[String]): Unit = { - val x = this - val y = x - println(y) - } -} - -/** - * At the end of the alias chain, there is the value of a field. - * The use of variable 'y' should be replaced by 'x', not by an access - * to the field 'f' since it is more costly. - */ -object TestAliasChainDerefField { - def f = nextInt - - def main(args: Array[String]): Unit = { - val x = f - val y = x - println(y) - } -} - - -/** - * The first time 'println' is called, 'x' is replaced by 'y' - * and the second time, 'y' is replaced by 'x'. But none of them - * can be removed. - */ -object TestDifferentBindings { - - def main(args: Array[String]): Unit = { - var x = nextInt - var y = x - println(y) - - y = nextInt - x = y - println(x) - } -} diff --git a/test/files/run/trait-clonable.scala b/test/files/run/trait-clonable.scala new file mode 100644 index 0000000000..5be59d2586 --- /dev/null +++ b/test/files/run/trait-clonable.scala @@ -0,0 +1,11 @@ +// minimization of failure in run/t4813.scala related to the special +// case for default methods that override methods owned by Object.class in +// Java interfaces. +trait C[A >: Null <: AnyRef] { override def clone(): A = null } +trait X extends C[X] +class D extends X { def foo = (this: X).clone() } +object Test { + def main(args: Array[String]) { + assert(new D().foo == null) + } +} diff --git a/test/files/run/trait-default-specialize.check b/test/files/run/trait-default-specialize.check new file mode 100644 index 0000000000..1034d1c703 --- /dev/null +++ b/test/files/run/trait-default-specialize.check @@ -0,0 +1,3 @@ +public abstract void T.t(java.lang.Object) +0 +0 diff --git a/test/files/run/trait-default-specialize.scala b/test/files/run/trait-default-specialize.scala new file mode 100644 index 0000000000..6faa9d5f47 --- /dev/null +++ b/test/files/run/trait-default-specialize.scala @@ -0,0 +1,14 @@ +trait T[@specialized(Int) A] { + def t(a: A): Unit +} + +object Test { + def main(args: Array[String]): Unit = { + class TInt extends T[Int] { def t(a : Int) = println(a) } + val tMethods = classOf[TInt].getInterfaces.head.getMethods.filter(_.getName == "t") + println(tMethods.map(_.toString).sorted.mkString("\n")) + new TInt().t(0) + def call[A](t: T[A], a: A) = t.t(a) + call[Int](new TInt(), 0) + } +} diff --git a/test/files/run/trait-defaults-modules.scala b/test/files/run/trait-defaults-modules.scala new file mode 100644 index 0000000000..93fc74baff --- /dev/null +++ b/test/files/run/trait-defaults-modules.scala @@ -0,0 +1,20 @@ +trait T1 { def a: Any } + +trait T2 extends T1 { object a; object b; private object c; def usec: Any = c} +trait T3 extends T2 + +class C1 extends T1 { object a; object b } +class C2 extends C1 +class C3 extends T2 +class C4 extends T3 + +object Test { + def main(args: Array[String]): Unit = { + val (c1, c2, c3, c4) = (new C1, new C2, new C3, new C4) + c1.a; c1.b; (c1: T1).a + c2.a; c2.b; (c2: T1).a + c3.a; c3.b; (c3: T1).a; c3.usec + c4.a; c4.b; (c4: T1).a; c4.usec + } + +} diff --git a/test/files/run/trait-defaults-modules2/T_1.scala b/test/files/run/trait-defaults-modules2/T_1.scala new file mode 100644 index 0000000000..962acdade1 --- /dev/null +++ b/test/files/run/trait-defaults-modules2/T_1.scala @@ -0,0 +1,4 @@ +trait T { + private object O + def useO: Any = O +} diff --git a/test/files/run/trait-defaults-modules2/Test_2.scala b/test/files/run/trait-defaults-modules2/Test_2.scala new file mode 100644 index 0000000000..a1c49f5ddd --- /dev/null +++ b/test/files/run/trait-defaults-modules2/Test_2.scala @@ -0,0 +1,5 @@ +object Test extends T { + def main(args: Array[String]): Unit = { + useO + } +} diff --git a/test/files/run/trait-defaults-modules3.scala b/test/files/run/trait-defaults-modules3.scala new file mode 100644 index 0000000000..8790a95f4c --- /dev/null +++ b/test/files/run/trait-defaults-modules3.scala @@ -0,0 +1,8 @@ +object Test { + def main(args: Array[String]): Unit = { + object O + val x = O + val y = O + assert(x eq y) + } +} diff --git a/test/files/run/trait-renaming.check b/test/files/run/trait-renaming.check deleted file mode 100644 index b2e5affde5..0000000000 --- a/test/files/run/trait-renaming.check +++ /dev/null @@ -1,2 +0,0 @@ -public static int bippy.A$B$1$class.f(bippy.A$B$1) -public static void bippy.A$B$1$class.$init$(bippy.A$B$1) diff --git a/test/files/run/trait-renaming/A_1.scala b/test/files/run/trait-renaming/A_1.scala deleted file mode 100644 index d0fab7bfc3..0000000000 --- a/test/files/run/trait-renaming/A_1.scala +++ /dev/null @@ -1,15 +0,0 @@ -package bippy { - class A { - def f = { - trait B { - def f = 5 - } - trait C { - def g = 10 - } - new B with C { } - } - - def g = Class.forName("bippy.A$B$1$class") - } -} diff --git a/test/files/run/trait-renaming/B_2.scala b/test/files/run/trait-renaming/B_2.scala deleted file mode 100644 index 174e929fe2..0000000000 --- a/test/files/run/trait-renaming/B_2.scala +++ /dev/null @@ -1,5 +0,0 @@ -object Test { - def main(args: Array[String]): Unit = { - (new bippy.A).g.getDeclaredMethods.map(_.toString).sorted foreach println - } -} diff --git a/test/files/scalacheck/MutableTreeMap.scala b/test/files/scalacheck/MutableTreeMap.scala new file mode 100644 index 0000000000..42b88c56a7 --- /dev/null +++ b/test/files/scalacheck/MutableTreeMap.scala @@ -0,0 +1,345 @@ +import java.io._ + +import org.scalacheck._ +import org.scalacheck.Arbitrary._ +import org.scalacheck.Prop.forAll + +import scala.collection.generic.CanBuildFrom +import scala.collection.immutable +import scala.collection.mutable +import scala.util.Try +import scala.collection.mutable.{RedBlackTree => RB} + +package scala.collection.mutable { + + trait Generators { + + def genRedBlackTree[A: Arbitrary: Ordering, B: Arbitrary]: Gen[RB.Tree[A, B]] = { + import org.scalacheck.Gen._ + for { entries <- listOf(arbitrary[(A, B)]) } yield { + val tree = RB.Tree.empty[A, B] + entries.foreach { case (k, v) => RB.insert(tree, k, v) } + tree + } + } + + // Note: in scalacheck 1.12.2 tree maps can be automatically generated without the need for custom + // machinery + def genTreeMap[A: Arbitrary: Ordering, B: Arbitrary]: Gen[mutable.TreeMap[A, B]] = { + import org.scalacheck.Gen._ + for { + keys <- listOf(arbitrary[A]) + values <- listOfN(keys.size, arbitrary[B]) + } yield mutable.TreeMap(keys zip values: _*) + } + + implicit def arbRedBlackTree[A: Arbitrary: Ordering, B: Arbitrary] = Arbitrary(genRedBlackTree[A, B]) + implicit def arbTreeMap[A: Arbitrary: Ordering, B: Arbitrary] = Arbitrary(genTreeMap[A, B]) + } + + object RedBlackTreeProperties extends Properties("mutable.RedBlackTree") with Generators { + type K = String + type V = Int + + property("initial invariants") = forAll { (tree: RB.Tree[K, V]) => + RB.isValid(tree) + } + + property("insert") = forAll { (tree: RB.Tree[K, V], entries: Seq[(K, V)]) => + entries.foreach { case (k, v) => RB.insert(tree, k, v) } + RB.isValid(tree) && entries.toMap.forall { case (k, v) => RB.get(tree, k) == Some(v) } + } + + property("delete") = forAll { (tree: RB.Tree[K, V], ks: Seq[K]) => + ks.foreach { k => RB.delete(tree, k) } + RB.isValid(tree) && ks.toSet.forall { k => RB.get(tree, k) == None } + } + + property("insert & delete") = forAll { (tree: RB.Tree[K, V], ops: Seq[Either[(K, V), K]]) => + ops.foreach { + case Left((k, v)) => RB.insert(tree, k, v) + case Right(k) => RB.delete(tree, k) + } + RB.isValid(tree) + } + + property("min") = forAll { (entries: Seq[(K, V)]) => + val tree = RB.Tree.empty[K, V] + entries.foreach { case (k, v) => RB.insert(tree, k, v) } + RB.min(tree) == (if (entries.isEmpty) None else Some(entries.toMap.min)) + } + + property("max") = forAll { (entries: Seq[(K, V)]) => + val tree = RB.Tree.empty[K, V] + entries.foreach { case (k, v) => RB.insert(tree, k, v) } + RB.max(tree) == (if (entries.isEmpty) None else Some(entries.toMap.max)) + } + } + + object MutableTreeMapProperties extends Properties("mutable.TreeMap") with Generators { + type K = String + type V = Int + + property("get, contains") = forAll { (allEntries: Map[K, V]) => + val entries = allEntries.take(allEntries.size / 2) + + val map = mutable.TreeMap[K, V]() + map ++= entries + + allEntries.forall { case (k, v) => + map.contains(k) == entries.contains(k) && + map.get(k) == entries.get(k) + } + } + + property("size, isEmpty") = forAll { (entries: Map[K, V]) => + val map = mutable.TreeMap[K, V]() + map ++= entries + map.size == entries.size && map.isEmpty == entries.isEmpty + } + + property("+=") = forAll { (map: mutable.TreeMap[K, V], k: K, v: V) => + val oldSize = map.size + val containedKeyBefore = map.contains(k) + val newExpectedSize = if(containedKeyBefore) oldSize else oldSize + 1 + + map += (k -> v) + map.contains(k) && map.get(k) == Some(v) && map.size == newExpectedSize + } + + property("++=") = forAll { (map: mutable.TreeMap[K, V], entries: Seq[(K, V)]) => + val oldEntries = map.toMap + map ++= entries + (oldEntries ++ entries).forall { case (k, v) => map.get(k) == Some(v) } + } + + property("-=") = forAll { (map: mutable.TreeMap[K, V], k: K) => + val oldSize = map.size + val containedKeyBefore = map.contains(k) + val newExpectedSize = if(containedKeyBefore) oldSize - 1 else oldSize + + map -= k + !map.contains(k) && map.get(k) == None && map.size == newExpectedSize + } + + property("--=") = forAll { (map: mutable.TreeMap[K, V], ks: Seq[K]) => + val oldElems = map.toList + map --= ks + val deletedElems = ks.toSet + oldElems.forall { case (k, v) => map.get(k) == (if(deletedElems(k)) None else Some(v)) } + } + + property("iterator") = forAll { (entries: Map[K, V]) => + val map = mutable.TreeMap[K, V]() + map ++= entries + + map.iterator.toSeq == entries.toSeq.sorted + } + + property("iteratorFrom") = forAll { (entries: Map[K, V], k: K) => + val map = mutable.TreeMap[K, V]() + map ++= entries + + map.iteratorFrom(k).toSeq == entries.filterKeys(_ >= k).toSeq.sorted + } + + property("keysIteratorFrom") = forAll { (entries: Map[K, V], k: K) => + val map = mutable.TreeMap[K, V]() + map ++= entries + + map.keysIteratorFrom(k).toSeq == entries.keysIterator.filter(_ >= k).toSeq.sorted + } + + property("valuesIteratorFrom") = forAll { (entries: Map[K, V], k: K) => + val map = mutable.TreeMap[K, V]() + map ++= entries + + map.valuesIteratorFrom(k).toSeq == entries.filterKeys(_ >= k).toSeq.sorted.map(_._2) + } + + property("headOption") = forAll { (map: mutable.TreeMap[K, V]) => + map.headOption == Try(map.iterator.next()).toOption + } + + property("lastOption") = forAll { (map: mutable.TreeMap[K, V]) => + map.lastOption == Try(map.iterator.max).toOption + } + + property("clear") = forAll { (map: mutable.TreeMap[K, V]) => + map.clear() + map.isEmpty && map.size == 0 + } + + property("serializable") = forAll { (map: mutable.TreeMap[K, V]) => + val bytesOut = new ByteArrayOutputStream() + val out = new ObjectOutputStream(bytesOut) + out.writeObject(map) + val bytes = bytesOut.toByteArray + + val in = new ObjectInputStream(new ByteArrayInputStream(bytes)) + val sameMap = in.readObject().asInstanceOf[mutable.TreeMap[K, V]] + map.iterator.toSeq == sameMap.iterator.toSeq + } + + property("same behavior as immutable.TreeMap") = forAll { ops: Seq[Either[(K, V), K]] => + var imap = immutable.TreeMap[K, V]() + val mmap = mutable.TreeMap[K, V]() + + ops.foreach { + case Left((k, v)) => imap += k -> v; mmap += k -> v + case Right(k) => imap -= k; mmap -= k + } + + imap.toList == mmap.toList + } + } + + object MutableTreeMapViewProperties extends Properties("mutable.TreeMapView") with Generators { + type K = String + type V = Int + + implicit val ord = implicitly[Ordering[K]] + + def in(key: K, from: Option[K], until: Option[K]) = + from.fold(true)(_ <= key) && until.fold(true)(_ > key) + + def entriesInView[This <: TraversableOnce[(K, V)], That](entries: This, from: Option[K], until: Option[K])(implicit bf: CanBuildFrom[This, (K, V), That]) = { + (bf.apply(entries) ++= entries.filter { case (k, _) => in(k, from, until) }).result() + } + + property("get, contains") = forAll { (allEntries: Map[K, V], from: Option[K], until: Option[K]) => + val entries = allEntries.take(allEntries.size / 2) + + val map = mutable.TreeMap[K, V]() + map ++= entries + + val mapView = map.rangeImpl(from, until) + allEntries.forall { case (k, v) => + mapView.contains(k) == (in(k, from, until) && entries.contains(k)) && + mapView.get(k) == (if(in(k, from, until)) entries.get(k) else None) + } + } + + property("size, isEmpty") = forAll { (entries: Map[K, V], from: Option[K], until: Option[K]) => + val map = mutable.TreeMap[K, V]() + map ++= entries + + val mapView = map.rangeImpl(from, until) + mapView.size == entriesInView(entries, from, until).size && + mapView.isEmpty == !entries.exists { kv => in(kv._1, from, until) } + } + + property("+=") = forAll { (map: mutable.TreeMap[K, V], k: K, v: V, from: Option[K], until: Option[K]) => + val oldSize = map.size + val containedKeyBefore = map.contains(k) + val newExpectedSize = if(containedKeyBefore) oldSize else oldSize + 1 + val isInRange = in(k, from, until) + + val mapView = map.rangeImpl(from, until) + mapView += (k -> v) + + map.contains(k) && map.get(k) == Some(v) && map.size == newExpectedSize && + mapView.contains(k) == isInRange && + mapView.get(k) == (if(isInRange) Some(v) else None) + } + + property("++=") = forAll { (map: mutable.TreeMap[K, V], entries: Seq[(K, V)], from: Option[K], until: Option[K]) => + val mapView = map.rangeImpl(from, until) + mapView ++= entries + entries.toMap.forall { case (k, v) => + map.get(k) == Some(v) && + mapView.get(k) == (if (in(k, from, until)) Some(v) else None) + } + } + + property("-=") = forAll { (map: mutable.TreeMap[K, V], k: K, from: Option[K], until: Option[K]) => + val oldSize = map.size + val containedKeyBefore = map.contains(k) + val newExpectedSize = if(containedKeyBefore) oldSize - 1 else oldSize + + val mapView = map.rangeImpl(from, until) + mapView -= k + + !map.contains(k) && map.get(k) == None && map.size == newExpectedSize && + !mapView.contains(k) && + mapView.get(k) == None + } + + property("--=") = forAll { (map: mutable.TreeMap[K, V], ks: Seq[K], from: Option[K], until: Option[K]) => + val mapView = map.rangeImpl(from, until) + mapView --= ks + ks.toSet.forall { k => map.get(k) == None && mapView.get(k) == None } + } + + property("iterator") = forAll { (entries: Map[K, V], from: Option[K], until: Option[K]) => + val map = mutable.TreeMap[K, V]() + map ++= entries + + val mapView = map.rangeImpl(from, until) + mapView.iterator.toSeq == entriesInView(entries, from, until).toSeq.sorted + } + + property("iteratorFrom") = forAll { (entries: Map[K, V], k: K, from: Option[K], until: Option[K]) => + val map = mutable.TreeMap[K, V]() + map ++= entries + + val mapView = map.rangeImpl(from, until) + val newLower = Some(from.fold(k)(ord.max(_, k))) + mapView.iteratorFrom(k).toSeq == entriesInView(entries, newLower, until).toSeq.sorted + } + + property("keysIteratorFrom") = forAll { (entries: Map[K, V], k: K, from: Option[K], until: Option[K]) => + val map = mutable.TreeMap[K, V]() + map ++= entries + + val mapView = map.rangeImpl(from, until) + val newLower = Some(from.fold(k)(ord.max(_, k))) + mapView.keysIteratorFrom(k).toSeq == entriesInView(entries, newLower, until).toSeq.sorted.map(_._1) + } + + property("valuesIteratorFrom") = forAll { (entries: Map[K, V], k: K, from: Option[K], until: Option[K]) => + val map = mutable.TreeMap[K, V]() + map ++= entries + + val mapView = map.rangeImpl(from, until) + val newLower = Some(from.fold(k)(ord.max(_, k))) + mapView.valuesIteratorFrom(k).toSeq == entriesInView(entries, newLower, until).toSeq.sorted.map(_._2) + } + + property("headOption") = forAll { (map: mutable.TreeMap[K, V], from: Option[K], until: Option[K]) => + val mapView = map.rangeImpl(from, until) + mapView.headOption == Try(entriesInView(map.iterator, from, until).next()).toOption + } + + property("lastOption") = forAll { (map: mutable.TreeMap[K, V], from: Option[K], until: Option[K]) => + val mapView = map.rangeImpl(from, until) + mapView.lastOption == Try(entriesInView(map.iterator, from, until).max).toOption + } + + property("clear") = forAll { (map: mutable.TreeMap[K, V], from: Option[K], until: Option[K]) => + val mapView = map.rangeImpl(from, until) + mapView.clear() + map.isEmpty && mapView.isEmpty && map.size == 0 && mapView.size == 0 + } + + property("serializable") = forAll { (map: mutable.TreeMap[K, V], from: Option[K], until: Option[K]) => + val mapView = map.rangeImpl(from, until) + + val bytesOut = new ByteArrayOutputStream() + val out = new ObjectOutputStream(bytesOut) + out.writeObject(mapView) + val bytes = bytesOut.toByteArray + + val in = new ObjectInputStream(new ByteArrayInputStream(bytes)) + val sameMapView = in.readObject().asInstanceOf[mutable.TreeMap[K, V]] + mapView.iterator.toSeq == sameMapView.iterator.toSeq + } + } +} + +object Test extends Properties("mutable.TreeMap") { + import scala.collection.mutable._ + include(RedBlackTreeProperties) + include(MutableTreeMapProperties) + include(MutableTreeMapViewProperties) +} diff --git a/test/files/scalacheck/MutableTreeSet.scala b/test/files/scalacheck/MutableTreeSet.scala new file mode 100644 index 0000000000..bcb1d0ed94 --- /dev/null +++ b/test/files/scalacheck/MutableTreeSet.scala @@ -0,0 +1,216 @@ +import java.io._ + +import org.scalacheck._ +import org.scalacheck.Arbitrary._ +import org.scalacheck.Prop.forAll + +import scala.collection.generic.CanBuildFrom +import scala.collection.immutable +import scala.collection.mutable +import scala.util.Try + +package scala.collection.mutable { + + object MutableTreeSetProperties extends Properties("mutable.TreeSet") { + type K = String + + property("size, isEmpty") = forAll { (elems: Set[K]) => + val set = mutable.TreeSet[K]() + set ++= elems + set.size == elems.size && set.isEmpty == elems.isEmpty + } + + property("+=") = forAll { (set: mutable.TreeSet[K], k: K) => + val oldSize = set.size + val containedKeyBefore = set.contains(k) + val newExpectedSize = if(containedKeyBefore) oldSize else oldSize + 1 + + set += k + set.contains(k) && set.size == newExpectedSize + } + + property("++=") = forAll { (set: mutable.TreeSet[K], ks: Seq[K]) => + val oldElems = set.toList + set ++= ks + (oldElems ++ ks).forall(set.contains) + } + + property("-=") = forAll { (set: mutable.TreeSet[K], k: K) => + val oldSize = set.size + val containedKeyBefore = set.contains(k) + val newExpectedSize = if(containedKeyBefore) oldSize - 1 else oldSize + + set -= k + !set.contains(k) && set.size == newExpectedSize + } + + property("--=") = forAll { (set: mutable.TreeSet[K], ks: Seq[K]) => + val oldElems = set.toList + set --= ks + val deletedElems = ks.toSet + oldElems.forall { e => set.contains(e) == !deletedElems(e) } + } + + property("iterator") = forAll { (ks: Set[K]) => + val set = mutable.TreeSet[K]() + set ++= ks + + set.iterator.toSeq == ks.toSeq.sorted + } + + property("iteratorFrom, keysIteratorFrom") = forAll { (ks: Set[K], k: K) => + val set = mutable.TreeSet[K]() + set ++= ks + + set.iteratorFrom(k).toSeq == ks.filter(_ >= k).toSeq.sorted + set.keysIteratorFrom(k).toSeq == ks.filter(_ >= k).toSeq.sorted + } + + property("headOption") = forAll { (set: mutable.TreeSet[K]) => + set.headOption == Try(set.iterator.next()).toOption + } + + property("lastOption") = forAll { (set: mutable.TreeSet[K]) => + set.lastOption == Try(set.iterator.max).toOption + } + + property("clear") = forAll { (set: mutable.TreeSet[K]) => + set.clear() + set.isEmpty && set.size == 0 + } + + property("serializable") = forAll { (set: mutable.TreeSet[K]) => + val bytesOut = new ByteArrayOutputStream() + val out = new ObjectOutputStream(bytesOut) + out.writeObject(set) + val bytes = bytesOut.toByteArray + + val in = new ObjectInputStream(new ByteArrayInputStream(bytes)) + val sameSet = in.readObject().asInstanceOf[mutable.TreeSet[K]] + set.iterator.toSeq == sameSet.iterator.toSeq + } + + property("same behavior as immutable.TreeMap") = forAll { ops: Seq[Either[K, K]] => + var iset = immutable.TreeSet[K]() + val mset = mutable.TreeSet[K]() + + ops.foreach { + case Left(k) => iset += k; mset += k + case Right(k) => iset -= k; mset -= k + } + + iset.toList == mset.toList + } + } + + object MutableTreeSetViewProperties extends Properties("mutable.TreeSetView") { + type K = String + + implicit val ord = implicitly[Ordering[K]] + + def in(key: K, from: Option[K], until: Option[K]) = + from.fold(true)(_ <= key) && until.fold(true)(_ > key) + + def keysInView[This <: TraversableOnce[K], That](keys: This, from: Option[K], until: Option[K])(implicit bf: CanBuildFrom[This, K, That]) = { + (bf.apply(keys) ++= keys.filter(in(_, from, until))).result() + } + + property("size, isEmpty") = forAll { (keys: Set[K], from: Option[K], until: Option[K]) => + val map = mutable.TreeSet[K]() + map ++= keys + + val mapView = map.rangeImpl(from, until) + mapView.size == keysInView(keys, from, until).size && + mapView.isEmpty == !keys.exists(in(_, from, until)) + } + + property("+=") = forAll { (set: mutable.TreeSet[K], k: K, from: Option[K], until: Option[K]) => + val oldSize = set.size + val containedKeyBefore = set.contains(k) + val newExpectedSize = if(containedKeyBefore) oldSize else oldSize + 1 + val isInRange = in(k, from, until) + + val setView = set.rangeImpl(from, until) + setView += k + + set.contains(k) && set.size == newExpectedSize && setView.contains(k) == isInRange + } + + property("++=") = forAll { (set: mutable.TreeSet[K], ks: Seq[K], from: Option[K], until: Option[K]) => + val setView = set.rangeImpl(from, until) + setView ++= ks + ks.toSet.forall { k => + set.contains(k) && setView.contains(k) == in(k, from, until) + } + } + + property("-=") = forAll { (set: mutable.TreeSet[K], k: K, from: Option[K], until: Option[K]) => + val oldSize = set.size + val containedKeyBefore = set.contains(k) + val newExpectedSize = if(containedKeyBefore) oldSize - 1 else oldSize + + val setView = set.rangeImpl(from, until) + setView -= k + + !set.contains(k) && set.size == newExpectedSize && !setView.contains(k) + } + + property("--=") = forAll { (set: mutable.TreeSet[K], ks: Seq[K], from: Option[K], until: Option[K]) => + val setView = set.rangeImpl(from, until) + setView --= ks + ks.toSet.forall { k => !set.contains(k) && !setView.contains(k) } + } + + property("iterator") = forAll { (ks: Set[K], from: Option[K], until: Option[K]) => + val set = mutable.TreeSet[K]() + set ++= ks + + val setView = set.rangeImpl(from, until) + setView.iterator.toSeq == keysInView(ks, from, until).toSeq.sorted + } + + property("iteratorFrom, keysIteratorFrom") = forAll { (ks: Set[K], k: K, from: Option[K], until: Option[K]) => + val set = mutable.TreeSet[K]() + set ++= ks + + val setView = set.rangeImpl(from, until) + val newLower = Some(from.fold(k)(ord.max(_, k))) + setView.iteratorFrom(k).toSeq == keysInView(ks, newLower, until).toSeq.sorted + } + + property("headOption") = forAll { (set: mutable.TreeSet[K], from: Option[K], until: Option[K]) => + val setView = set.rangeImpl(from, until) + setView.headOption == Try(keysInView(set.iterator, from, until).next()).toOption + } + + property("lastOption") = forAll { (set: mutable.TreeSet[K], from: Option[K], until: Option[K]) => + val setView = set.rangeImpl(from, until) + setView.lastOption == Try(keysInView(set.iterator, from, until).max).toOption + } + + property("clear") = forAll { (set: mutable.TreeSet[K], from: Option[K], until: Option[K]) => + val setView = set.rangeImpl(from, until) + setView.clear() + set.isEmpty && setView.isEmpty && set.size == 0 && setView.size == 0 + } + + property("serializable") = forAll { (set: mutable.TreeSet[K], from: Option[K], until: Option[K]) => + val setView = set.rangeImpl(from, until) + + val bytesOut = new ByteArrayOutputStream() + val out = new ObjectOutputStream(bytesOut) + out.writeObject(setView) + val bytes = bytesOut.toByteArray + + val in = new ObjectInputStream(new ByteArrayInputStream(bytes)) + val sameSetView = in.readObject().asInstanceOf[mutable.TreeSet[K]] + setView.iterator.toSeq == sameSetView.iterator.toSeq + } + } +} + +object Test extends Properties("mutable.TreeSet") { + import scala.collection.mutable._ + include(MutableTreeSetProperties) + include(MutableTreeSetViewProperties) +} diff --git a/test/files/scalacheck/avl.scala b/test/files/scalacheck/avl.scala deleted file mode 100644 index 4cfacaf407..0000000000 --- a/test/files/scalacheck/avl.scala +++ /dev/null @@ -1,112 +0,0 @@ -import org.scalacheck.Gen -import org.scalacheck.Prop.forAll -import org.scalacheck.Properties - -package scala.collection.mutable { - - /** - * Property of an AVL Tree : Any node of the tree has a balance value beetween in [-1; 1] - */ - abstract class AVLTreeTest(name: String) extends Properties(name) { - - def `2^`(n: Int) = (1 to n).fold(1)((a, b) => b*2) - - def capacityMax(depth: Int): Int = `2^`(depth+1) - 1 - - def minDepthForCapacity(x: Int): Int = { - var depth = 0 - while(capacityMax(depth) < x) - depth += 1 - depth - } - - def numberOfElementsInLeftSubTree(n: Int): collection.immutable.IndexedSeq[Int] = { - val mid = n/2 + n%2 - ((1 until mid) - .filter { i => math.abs(minDepthForCapacity(i) - minDepthForCapacity(n-i)) < 2 } - .flatMap { i => Seq(i, n-(i+1)) }).toIndexedSeq.distinct - } - - def makeAllBalancedTree[A](elements: List[A]): List[AVLTree[A]] = elements match { - case Nil => Leaf::Nil - case first::Nil => Node(first, Leaf, Leaf)::Nil - case first::second::Nil => Node(second, Node(first, Leaf, Leaf), Leaf)::Node(first, Leaf, Node(second, Leaf, Leaf))::Nil - case first::second::third::Nil => Node(second, Node(first, Leaf, Leaf), Node(third, Leaf, Leaf))::Nil - case _ => { - val combinations = for { - left <- numberOfElementsInLeftSubTree(elements.size) - root = elements(left) - right = elements.size - (left + 1) - } yield (root, left, right) - (combinations.flatMap(triple => for { - l <- makeAllBalancedTree(elements.take(triple._2)) - r <- makeAllBalancedTree(elements.takeRight(triple._3)) - } yield Node(triple._1, l, r))).toList - } - } - - def genInput: org.scalacheck.Gen[(Int, List[AVLTree[Int]])] = for { - size <- org.scalacheck.Gen.choose(20, 25) - elements <- org.scalacheck.Gen.listOfN(size, org.scalacheck.Gen.choose(0, 1000)) - selected <- org.scalacheck.Gen.choose(0, 1000) - } yield { - // selected mustn't be in elements already - val list = makeAllBalancedTree(elements.sorted.distinct.map(_*2)) - (selected*2+1, list) - } - - def genInputDelete: org.scalacheck.Gen[(Int, List[AVLTree[Int]])] = for { - size <- org.scalacheck.Gen.choose(20, 25) - elements <- org.scalacheck.Gen.listOfN(size, org.scalacheck.Gen.choose(0, 1000)) - e = elements.sorted.distinct - selected <- org.scalacheck.Gen.choose(0, e.size-1) - } yield { - // selected must be in elements already - val list = makeAllBalancedTree(e) - (e(selected), list) - } - } - - trait AVLInvariants { - self: AVLTreeTest => - - def isBalanced[A](t: AVLTree[A]): Boolean = t match { - case node: Node[A] => math.abs(node.balance) < 2 && (List(node.left, node.right) forall isBalanced) - case Leaf => true - } - - def setup(invariant: AVLTree[Int] => Boolean) = forAll(genInput) { - case (selected: Int, trees: List[AVLTree[Int]]) => - trees.map(tree => invariant(tree)).fold(true)((a, b) => a && b) - } - - property("Every tree is initially balanced.") = setup(isBalanced) - } - - object TestInsert extends AVLTreeTest("Insert") with AVLInvariants { - import math.Ordering.Int - property("`insert` creates a new tree containing the given element. The tree remains balanced.") = forAll(genInput) { - case (selected: Int, trees: List[AVLTree[Int]]) => - trees.map(tree => { - val modifiedTree = tree.insert(selected, Int) - modifiedTree.contains(selected, Int) && isBalanced(modifiedTree) - }).fold(true)((a, b) => a && b) - } - } - - object TestRemove extends AVLTreeTest("Remove") with AVLInvariants { - import math.Ordering.Int - property("`remove` creates a new tree without the given element. The tree remains balanced.") = forAll(genInputDelete) { - case (selected: Int, trees: List[AVLTree[Int]]) => - trees.map(tree => { - val modifiedTree = tree.remove(selected, Int) - tree.contains(selected, Int) && !modifiedTree.contains(selected, Int) && isBalanced(modifiedTree) - }).fold(true)((a, b) => a && b) - } - } -} - -object Test extends Properties("AVL") { - include(scala.collection.mutable.TestInsert) - include(scala.collection.mutable.TestRemove) -} diff --git a/test/files/scalacheck/concurrent-map.scala b/test/files/scalacheck/concurrent-map.scala new file mode 100755 index 0000000000..7c9b8d4169 --- /dev/null +++ b/test/files/scalacheck/concurrent-map.scala @@ -0,0 +1,76 @@ + + + +import java.util.concurrent._ +import scala.collection._ +import scala.collection.JavaConverters._ +import org.scalacheck._ +import org.scalacheck.Prop._ +import org.scalacheck.Gen._ + + + +case class Wrap(i: Int) { + override def hashCode = i * 0x9e3775cd +} + + +object Test extends Properties("concurrent.TrieMap") { + + /* generators */ + + val sizes = choose(0, 20000) + + val threadCounts = choose(2, 16) + + val threadCountsAndSizes = for { + p <- threadCounts + sz <- sizes + } yield (p, sz); + + + /* helpers */ + + def inParallel[T](totalThreads: Int)(body: Int => T): Seq[T] = { + val threads = for (idx <- 0 until totalThreads) yield new Thread { + setName("ParThread-" + idx) + private var res: T = _ + override def run() { + res = body(idx) + } + def result = { + this.join() + res + } + } + + threads foreach (_.start()) + threads map (_.result) + } + + property("concurrent getOrElseUpdate insertions") = forAll(threadCounts, sizes) { + (p, sz) => + val chm = new ConcurrentHashMap[Wrap, Int]().asScala + + val results = inParallel(p) { + idx => + for (i <- 0 until sz) yield chm.getOrElseUpdate(new Wrap(i), idx) + } + + val resultSets = for (i <- 0 until sz) yield results.map(_(i)).toSet + val largerThanOne = resultSets.zipWithIndex.find(_._1.size != 1) + val allThreadsAgreeOnWhoInserted = { + largerThanOne == None + } :| s"$p threads agree on who inserted [disagreement (differentResults, position) = $largerThanOne]" + + allThreadsAgreeOnWhoInserted + } + + +} + + + + + + diff --git a/test/files/scalacheck/parallel-collections/ParallelRangeCheck.scala b/test/files/scalacheck/parallel-collections/ParallelRangeCheck.scala index f490d9490a..a80d1a27a1 100644 --- a/test/files/scalacheck/parallel-collections/ParallelRangeCheck.scala +++ b/test/files/scalacheck/parallel-collections/ParallelRangeCheck.scala @@ -27,7 +27,7 @@ class ParallelRangeCheck(val tasksupport: TaskSupport) extends ParallelSeqCheck[ def isCheckingViews = false - def ofSize(vals: Seq[Gen[Int]], sz: Int) = unsupported + def ofSize(vals: Seq[Gen[Int]], sz: Int) = throw new UnsupportedOperationException override def instances(vals: Seq[Gen[Int]]): Gen[Seq[Int]] = sized { start => sized { end => diff --git a/test/files/scalacheck/quasiquotes/TypecheckedProps.scala b/test/files/scalacheck/quasiquotes/TypecheckedProps.scala index f84df269ca..2c4d81f333 100644 --- a/test/files/scalacheck/quasiquotes/TypecheckedProps.scala +++ b/test/files/scalacheck/quasiquotes/TypecheckedProps.scala @@ -167,7 +167,7 @@ trait TypecheckedTypes { self: QuasiquoteProperties => property("applied type") = test { val tt = typecheckTyp(tq"Map[Int, Int]") val tq"$tpt[..$tpts]" = tt - val tq"scala.this.Predef.Map" = tpt + val tq"scala.Predef.Map" = tpt val List(tq"scala.Int", tq"scala.Int") = tpts } diff --git a/test/files/specialized/SI-7343.scala b/test/files/specialized/SI-7343.scala index 8d14a2c1c5..a5fc547868 100644 --- a/test/files/specialized/SI-7343.scala +++ b/test/files/specialized/SI-7343.scala @@ -48,7 +48,7 @@ object Test extends App { new Val(101, "Parent$mcI$sp") /** - * NOTE: The the same check, only modified to affect constructors, won't + * NOTE: The same check, only modified to affect constructors, won't * work since the class X definition will always be lifted to become a * member of the class, making it impossible to force its duplication. */ diff --git a/test/files/specialized/fft.check b/test/files/specialized/fft.check index 74cb9bb3b5..5283c6cbe2 100644 --- a/test/files/specialized/fft.check +++ b/test/files/specialized/fft.check @@ -1,4 +1,4 @@ Processing 65536 items Boxed doubles: 0 -Boxed ints: 2 +Boxed ints: 0 Boxed longs: 1179811 diff --git a/test/instrumented/library/scala/runtime/BoxesRunTime.java b/test/instrumented/library/scala/runtime/BoxesRunTime.java index 57799bd9b1..05ce2941a8 100644 --- a/test/instrumented/library/scala/runtime/BoxesRunTime.java +++ b/test/instrumented/library/scala/runtime/BoxesRunTime.java @@ -278,10 +278,6 @@ public final class BoxesRunTime else if (n instanceof java.lang.Float) return hashFromFloat((java.lang.Float)n); else return n.hashCode(); } - public static int hashFromObject(Object a) { - if (a instanceof Number) return hashFromNumber((Number)a); - else return a.hashCode(); - } private static int unboxCharOrInt(Object arg1, int code) { if (code == CHAR) diff --git a/test/instrumented/library/scala/runtime/ScalaRunTime.scala b/test/instrumented/library/scala/runtime/ScalaRunTime.scala index 6b45a4e9f3..7480ad6fbf 100644 --- a/test/instrumented/library/scala/runtime/ScalaRunTime.scala +++ b/test/instrumented/library/scala/runtime/ScalaRunTime.scala @@ -35,15 +35,6 @@ object ScalaRunTime { private def isArrayClass(clazz: jClass[_], atLevel: Int): Boolean = clazz.isArray && (atLevel == 1 || isArrayClass(clazz.getComponentType, atLevel - 1)) - def isValueClass(clazz: jClass[_]) = clazz.isPrimitive() - - // includes specialized subclasses and future proofed against hypothetical TupleN (for N > 22) - def isTuple(x: Any) = x != null && x.getClass.getName.startsWith("scala.Tuple") - def isAnyVal(x: Any) = x match { - case _: Byte | _: Short | _: Char | _: Int | _: Long | _: Float | _: Double | _: Boolean | _: Unit => true - case _ => false - } - /** Return the class object representing an array with element class `clazz`. */ def arrayClass(clazz: jClass[_]): jClass[_] = { @@ -52,15 +43,6 @@ object ScalaRunTime { else java.lang.reflect.Array.newInstance(clazz, 0).getClass } - /** Return the class object representing elements in arrays described by a given schematic. - */ - def arrayElementClass(schematic: Any): jClass[_] = schematic match { - case cls: jClass[_] => cls.getComponentType - case tag: ClassTag[_] => tag.runtimeClass - case _ => - throw new UnsupportedOperationException(s"unsupported schematic $schematic (${schematic.getClass})") - } - /** Return the class object representing an unboxed value type, * e.g. classOf[int], not classOf[java.lang.Integer]. The compiler * rewrites expressions like 5.getClass to come here. @@ -122,15 +104,15 @@ object ScalaRunTime { } def array_clone(xs: AnyRef): AnyRef = xs match { - case x: Array[AnyRef] => ArrayRuntime.cloneArray(x) - case x: Array[Int] => ArrayRuntime.cloneArray(x) - case x: Array[Double] => ArrayRuntime.cloneArray(x) - case x: Array[Long] => ArrayRuntime.cloneArray(x) - case x: Array[Float] => ArrayRuntime.cloneArray(x) - case x: Array[Char] => ArrayRuntime.cloneArray(x) - case x: Array[Byte] => ArrayRuntime.cloneArray(x) - case x: Array[Short] => ArrayRuntime.cloneArray(x) - case x: Array[Boolean] => ArrayRuntime.cloneArray(x) + case x: Array[AnyRef] => x.clone() + case x: Array[Int] => x.clone() + case x: Array[Double] => x.clone() + case x: Array[Long] => x.clone() + case x: Array[Float] => x.clone() + case x: Array[Char] => x.clone() + case x: Array[Byte] => x.clone() + case x: Array[Short] => x.clone() + case x: Array[Boolean] => x.clone() case x: Array[Unit] => x case null => throw new NullPointerException } @@ -169,9 +151,6 @@ object ScalaRunTime { m } - def checkInitialized[T <: AnyRef](x: T): T = - if (x == null) throw new UninitializedError else x - def _toString(x: Product): String = x.productIterator.mkString(x.productPrefix + "(", ",", ")") @@ -191,72 +170,12 @@ object ScalaRunTime { } } - /** Fast path equality method for inlining; used when -optimise is set. - */ - @inline def inlinedEquals(x: Object, y: Object): Boolean = - if (x eq y) true - else if (x eq null) false - else if (x.isInstanceOf[java.lang.Number]) BoxesRunTime.equalsNumObject(x.asInstanceOf[java.lang.Number], y) - else if (x.isInstanceOf[java.lang.Character]) BoxesRunTime.equalsCharObject(x.asInstanceOf[java.lang.Character], y) - else x.equals(y) - - def _equals(x: Product, y: Any): Boolean = y match { - case y: Product if x.productArity == y.productArity => x.productIterator sameElements y.productIterator - case _ => false - } - - // hashcode ----------------------------------------------------------- - // - // Note that these are the implementations called by ##, so they - // must not call ## themselves. - + /** Implementation of `##`. */ def hash(x: Any): Int = if (x == null) 0 else if (x.isInstanceOf[java.lang.Number]) BoxesRunTime.hashFromNumber(x.asInstanceOf[java.lang.Number]) else x.hashCode - def hash(dv: Double): Int = { - val iv = dv.toInt - if (iv == dv) return iv - - val lv = dv.toLong - if (lv == dv) return lv.hashCode - - val fv = dv.toFloat - if (fv == dv) fv.hashCode else dv.hashCode - } - def hash(fv: Float): Int = { - val iv = fv.toInt - if (iv == fv) return iv - - val lv = fv.toLong - if (lv == fv) return hash(lv) - else fv.hashCode - } - def hash(lv: Long): Int = { - val low = lv.toInt - val lowSign = low >>> 31 - val high = (lv >>> 32).toInt - low ^ (high + lowSign) - } - def hash(x: Number): Int = runtime.BoxesRunTime.hashFromNumber(x) - - // The remaining overloads are here for completeness, but the compiler - // inlines these definitions directly so they're not generally used. - def hash(x: Int): Int = x - def hash(x: Short): Int = x.toInt - def hash(x: Byte): Int = x.toInt - def hash(x: Char): Int = x.toInt - def hash(x: Boolean): Int = if (x) true.hashCode else false.hashCode - def hash(x: Unit): Int = 0 - - /** A helper method for constructing case class equality methods, - * because existential types get in the way of a clean outcome and - * it's performing a series of Any/Any equals comparisons anyway. - * See ticket #2867 for specifics. - */ - def sameElements(xs1: scala.collection.Seq[Any], xs2: scala.collection.Seq[Any]) = xs1 sameElements xs2 - /** Given any Scala value, convert it to a String. * * The primary motivation for this method is to provide a means for @@ -278,6 +197,9 @@ object ScalaRunTime { def isScalaClass(x: AnyRef) = packageOf(x) startsWith "scala." def isScalaCompilerClass(x: AnyRef) = packageOf(x) startsWith "scala.tools.nsc." + // includes specialized subclasses and future proofed against hypothetical TupleN (for N > 22) + def isTuple(x: Any) = x != null && x.getClass.getName.startsWith("scala.Tuple") + // When doing our own iteration is dangerous def useOwnToString(x: Any) = x match { // Node extends NodeSeq extends Seq[Node] and MetaData extends Iterable[MetaData] @@ -345,18 +267,4 @@ object ScalaRunTime { nl + s + "\n" } - private[scala] def checkZip(what: String, coll1: TraversableOnce[_], coll2: TraversableOnce[_]) { - if (sys.props contains "scala.debug.zip") { - val xs = coll1.toIndexedSeq - val ys = coll2.toIndexedSeq - if (xs.length != ys.length) { - Console.err.println( - "Mismatched zip in " + what + ":\n" + - " this: " + xs.mkString(", ") + "\n" + - " that: " + ys.mkString(", ") - ) - (new Exception).getStackTrace.drop(2).take(10).foreach(println) - } - } - } } diff --git a/test/junit/scala/BoxUnboxTest.scala b/test/junit/scala/BoxUnboxTest.scala new file mode 100644 index 0000000000..162d805a6b --- /dev/null +++ b/test/junit/scala/BoxUnboxTest.scala @@ -0,0 +1,119 @@ +package scala + +import org.junit.Test +import org.junit.Assert._ +import org.junit.runner.RunWith +import org.junit.runners.JUnit4 + +import scala.tools.testing.AssertUtil._ + +@RunWith(classOf[JUnit4]) +class BoxUnboxTest { + def genericNull[T] = null.asInstanceOf[T] // allowed, see SI-4437, point 2 + + @Test + def boxUnboxInt(): Unit = { + val b = new Integer(1) + val u = 1 + + assertEquals(1.toInt, u) + + assertEquals(Predef.int2Integer(1), b) + assertEquals(1: Integer, b) + assertEquals(Int.box(1), b) + assertEquals(1.asInstanceOf[Object], b) + + assertThrows[ClassCastException]("".asInstanceOf[Integer]) + + assertEquals(Predef.Integer2int(b), u) + assertEquals(b: Int, u) + assertEquals(Int.unbox(b), u) + assertEquals(b.asInstanceOf[Int], u) + assertEquals(b.intValue, u) + assertEquals(b.toInt, u) + intWrapper(b).toInt + + assertThrows[ClassCastException](Int.unbox("")) + assertThrows[ClassCastException]("".asInstanceOf[Int]) + + // null unboxing in various positions + + val n1 = Int.unbox(null) + assertEquals(n1, 0) + val n2 = Predef.Integer2int(null) + assertEquals(n2, 0) + val n3 = (null: Integer): Int + assertEquals(n3, 0) + val n4 = null.asInstanceOf[Int] + assertEquals(n4, 0) + val n5 = null.asInstanceOf[Int] == 0 + assertTrue(n5) + val n6 = null.asInstanceOf[Int] == null // SI-9671 -- should be false, but is true + assertThrows[AssertionError](assertFalse(n6)) // should not throw + val n7 = null.asInstanceOf[Int] != 0 + assertFalse(n7) + val n8 = null.asInstanceOf[Int] != null // SI-9671 -- should be true, but is false + assertThrows[AssertionError](assertTrue(n8)) // should not throw + + val mp = new java.util.HashMap[Int, Int] + val n9 = mp.get(0) + assertEquals(n9, 0) + val n10 = mp.get(0) == null // SI-602 -- maybe related to SI-9671 (test above)? + assertThrows[AssertionError](assertFalse(n10)) // should not throw + + def f(a: Any) = "" + a + val n11 = f(null.asInstanceOf[Int]) // "null", should be "0". probably same cause as SI-602. + assertThrows[AssertionError](assertEquals(n11, "0")) // should not throw + + def n12 = genericNull[Int] + assertEquals(n12, 0) + } + + @Test + def numericConversions(): Unit = { + val i1 = 1L.asInstanceOf[Int] + assertEquals(i1, 1) + assertThrows[ClassCastException] { + val i2 = (1L: Any).asInstanceOf[Int] // SI-1448, should not throw. see also SI-4437 point 1. + assertEquals(i2, 1) + } + } + + @Test + def boxUnboxBoolean(): Unit = { + val n1 = Option(null.asInstanceOf[Boolean]) // SI-7397 -- should be Some(false), but is None + assertThrows[AssertionError](assertEquals(n1, Some(false))) // should not throw + } + + @Test + def boxUnboxUnit(): Unit = { + // should not use assertEquals in this test: it takes two Object parameters. normally, Unit does + // not conform to Object, but for Java-defined methods scalac makes an exception and treats them + // as Any. passing a Unit as Any makes the compiler go through another layer of boxing, so it + // can hide some bugs (where we actually have a null, but the compiler makes it a ()). + + var v = 0 + def eff() = { v = 1 } + def chk() = { assert(v == 1); v = 0 } + + val b = runtime.BoxedUnit.UNIT + + assert(eff() == b); chk() + assert(Unit.box(eff()) == b); chk() + assert(().asInstanceOf[Object] == b) + + Unit.unbox({eff(); b}); chk() + Unit.unbox({eff(); null}); chk() + assertThrows[ClassCastException](Unit.unbox({eff(); ""})); chk() + + val n1 = null.asInstanceOf[Unit] // SI-9066: should be UNIT, but currently null + assertThrows[AssertionError](assert(n1 == b)) // should not throw + + val n2 = null.asInstanceOf[Unit] == b // SI-9066: should be true, but currently false + assertThrows[AssertionError](assert(n2)) // should not throw + + def f(a: Any) = "" + a + val n3 = f(null.asInstanceOf[Unit]) // "null", should be "()". probably same cause as SI-602. + assertThrows[AssertionError](assertEquals(n3, "()")) // should not throw + } +} diff --git a/test/junit/scala/PartialFunctionSerializationTest.scala b/test/junit/scala/PartialFunctionSerializationTest.scala new file mode 100644 index 0000000000..d525b045cd --- /dev/null +++ b/test/junit/scala/PartialFunctionSerializationTest.scala @@ -0,0 +1,36 @@ +package scala + +import org.junit.Test +import org.junit.Assert._ +import org.junit.runner.RunWith +import org.junit.runners.JUnit4 + +@RunWith(classOf[JUnit4]) +class PartialFunctionSerializationTest { + val pf1: PartialFunction[Int, Int] = { + case n if n > 0 => 1 + } + + val pf2: PartialFunction[Int, Int] = { + case n if n <= 0 => 2 + } + + + private def assertSerializable[A,B](fn: A => B) = { + import java.io._ + + new ObjectOutputStream(new ByteArrayOutputStream()).writeObject(fn) + } + + @Test def canSerializeLiteral= assertSerializable(pf1) + + @Test def canSerializeLifted= assertSerializable(pf1.lift) + + @Test def canSerializeOrElse = assertSerializable(pf1 orElse pf2) + + @Test def canSerializeUnlifted = assertSerializable(Function.unlift((x: Int) => Some(x))) + + @Test def canSerializeAndThen = assertSerializable(pf1.andThen((x: Int) => x)) + + @Test def canSerializeEmpty = assertSerializable(PartialFunction.empty) +} diff --git a/test/junit/scala/PredefAutoboxingTest.scala b/test/junit/scala/PredefAutoboxingTest.scala new file mode 100644 index 0000000000..e5d8ded5d4 --- /dev/null +++ b/test/junit/scala/PredefAutoboxingTest.scala @@ -0,0 +1,35 @@ +package scala + +import org.junit.Test +import org.junit.Assert._ +import org.junit.runner.RunWith +import org.junit.runners.JUnit4 + +import scala.tools.testing.AssertUtil._ + +@RunWith(classOf[JUnit4]) +class PredefAutoboxingTest { + @Test def unboxNullByte() = + assertEquals(Predef.Byte2byte(null), 0.toByte) + + @Test def unboxNullShort() = + assertEquals(Predef.Short2short(null), 0.toShort) + + @Test def unboxNullCharacter() = + assertEquals(Predef.Character2char(null), 0.toChar) + + @Test def unboxNullInteger() = + assertEquals(Predef.Integer2int(null), 0) + + @Test def unboxNullLong() = + assertEquals(Predef.Long2long(null), 0L) + + @Test def unboxNullFloat() = + assertEquals(Predef.Float2float(null), 0F, 0F) + + @Test def unboxNullDouble() = + assertEquals(Predef.Double2double(null), 0D, 0D) + + @Test def unboxNullBoolean() = + assertEquals(Predef.Boolean2boolean(null), false) +} diff --git a/test/junit/scala/StringContextTest.scala b/test/junit/scala/StringContextTest.scala index 7e9e775d58..b5af6de7eb 100644 --- a/test/junit/scala/StringContextTest.scala +++ b/test/junit/scala/StringContextTest.scala @@ -1,6 +1,10 @@ package scala +import java.text.DecimalFormat + +import language.implicitConversions + import org.junit.Test import org.junit.Assert._ import org.junit.runner.RunWith @@ -8,10 +12,32 @@ import org.junit.runners.JUnit4 import scala.tools.testing.AssertUtil._ +object StringContextTestUtils { + private val decimalSeparator: Char = new DecimalFormat().getDecimalFormatSymbols().getDecimalSeparator() + private val numberPattern = """(\d+)\.(\d+.*)""".r + + implicit class StringContextOps(val sc: StringContext) extends AnyVal { + // Use this String interpolator to avoid problems with a locale-dependent decimal mark. + def locally(numbers: String*): String = { + val numbersWithCorrectLocale = numbers.map(applyProperLocale) + sc.s(numbersWithCorrectLocale: _*) + } + + // Handles cases like locally"3.14" - it's prettier than locally"${"3.14"}". + def locally(): String = sc.parts.map(applyProperLocale).mkString + + private def applyProperLocale(number: String): String = { + val numberPattern(intPart, fractionalPartAndSuffix) = number + s"$intPart$decimalSeparator$fractionalPartAndSuffix" + } + } +} + @RunWith(classOf[JUnit4]) class StringContextTest { import StringContext._ + import StringContextTestUtils.StringContextOps @Test def noEscape() = { val s = "string" @@ -65,23 +91,176 @@ class StringContextTest { @Test def fIf() = { val res = f"${if (true) 2.5 else 2.5}%.2f" - val expected = formatUsingCurrentLocale(2.50) + val expected = locally"2.50" assertEquals(expected, res) } @Test def fIfNot() = { val res = f"${if (false) 2.5 else 3.5}%.2f" - val expected = formatUsingCurrentLocale(3.50) + val expected = locally"3.50" assertEquals(expected, res) } @Test def fHeteroArgs() = { val res = f"${3.14}%.2f rounds to ${3}%d" - val expected = formatUsingCurrentLocale(3.14) + " rounds to 3" + val expected = locally"${"3.14"} rounds to 3" assertEquals(expected, res) } - // Use this method to avoid problems with a locale-dependent decimal mark. - // The string interpolation is not used here intentionally as this method is used to test string interpolation. - private def formatUsingCurrentLocale(number: Double, decimalPlaces: Int = 2) = ("%." + decimalPlaces + "f").format(number) + @Test def `f interpolator baseline`(): Unit = { + + implicit def stringToBoolean(s: String): Boolean = java.lang.Boolean.parseBoolean(s) + implicit def stringToChar(s: String): Char = s(0) + implicit def str2fmt(s: String): java.util.Formattable = new java.util.Formattable { + def formatTo(f: java.util.Formatter, g: Int, w: Int, p: Int) = f.format("%s", s) + } + + val b_true = true + val b_false = false + + val i = 42 + + val f_zero = 0.0 + val f_zero_- = -0.0 + + val s = "Scala" + + val fff = new java.util.Formattable { + def formatTo(f: java.util.Formatter, g: Int, w: Int, p: Int) = f.format("4") + } + import java.util.{ Calendar, Locale } + val c = Calendar.getInstance(Locale.US) + c.set(2012, Calendar.MAY, 26) + implicit def strToDate(x: String): Calendar = c + + val ss = List[(String, String)] ( + // 'b' / 'B' (category: general) + // ----------------------------- + f"${b_false}%b" -> "false", + f"${b_true}%b" -> "true", + + f"${null}%b" -> "false", + f"${false}%b" -> "false", + f"${true}%b" -> "true", + f"${true && false}%b" -> "false", + f"${new java.lang.Boolean(false)}%b" -> "false", + f"${new java.lang.Boolean(true)}%b" -> "true", + + f"${null}%B" -> "FALSE", + f"${false}%B" -> "FALSE", + f"${true}%B" -> "TRUE", + f"${new java.lang.Boolean(false)}%B" -> "FALSE", + f"${new java.lang.Boolean(true)}%B" -> "TRUE", + + f"${"true"}%b" -> "true", + f"${"false"}%b"-> "false", + + // 'h' | 'H' (category: general) + // ----------------------------- + f"${null}%h" -> "null", + f"${f_zero}%h" -> "0", + f"${f_zero_-}%h" -> "80000000", + f"${s}%h" -> "4c01926", + + f"${null}%H" -> "NULL", + f"${s}%H" -> "4C01926", + + // 's' | 'S' (category: general) + // ----------------------------- + f"${null}%s" -> "null", + f"${null}%S" -> "NULL", + f"${s}%s" -> "Scala", + f"${s}%S" -> "SCALA", + f"${5}" -> "5", + f"${i}" -> "42", + f"${'foo}" -> "'foo", + + f"${Thread.State.NEW}" -> "NEW", + + // 'c' | 'C' (category: character) + // ------------------------------- + f"${120:Char}%c" -> "x", + f"${120:Byte}%c" -> "x", + f"${120:Short}%c" -> "x", + f"${120:Int}%c" -> "x", + f"${new java.lang.Character('x')}%c" -> "x", + f"${new java.lang.Byte(120:Byte)}%c" -> "x", + f"${new java.lang.Short(120:Short)}%c" -> "x", + f"${new java.lang.Integer(120)}%c" -> "x", + + f"${'x' : java.lang.Character}%c" -> "x", + f"${(120:Byte) : java.lang.Byte}%c" -> "x", + f"${(120:Short) : java.lang.Short}%c" -> "x", + f"${120 : java.lang.Integer}%c" -> "x", + + f"${"Scala"}%c" -> "S", + + // 'd' | 'o' | 'x' | 'X' (category: integral) + // ------------------------------------------ + f"${120:Byte}%d" -> "120", + f"${120:Short}%d" -> "120", + f"${120:Int}%d" -> "120", + f"${120:Long}%d" -> "120", + f"${60 * 2}%d" -> "120", + f"${new java.lang.Byte(120:Byte)}%d" -> "120", + f"${new java.lang.Short(120:Short)}%d" -> "120", + f"${new java.lang.Integer(120)}%d" -> "120", + f"${new java.lang.Long(120)}%d" -> "120", + f"${120 : java.lang.Integer}%d" -> "120", + f"${120 : java.lang.Long}%d" -> "120", + f"${BigInt(120)}%d" -> "120", + + f"${new java.math.BigInteger("120")}%d" -> "120", + + f"${4}%#10X" -> " 0X4", + + f"She is ${fff}%#s feet tall." -> "She is 4 feet tall.", + + f"Just want to say ${"hello, world"}%#s..." -> "Just want to say hello, world...", + + { implicit val strToShort = (s: String) => java.lang.Short.parseShort(s) ; f"${"120"}%d" } -> "120", + { implicit val strToInt = (s: String) => 42 ; f"${"120"}%d" } -> "42", + + // 'e' | 'E' | 'g' | 'G' | 'f' | 'a' | 'A' (category: floating point) + // ------------------------------------------------------------------ + f"${3.4f}%e" -> locally"3.400000e+00", + f"${3.4}%e" -> locally"3.400000e+00", + f"${3.4f : java.lang.Float}%e" -> locally"3.400000e+00", + f"${3.4 : java.lang.Double}%e" -> locally"3.400000e+00", + + f"${BigDecimal(3.4)}%e" -> locally"3.400000e+00", + + f"${new java.math.BigDecimal(3.4)}%e" -> locally"3.400000e+00", + + f"${3}%e" -> locally"3.000000e+00", + f"${3L}%e" -> locally"3.000000e+00", + + // 't' | 'T' (category: date/time) + // ------------------------------- + f"${c}%TD" -> "05/26/12", + f"${c.getTime}%TD" -> "05/26/12", + f"${c.getTime.getTime}%TD" -> "05/26/12", + f"""${"1234"}%TD""" -> "05/26/12", + + // literals and arg indexes + f"%%" -> "%", + f" mind%n------%nmatter" -> + """| mind + |------ + |matter""".stripMargin.lines.mkString(compat.Platform.EOL), + f"${i}%d %<d ${9}%d" -> "42 42 9", + f"${7}%d %<d ${9}%d" -> "7 7 9", + f"${7}%d %2$$d ${9}%d" -> "7 9 9", + + f"${null}%d %<B" -> "null FALSE", + + f"${5: Any}" -> "5", + f"${5}%s%<d" -> "55", + f"${3.14}%s,%<f" -> locally"3.14,${"3.140000"}", + + f"z" -> "z" + ) + + for ((f, s) <- ss) assertEquals(s, f) + } } diff --git a/test/junit/scala/collection/IteratorTest.scala b/test/junit/scala/collection/IteratorTest.scala index 329c85127a..4df29e36c0 100644 --- a/test/junit/scala/collection/IteratorTest.scala +++ b/test/junit/scala/collection/IteratorTest.scala @@ -135,6 +135,20 @@ class IteratorTest { assertEquals(3, List(1, 2, 3, 4, 5).iterator.indexWhere { x: Int => x >= 4 }) assertEquals(-1, List(1, 2, 3, 4, 5).iterator.indexWhere { x: Int => x >= 16 }) } + @Test def indexOfFrom(): Unit = { + assertEquals(1, List(1, 2, 3, 4, 5).iterator.indexOf(2, 0)) + assertEquals(1, List(1, 2, 3, 4, 5).iterator.indexOf(2, 1)) + assertEquals(-1, List(1, 2, 3, 4, 5).iterator.indexOf(2, 2)) + assertEquals(4, List(1, 2, 3, 2, 1).iterator.indexOf(1, 1)) + assertEquals(1, List(1, 2, 3, 2, 1).iterator.indexOf(2, 1)) + } + @Test def indexWhereFrom(): Unit = { + assertEquals(1, List(1, 2, 3, 4, 5).iterator.indexWhere(_ == 2, 0)) + assertEquals(1, List(1, 2, 3, 4, 5).iterator.indexWhere(_ == 2, 1)) + assertEquals(-1, List(1, 2, 3, 4, 5).iterator.indexWhere(_ == 2, 2)) + assertEquals(4, List(1, 2, 3, 2, 1).iterator.indexWhere(_ < 2, 1)) + assertEquals(1, List(1, 2, 3, 2, 1).iterator.indexWhere(_ <= 2, 1)) + } // iterator-iterate-lazy.scala // was java.lang.UnsupportedOperationException: tail of empty list @Test def iterateIsSufficientlyLazy(): Unit = { @@ -154,6 +168,14 @@ class IteratorTest { results += (Stream from 1).toIterator.drop(10).toStream.drop(10).toIterator.next() assertSameElements(List(1,1,21), results) } + // SI-8552 + @Test def indexOfShouldWorkForTwoParams(): Unit = { + assertEquals(1, List(1, 2, 3).iterator.indexOf(2, 0)) + assertEquals(-1, List(5 -> 0).iterator.indexOf(5, 0)) + assertEquals(0, List(5 -> 0).iterator.indexOf((5, 0))) + assertEquals(-1, List(5 -> 0, 9 -> 2, 0 -> 3).iterator.indexOf(9, 2)) + assertEquals(1, List(5 -> 0, 9 -> 2, 0 -> 3).iterator.indexOf(9 -> 2)) + } // SI-9332 @Test def spanExhaustsLeadingIterator(): Unit = { def it = Iterator.iterate(0)(_ + 1).take(6) diff --git a/test/junit/scala/collection/ReusableBuildersTest.scala b/test/junit/scala/collection/ReusableBuildersTest.scala new file mode 100644 index 0000000000..8dd1a37adf --- /dev/null +++ b/test/junit/scala/collection/ReusableBuildersTest.scala @@ -0,0 +1,48 @@ +package scala.collection + +import org.junit.runner.RunWith +import org.junit.runners.JUnit4 +import org.junit.Test + +/* Tests various maps by making sure they all agree on the same answers. */ +@RunWith(classOf[JUnit4]) +class ReusableBuildersTest { + // GrowingBuilders are NOT reusable but can clear themselves + @Test + def test_SI8648() { + val b = collection.mutable.HashSet.newBuilder[Int] + b += 3 + b.clear + assert(!b.isInstanceOf[collection.mutable.ReusableBuilder[_,_]]) + assert(b.isInstanceOf[collection.mutable.GrowingBuilder[_,_]]) + assert(b.result == Set[Int]()) + } + + // ArrayBuilders ARE reusable, regardless of whether they returned their internal array or not + @Test + def test_SI9564() { + val b = Array.newBuilder[Float] + b += 3f + val three = b.result + b.clear + b ++= (1 to 16).map(_.toFloat) + val sixteen = b.result + b.clear + b += 0f + val zero = b.result + assert(b.isInstanceOf[collection.mutable.ReusableBuilder[_,_]]) + assert(three.toList == 3 :: Nil) + assert(sixteen.toList == (1 to 16)) + assert(zero.toList == 0 :: Nil) + } + + @Test + def test_reusability() { + val bl = List.newBuilder[String] + val bv = Vector.newBuilder[String] + val ba = collection.mutable.ArrayBuffer.newBuilder[String] + assert(bl.isInstanceOf[collection.mutable.ReusableBuilder[_, _]]) + assert(bv.isInstanceOf[collection.mutable.ReusableBuilder[_, _]]) + assert(!ba.isInstanceOf[collection.mutable.ReusableBuilder[_, _]]) + } +} diff --git a/test/junit/scala/collection/SeqViewTest.scala b/test/junit/scala/collection/SeqViewTest.scala new file mode 100644 index 0000000000..24474fc4b9 --- /dev/null +++ b/test/junit/scala/collection/SeqViewTest.scala @@ -0,0 +1,16 @@ +package scala.collection + +import org.junit.runner.RunWith +import org.junit.runners.JUnit4 +import org.junit.Assert._ +import org.junit.Test + +@RunWith(classOf[JUnit4]) +class SeqViewTest { + + @Test + def test_SI8691() { + // Really just testing to make sure ++: doesn't throw an exception + assert( Seq(1,2) ++: Seq(3,4).view == Seq(1,2,3,4) ) + } +} diff --git a/test/junit/scala/collection/SetMapConsistencyTest.scala b/test/junit/scala/collection/SetMapConsistencyTest.scala index 261c11a98b..eb864a8449 100644 --- a/test/junit/scala/collection/SetMapConsistencyTest.scala +++ b/test/junit/scala/collection/SetMapConsistencyTest.scala @@ -66,6 +66,8 @@ class SetMapConsistencyTest { def boxMhm[A] = new BoxMutableMap[A, cm.HashMap[A, Int]](new cm.HashMap[A, Int], "mutable.HashMap") def boxMohm[A] = new BoxMutableMap[A, cm.OpenHashMap[A, Int]](new cm.OpenHashMap[A, Int], "mutable.OpenHashMap") + + def boxMtm[A: Ordering] = new BoxMutableMap[A, cm.TreeMap[A, Int]](new cm.TreeMap[A, Int], "mutable.TreeMap") def boxMarm[A <: AnyRef] = new BoxMutableMap[A, cm.AnyRefMap[A, Int]](new cm.AnyRefMap[A, Int](_ => -1), "mutable.AnyRefMap") { private def arm: cm.AnyRefMap[A, Int] = m.asInstanceOf[cm.AnyRefMap[A, Int]] @@ -188,7 +190,9 @@ class SetMapConsistencyTest { def boxMbs = new BoxMutableSet[Int, cm.BitSet](new cm.BitSet, "mutable.BitSet") def boxMhs[A] = new BoxMutableSet[A, cm.HashSet[A]](new cm.HashSet[A], "mutable.HashSet") - + + def boxMts[A: Ordering] = new BoxMutableSet[A, cm.TreeSet[A]](new cm.TreeSet[A], "mutable.TreeSet") + def boxJavaS[A] = new BoxMutableSet[A, cm.Set[A]]((new java.util.HashSet[A]).asScala, "java.util.HashSet") { override def adders = 3 override def subbers = 1 @@ -315,7 +319,7 @@ class SetMapConsistencyTest { @Test def churnIntMaps() { val maps = Array[() => MapBox[Int]]( - () => boxMlm[Int], () => boxMhm[Int], () => boxMohm[Int], () => boxJavaM[Int], + () => boxMlm[Int], () => boxMhm[Int], () => boxMohm[Int], () => boxMtm[Int], () => boxJavaM[Int], () => boxIim, () => boxIhm[Int], () => boxIlm[Int], () => boxItm[Int] ) assert( maps.sliding(2).forall{ ms => churn(ms(0)(), ms(1)(), intKeys, 2000) } ) @@ -325,7 +329,7 @@ class SetMapConsistencyTest { def churnLongMaps() { val maps = Array[() => MapBox[Long]]( () => boxMjm, () => boxIjm, () => boxJavaM[Long], - () => boxMlm[Long], () => boxMhm[Long], () => boxMohm[Long], () => boxIhm[Long], () => boxIlm[Long] + () => boxMlm[Long], () => boxMhm[Long], () => boxMtm[Long], () => boxMohm[Long], () => boxIhm[Long], () => boxIlm[Long] ) assert( maps.sliding(2).forall{ ms => churn(ms(0)(), ms(1)(), longKeys, 10000) } ) } @@ -352,7 +356,7 @@ class SetMapConsistencyTest { def churnIntSets() { val sets = Array[() => MapBox[Int]]( () => boxMhm[Int], () => boxIhm[Int], () => boxJavaS[Int], - () => boxMbs, () => boxMhs[Int], () => boxIbs, () => boxIhs[Int], () => boxIls[Int], () => boxIts[Int] + () => boxMbs, () => boxMhs[Int], () => boxMts[Int], () => boxIbs, () => boxIhs[Int], () => boxIls[Int], () => boxIts[Int] ) assert( sets.sliding(2).forall{ ms => churn(ms(0)(), ms(1)(), smallKeys, 1000, valuer = _ => 0) } ) } @@ -529,4 +533,15 @@ class SetMapConsistencyTest { assert(nit == 4) assert(nfe == 4) } + + @Test + def test_SI8727() { + import scala.tools.testing.AssertUtil._ + type NSEE = NoSuchElementException + val map = Map(0 -> "zero", 1 -> "one") + val m = map.filterKeys(i => if (map contains i) true else throw new NSEE) + assert{ (m contains 0) && (m get 0).nonEmpty } + assertThrows[NSEE]{ m contains 2 } + assertThrows[NSEE]{ m get 2 } + } } diff --git a/test/junit/scala/collection/convert/NullSafetyTest.scala b/test/junit/scala/collection/convert/NullSafetyTest.scala new file mode 100644 index 0000000000..de5481d9e2 --- /dev/null +++ b/test/junit/scala/collection/convert/NullSafetyTest.scala @@ -0,0 +1,279 @@ +package scala.collection.convert + +import java.{util => ju, lang => jl} +import ju.{concurrent => juc} + +import org.junit.Test +import org.junit.experimental.runners.Enclosed +import org.junit.runner.RunWith + +import scala.collection.JavaConversions._ +import scala.collection.JavaConverters._ +import scala.collection.{mutable, concurrent} + +@RunWith(classOf[Enclosed]) +object NullSafetyTest { + + /* + * Pertinent: SI-9113 + * Tests to insure that wrappers return null instead of wrapping it as a collection + */ + + class ToScala { + + @Test def testIteratorWrapping(): Unit = { + val nullJIterator: ju.Iterator[AnyRef] = null + val iterator: Iterator[AnyRef] = nullJIterator + + assert(iterator == null) + } + + @Test def testEnumerationWrapping(): Unit = { + val nullJEnumeration: ju.Enumeration[AnyRef] = null + val enumeration: Iterator[AnyRef] = nullJEnumeration + + assert(enumeration == null) + } + + @Test def testIterableWrapping(): Unit = { + val nullJIterable: jl.Iterable[AnyRef] = null + val iterable: Iterable[AnyRef] = nullJIterable + + assert(iterable == null) + } + + @Test def testCollectionWrapping(): Unit = { + val nullJCollection: ju.Collection[AnyRef] = null + val collection: Iterable[AnyRef] = nullJCollection + + assert(collection == null) + } + + @Test def testBufferWrapping(): Unit = { + val nullJList: ju.List[AnyRef] = null + val buffer: mutable.Buffer[AnyRef] = nullJList + + assert(buffer == null) + } + + @Test def testSetWrapping(): Unit = { + val nullJSet: ju.Set[AnyRef] = null + val set: mutable.Set[AnyRef] = nullJSet + + assert(set == null) + } + + @Test def testMapWrapping(): Unit = { + val nullJMap: ju.Map[AnyRef, AnyRef] = null + val map: mutable.Map[AnyRef, AnyRef] = nullJMap + + assert(map == null) + } + + @Test def testConcurrentMapWrapping(): Unit = { + val nullJConMap: juc.ConcurrentMap[AnyRef, AnyRef] = null + val conMap: concurrent.Map[AnyRef, AnyRef] = nullJConMap + + assert(conMap == null) + } + + @Test def testDictionaryWrapping(): Unit = { + val nullJDict: ju.Dictionary[AnyRef, AnyRef] = null + val dict: mutable.Map[AnyRef, AnyRef] = nullJDict + + assert(dict == null) + } + + + @Test def testPropertyWrapping(): Unit = { + val nullJProps: ju.Properties = null + val props: mutable.Map[String, String] = nullJProps + + assert(props == null) + } + + @Test def testIteratorDecoration(): Unit = { + val nullJIterator: ju.Iterator[AnyRef] = null + + assert(nullJIterator.asScala == null) + } + + @Test def testEnumerationDecoration(): Unit = { + val nullJEnumeration: ju.Enumeration[AnyRef] = null + + assert(nullJEnumeration.asScala == null) + } + + @Test def testIterableDecoration(): Unit = { + val nullJIterable: jl.Iterable[AnyRef] = null + + assert(nullJIterable.asScala == null) + } + + @Test def testCollectionDecoration(): Unit = { + val nullJCollection: ju.Collection[AnyRef] = null + + assert(nullJCollection.asScala == null) + } + + @Test def testBufferDecoration(): Unit = { + val nullJBuffer: ju.List[AnyRef] = null + + assert(nullJBuffer.asScala == null) + } + + @Test def testSetDecoration(): Unit = { + val nullJSet: ju.Set[AnyRef] = null + + assert(nullJSet.asScala == null) + } + + @Test def testMapDecoration(): Unit = { + val nullJMap: ju.Map[AnyRef, AnyRef] = null + + assert(nullJMap.asScala == null) + } + + @Test def testConcurrentMapDecoration(): Unit = { + val nullJConMap: juc.ConcurrentMap[AnyRef, AnyRef] = null + + assert(nullJConMap.asScala == null) + } + + @Test def testDictionaryDecoration(): Unit = { + val nullJDict: ju.Dictionary[AnyRef, AnyRef] = null + + assert(nullJDict.asScala == null) + } + + @Test def testPropertiesDecoration(): Unit = { + val nullJProperties: ju.Properties = null + + assert(nullJProperties.asScala == null) + } + } + + class ToJava { + + @Test def testIteratorWrapping(): Unit = { + val nullIterator: Iterator[AnyRef] = null + val jIterator: ju.Iterator[AnyRef] = nullIterator + + assert(jIterator == null) + } + + @Test def testEnumerationWrapping(): Unit = { + val nullEnumeration: Iterator[AnyRef] = null + val enumeration: ju.Iterator[AnyRef] = nullEnumeration + + assert(enumeration == null) + } + + @Test def testIterableWrapping(): Unit = { + val nullIterable: Iterable[AnyRef] = null + val iterable: jl.Iterable[AnyRef] = asJavaIterable(nullIterable) + + assert(iterable == null) + } + + @Test def testCollectionWrapping(): Unit = { + val nullCollection: Iterable[AnyRef] = null + val collection: ju.Collection[AnyRef] = nullCollection + + assert(collection == null) + } + + @Test def testBufferWrapping(): Unit = { + val nullList: mutable.Buffer[AnyRef] = null + val buffer: ju.List[AnyRef] = nullList + + assert(buffer == null) + } + + @Test def testSetWrapping(): Unit = { + val nullSet: mutable.Set[AnyRef] = null + val set: ju.Set[AnyRef] = nullSet + + assert(set == null) + } + + @Test def testMapWrapping(): Unit = { + val nullMap: mutable.Map[AnyRef, AnyRef] = null + val map: ju.Map[AnyRef, AnyRef] = nullMap + + assert(map == null) + } + + @Test def testConcurrentMapWrapping(): Unit = { + val nullConMap: concurrent.Map[AnyRef, AnyRef] = null + val conMap: juc.ConcurrentMap[AnyRef, AnyRef] = nullConMap + + assert(conMap == null) + } + + @Test def testDictionaryWrapping(): Unit = { + val nullDict: mutable.Map[AnyRef, AnyRef] = null + val dict: ju.Dictionary[AnyRef, AnyRef] = nullDict + + assert(dict == null) + } + + // Implicit conversion to ju.Properties is not available + + @Test def testIteratorDecoration(): Unit = { + val nullIterator: Iterator[AnyRef] = null + + assert(nullIterator.asJava == null) + } + + @Test def testEnumerationDecoration(): Unit = { + val nullEnumeration: Iterator[AnyRef] = null + + assert(nullEnumeration.asJavaEnumeration == null) + } + + @Test def testIterableDecoration(): Unit = { + val nullIterable: Iterable[AnyRef] = null + + assert(nullIterable.asJava == null) + } + + @Test def testCollectionDecoration(): Unit = { + val nullCollection: Iterable[AnyRef] = null + + assert(nullCollection.asJavaCollection == null) + } + + @Test def testBufferDecoration(): Unit = { + val nullBuffer: mutable.Buffer[AnyRef] = null + + assert(nullBuffer.asJava == null) + } + + @Test def testSetDecoration(): Unit = { + val nullSet: Set[AnyRef] = null + + assert(nullSet.asJava == null) + } + + @Test def testMapDecoration(): Unit = { + val nullMap: mutable.Map[AnyRef, AnyRef] = null + + assert(nullMap.asJava == null) + } + + @Test def testConcurrentMapDecoration(): Unit = { + val nullConMap: concurrent.Map[AnyRef, AnyRef] = null + + assert(nullConMap.asJava == null) + } + + @Test def testDictionaryDecoration(): Unit = { + val nullDict: mutable.Map[AnyRef, AnyRef] = null + + assert(nullDict.asJavaDictionary == null) + } + + // Decorator conversion to ju.Properties is not available + } +} diff --git a/test/junit/scala/collection/convert/WrapperSerializationTest.scala b/test/junit/scala/collection/convert/WrapperSerializationTest.scala new file mode 100644 index 0000000000..d398be806a --- /dev/null +++ b/test/junit/scala/collection/convert/WrapperSerializationTest.scala @@ -0,0 +1,29 @@ +package scala.collection.convert + +import org.junit.Assert._ +import org.junit.Test +import org.junit.runner.RunWith +import org.junit.runners.JUnit4 + +@RunWith(classOf[JUnit4]) +class WrapperSerializationTest { + def ser(a: AnyRef) = { + val baos = new java.io.ByteArrayOutputStream + (new java.io.ObjectOutputStream(baos)).writeObject(a) + baos + } + def des(baos: java.io.ByteArrayOutputStream): AnyRef = { + val bais = new java.io.ByteArrayInputStream(baos.toByteArray) + (new java.io.ObjectInputStream(bais)).readObject() + } + def serdes(a: AnyRef): Boolean = a == des(ser(a)) + + @Test + def test_SI8911() { + import scala.collection.JavaConverters._ + assert( serdes(scala.collection.mutable.ArrayBuffer(1,2).asJava) ) + assert( serdes(Seq(1,2).asJava) ) + assert( serdes(Set(1,2).asJava) ) + assert( serdes(Map(1 -> "one", 2 -> "two").asJava) ) + } +} diff --git a/test/junit/scala/collection/immutable/SetTests.scala b/test/junit/scala/collection/immutable/SetTest.scala index 28c7864359..4029c98009 100644 --- a/test/junit/scala/collection/immutable/SetTests.scala +++ b/test/junit/scala/collection/immutable/SetTest.scala @@ -6,7 +6,7 @@ import org.junit.runner.RunWith import org.junit.runners.JUnit4 @RunWith(classOf[JUnit4]) -class SetTests { +class SetTest { @Test def test_SI8346_toSet_soundness(): Unit = { val any2stringadd = "Disabled string conversions so as not to get confused!" diff --git a/test/junit/scala/collection/immutable/StreamTest.scala b/test/junit/scala/collection/immutable/StreamTest.scala new file mode 100644 index 0000000000..1b257aabc4 --- /dev/null +++ b/test/junit/scala/collection/immutable/StreamTest.scala @@ -0,0 +1,126 @@ +package scala.collection.immutable + +import org.junit.runner.RunWith +import org.junit.runners.JUnit4 +import org.junit.Test +import org.junit.Assert._ + +import scala.ref.WeakReference +import scala.util.Try + +@RunWith(classOf[JUnit4]) +class StreamTest { + + @Test + def t6727_and_t6440_and_8627(): Unit = { + assertTrue(Stream.continually(()).filter(_ => true).take(2) == Seq((), ())) + assertTrue(Stream.continually(()).filterNot(_ => false).take(2) == Seq((), ())) + assertTrue(Stream(1,2,3,4,5).filter(_ < 4) == Seq(1,2,3)) + assertTrue(Stream(1,2,3,4,5).filterNot(_ > 4) == Seq(1,2,3,4)) + assertTrue(Stream.from(1).filter(_ > 4).take(3) == Seq(5,6,7)) + assertTrue(Stream.from(1).filterNot(_ <= 4).take(3) == Seq(5,6,7)) + } + + /** Test helper to verify that the given Stream operation allows + * GC of the head during processing of the tail. + */ + def assertStreamOpAllowsGC(op: (=> Stream[Int], Int => Unit) => Any, f: Int => Unit): Unit = { + val msgSuccessGC = "GC success" + val msgFailureGC = "GC failure" + + // A stream of 500 elements at most. We will test that the head can be collected + // while processing the tail. After each element we will GC and wait 10 ms, so a + // failure to collect will take roughly 5 seconds. + val ref = WeakReference( Stream.from(1).take(500) ) + + def gcAndThrowIfCollected(n: Int): Unit = { + System.gc() // try to GC + Thread.sleep(10) // give it 10 ms + if (ref.get.isEmpty) throw new RuntimeException(msgSuccessGC) // we're done if head collected + f(n) + } + + val res = Try { op(ref(), gcAndThrowIfCollected) }.failed // success is indicated by an + val msg = res.map(_.getMessage).getOrElse(msgFailureGC) // exception with expected message + // failure is indicated by no + assertTrue(msg == msgSuccessGC) // exception, or one with different message + } + + @Test + def foreach_allows_GC() { + assertStreamOpAllowsGC(_.foreach(_), _ => ()) + } + + @Test + def filter_all_foreach_allows_GC() { + assertStreamOpAllowsGC(_.filter(_ => true).foreach(_), _ => ()) + } + + @Test // SI-8990 + def withFilter_after_first_foreach_allows_GC: Unit = { + assertStreamOpAllowsGC(_.withFilter(_ > 1).foreach(_), _ => ()) + } + + @Test // SI-8990 + def withFilter_after_first_withFilter_foreach_allows_GC: Unit = { + assertStreamOpAllowsGC(_.withFilter(_ > 1).withFilter(_ < 100).foreach(_), _ => ()) + } + + @Test // SI-8990 + def withFilter_can_retry_after_exception_thrown_in_filter: Unit = { + // use mutable state to control an intermittent failure in filtering the Stream + var shouldThrow = true + + val wf = Stream.from(1).take(10).withFilter { n => + if (shouldThrow && n == 5) throw new RuntimeException("n == 5") else n > 5 + } + + assertTrue( Try { wf.map(identity) }.isFailure ) // throws on n == 5 + + shouldThrow = false // won't throw next time + + assertTrue( wf.map(identity).length == 5 ) // success instead of NPE + } + + /** Test helper to verify that the given Stream operation is properly lazy in the tail */ + def assertStreamOpLazyInTail(op: (=> Stream[Int]) => Stream[Int], expectedEvaluated: List[Int]): Unit = { + // mutable state to record every strict evaluation + var evaluated: List[Int] = Nil + + def trackEffectsOnNaturals: Stream[Int] = { + def loop(i: Int): Stream[Int] = { evaluated ++= List(i); i #:: loop(i + 1) } + loop(1) + } + + // call op on a stream which records every strict evaluation + val result = op(trackEffectsOnNaturals) + + assertTrue( evaluated == expectedEvaluated ) + } + + @Test // SI-9134 + def filter_map_properly_lazy_in_tail: Unit = { + assertStreamOpLazyInTail(_.filter(_ % 2 == 0).map(identity), List(1, 2)) + } + + @Test // SI-9134 + def withFilter_map_properly_lazy_in_tail: Unit = { + assertStreamOpLazyInTail(_.withFilter(_ % 2 == 0).map(identity), List(1, 2)) + } + + @Test + def test_si9379() { + class Boom { + private var i = -1 + def inc = { + i += 1 + if (i > 1000) throw new NoSuchElementException("Boom! Too many elements!") + i + } + } + val b = new Boom + val s = Stream.continually(b.inc) + // zipped.toString must allow s to short-circuit evaluation + assertTrue((s, s).zipped.toString contains s.toString) + } +} diff --git a/test/junit/scala/collection/immutable/StringLikeTest.scala b/test/junit/scala/collection/immutable/StringLikeTest.scala index 3722bdfe4d..50be638b89 100644 --- a/test/junit/scala/collection/immutable/StringLikeTest.scala +++ b/test/junit/scala/collection/immutable/StringLikeTest.scala @@ -28,10 +28,16 @@ class StringLikeTest { @Test def testSplitEdgeCases: Unit = { + val high = 0xD852.toChar + val low = 0xDF62.toChar + val surrogatepair = List(high, low).mkString + val twopairs = surrogatepair + "_" + surrogatepair + AssertUtil.assertSameElements("abcd".split('d'), Array("abc")) // not Array("abc", "") AssertUtil.assertSameElements("abccc".split('c'), Array("ab")) // not Array("ab", "", "", "") AssertUtil.assertSameElements("xxx".split('x'), Array[String]()) // not Array("", "", "", "") AssertUtil.assertSameElements("".split('x'), Array("")) // not Array() AssertUtil.assertSameElements("--ch--omp--".split("-"), Array("", "", "ch", "", "omp")) // All the cases! + AssertUtil.assertSameElements(twopairs.split(high), Array(twopairs)) //don't split on characters that are half a surrogate pair } } diff --git a/test/junit/scala/collection/mutable/BitSetTest.scala b/test/junit/scala/collection/mutable/BitSetTest.scala index d56cc45601..e832194989 100644 --- a/test/junit/scala/collection/mutable/BitSetTest.scala +++ b/test/junit/scala/collection/mutable/BitSetTest.scala @@ -28,4 +28,11 @@ class BitSetTest { littleBitSet &= bigBitSet assert(littleBitSet.toBitMask.length < bigBitSet.toBitMask.length, "Needlessly extended the size of bitset on &=") } + + @Test def test_SI8647() { + val bs = BitSet() + bs.map(_ + 1) // Just needs to compile + val xs = bs: SortedSet[Int] + xs.map(_ + 1) // Also should compile (did before) + } } diff --git a/test/junit/scala/collection/mutable/OpenHashMapTest.scala b/test/junit/scala/collection/mutable/OpenHashMapTest.scala index 1459c14d78..9b5c20e01a 100644 --- a/test/junit/scala/collection/mutable/OpenHashMapTest.scala +++ b/test/junit/scala/collection/mutable/OpenHashMapTest.scala @@ -28,7 +28,7 @@ class OpenHashMapTest { val fieldMirror = mirror.reflect(m).reflectField(termSym) */ // Use Java reflection instead for now. - val field = m.getClass.getDeclaredField("scala$collection$mutable$OpenHashMap$$deleted") + val field = m.getClass.getDeclaredField("deleted") field.setAccessible(true) m.put(0, 0) diff --git a/test/junit/scala/io/SourceTest.scala b/test/junit/scala/io/SourceTest.scala index 3138a4589c..3fe48940a0 100644 --- a/test/junit/scala/io/SourceTest.scala +++ b/test/junit/scala/io/SourceTest.scala @@ -28,6 +28,10 @@ class SourceTest { @Test def canIterateLines() = { assertEquals(sampler.lines.size, (Source fromString sampler).getLines.size) } + @Test def loadFromResource() = { + val res = Source.fromResource("rootdoc.txt") + assertTrue("No classpath resource found", res.getLines().size > 5) + } @Test def canCustomizeReporting() = { class CapitalReporting(is: InputStream) extends BufferedSource(is) { override def report(pos: Int, msg: String, out: PrintStream): Unit = { diff --git a/test/junit/scala/issues/BytecodeTest.scala b/test/junit/scala/issues/BytecodeTest.scala new file mode 100644 index 0000000000..cf5c7f9ec3 --- /dev/null +++ b/test/junit/scala/issues/BytecodeTest.scala @@ -0,0 +1,478 @@ +package scala.issues + +import org.junit.runner.RunWith +import org.junit.runners.JUnit4 +import org.junit.Test + +import scala.tools.asm.Opcodes._ +import scala.tools.nsc.backend.jvm.AsmUtils +import scala.tools.nsc.backend.jvm.CodeGenTools._ +import org.junit.Assert._ + +import scala.collection.JavaConverters._ +import scala.tools.asm.Opcodes +import scala.tools.asm.tree.ClassNode +import scala.tools.partest.ASMConverters._ +import scala.tools.testing.ClearAfterClass + +object BytecodeTest extends ClearAfterClass.Clearable { + var compiler = newCompiler() + def clear(): Unit = { compiler = null } +} + +@RunWith(classOf[JUnit4]) +class BytecodeTest extends ClearAfterClass { + ClearAfterClass.stateToClear = BytecodeTest + val compiler = BytecodeTest.compiler + + @Test + def t8731(): Unit = { + val code = + """class C { + | def f(x: Int) = (x: @annotation.switch) match { + | case 1 => 0 + | case 2 => 1 + | case 3 => 2 + | } + | final val K = 10 + | def g(x: Int) = (x: @annotation.switch) match { + | case K => 0 + | case 1 => 10 + | case 2 => 20 + | } + |} + """.stripMargin + + val List(c) = compileClasses(compiler)(code) + + assertTrue(getSingleMethod(c, "f").instructions.count(_.isInstanceOf[TableSwitch]) == 1) + assertTrue(getSingleMethod(c, "g").instructions.count(_.isInstanceOf[LookupSwitch]) == 1) + } + + @Test + def t8926(): Unit = { + import scala.reflect.internal.util.BatchSourceFile + + // this test cannot be implemented using partest because of its mixed-mode compilation strategy: + // partest first compiles all files with scalac, then the java files, and then again the scala + // using the output classpath. this shadows the bug SI-8926. + + val annotA = + """import java.lang.annotation.Retention; + |import java.lang.annotation.RetentionPolicy; + |@Retention(RetentionPolicy.RUNTIME) + |public @interface AnnotA { } + """.stripMargin + val annotB = "public @interface AnnotB { }" + + val scalaSrc = + """@AnnotA class A + |@AnnotB class B + """.stripMargin + + val run = new compiler.Run() + run.compileSources(List(new BatchSourceFile("AnnotA.java", annotA), new BatchSourceFile("AnnotB.java", annotB), new BatchSourceFile("Test.scala", scalaSrc))) + val outDir = compiler.settings.outputDirs.getSingleOutput.get + val outfiles = (for (f <- outDir.iterator if !f.isDirectory) yield (f.name, f.toByteArray)).toList + + def check(classfile: String, annotName: String) = { + val f = (outfiles collect { case (`classfile`, bytes) => AsmUtils.readClass(bytes) }).head + val descs = f.visibleAnnotations.asScala.map(_.desc).toList + assertTrue(descs.toString, descs exists (_ contains annotName)) + } + + check("A.class", "AnnotA") + + // known issue SI-8928: the visibility of AnnotB should be CLASS, but annotation classes without + // a @Retention annotation are currently emitted as RUNTIME. + check("B.class", "AnnotB") + } + + @Test + def t6288bJumpPosition(): Unit = { + val code = + """object Case3 { // 01 + | def unapply(z: Any): Option[Int] = Some(-1) // 02 + | def main(args: Array[String]) { // 03 + | ("": Any) match { // 04 + | case x : String => // 05 + | println("case 0") // 06 println and jump at 6 + | case _ => // 07 + | println("default") // 08 println and jump at 8 + | } // 09 + | println("done") // 10 + | } + |} + """.stripMargin + val List(mirror, module) = compileClasses(compiler)(code) + + val unapplyLineNumbers = getSingleMethod(module, "unapply").instructions.filter(_.isInstanceOf[LineNumber]) + assert(unapplyLineNumbers == List(LineNumber(2, Label(0))), unapplyLineNumbers) + + val expected = List( + LineNumber(4, Label(0)), + LineNumber(5, Label(5)), + Jump(IFEQ, Label(20)), + + LineNumber(6, Label(11)), + Invoke(INVOKEVIRTUAL, "scala/Predef$", "println", "(Ljava/lang/Object;)V", false), + Jump(GOTO, Label(33)), + + LineNumber(5, Label(20)), + Jump(GOTO, Label(24)), + + LineNumber(8, Label(24)), + Invoke(INVOKEVIRTUAL, "scala/Predef$", "println", "(Ljava/lang/Object;)V", false), + Jump(GOTO, Label(33)), + + LineNumber(10, Label(33)), + Invoke(INVOKEVIRTUAL, "scala/Predef$", "println", "(Ljava/lang/Object;)V", false) + ) + + val mainIns = getSingleMethod(module, "main").instructions filter { + case _: LineNumber | _: Invoke | _: Jump => true + case _ => false + } + assertSameCode(mainIns, expected) + } + + @Test + def bytecodeForBranches(): Unit = { + val code = + """class C { + | def t1(b: Boolean) = if (b) 1 else 2 + | def t2(x: Int) = if (x == 393) 1 else 2 + | def t3(a: Array[String], b: AnyRef) = a != b && b == a + | def t4(a: AnyRef) = a == null || null != a + | def t5(a: AnyRef) = (a eq null) || (null ne a) + | def t6(a: Int, b: Boolean) = if ((a == 10) && b || a != 1) 1 else 2 + | def t7(a: AnyRef, b: AnyRef) = a == b + | def t8(a: AnyRef) = Nil == a || "" != a + |} + """.stripMargin + + val List(c) = compileClasses(compiler)(code) + + // t1: no unnecessary GOTOs + assertSameCode(getSingleMethod(c, "t1"), List( + VarOp(ILOAD, 1), Jump(IFEQ, Label(6)), + Op(ICONST_1), Jump(GOTO, Label(9)), + Label(6), Op(ICONST_2), + Label(9), Op(IRETURN))) + + // t2: no unnecessary GOTOs + assertSameCode(getSingleMethod(c, "t2"), List( + VarOp(ILOAD, 1), IntOp(SIPUSH, 393), Jump(IF_ICMPNE, Label(7)), + Op(ICONST_1), Jump(GOTO, Label(10)), + Label(7), Op(ICONST_2), + Label(10), Op(IRETURN))) + + // t3: Array == is translated to reference equality, AnyRef == to null checks and equals + assertSameCode(getSingleMethod(c, "t3"), List( + // Array == + VarOp(ALOAD, 1), VarOp(ALOAD, 2), Jump(IF_ACMPEQ, Label(23)), + // AnyRef == + VarOp(ALOAD, 2), VarOp(ALOAD, 1), VarOp(ASTORE, 3), Op(DUP), Jump(IFNONNULL, Label(14)), + Op(POP), VarOp(ALOAD, 3), Jump(IFNULL, Label(19)), Jump(GOTO, Label(23)), + Label(14), VarOp(ALOAD, 3), Invoke(INVOKEVIRTUAL, "java/lang/Object", "equals", "(Ljava/lang/Object;)Z", false), Jump(IFEQ, Label(23)), + Label(19), Op(ICONST_1), Jump(GOTO, Label(26)), + Label(23), Op(ICONST_0), + Label(26), Op(IRETURN))) + + val t4t5 = List( + VarOp(ALOAD, 1), Jump(IFNULL, Label(6)), + VarOp(ALOAD, 1), Jump(IFNULL, Label(10)), + Label(6), Op(ICONST_1), Jump(GOTO, Label(13)), + Label(10), Op(ICONST_0), + Label(13), Op(IRETURN)) + + // t4: one side is known null, so just a null check on the other + assertSameCode(getSingleMethod(c, "t4"), t4t5) + + // t5: one side known null, so just a null check on the other + assertSameCode(getSingleMethod(c, "t5"), t4t5) + + // t6: no unnecessary GOTOs + assertSameCode(getSingleMethod(c, "t6"), List( + VarOp(ILOAD, 1), IntOp(BIPUSH, 10), Jump(IF_ICMPNE, Label(7)), + VarOp(ILOAD, 2), Jump(IFNE, Label(12)), + Label(7), VarOp(ILOAD, 1), Op(ICONST_1), Jump(IF_ICMPEQ, Label(16)), + Label(12), Op(ICONST_1), Jump(GOTO, Label(19)), + Label(16), Op(ICONST_2), + Label(19), Op(IRETURN))) + + // t7: universal equality + assertInvoke(getSingleMethod(c, "t7"), "scala/runtime/BoxesRunTime", "equals") + + // t8: no null checks invoking equals on modules and constants + assertSameCode(getSingleMethod(c, "t8"), List( + Field(GETSTATIC, "scala/collection/immutable/Nil$", "MODULE$", "Lscala/collection/immutable/Nil$;"), VarOp(ALOAD, 1), Invoke(INVOKEVIRTUAL, "java/lang/Object", "equals", "(Ljava/lang/Object;)Z", false), Jump(IFNE, Label(10)), + Ldc(LDC, ""), VarOp(ALOAD, 1), Invoke(INVOKEVIRTUAL, "java/lang/Object", "equals", "(Ljava/lang/Object;)Z", false), Jump(IFNE, Label(14)), + Label(10), Op(ICONST_1), Jump(GOTO, Label(17)), + Label(14), Op(ICONST_0), + Label(17), Op(IRETURN))) + } + + object forwarderTestUtils { + def findMethods(cls: ClassNode, name: String): List[Method] = cls.methods.iterator.asScala.find(_.name == name).map(convertMethod).toList + + import language.implicitConversions + implicit def s2c(s: Symbol)(implicit classes: Map[String, ClassNode]): ClassNode = classes(s.name) + + def checkForwarder(c: ClassNode, target: String) = { + val List(f) = findMethods(c, "f") + assertSameCode(f, List(VarOp(ALOAD, 0), Invoke(INVOKESPECIAL, target, "f", "()I", false), Op(IRETURN))) + } + } + + @Test + def traitMethodForwarders(): Unit = { + import forwarderTestUtils._ + val code = + """trait T1 { def f = 1 } + |trait T2 extends T1 { override def f = 2 } + |trait T3 { self: T1 => override def f = 3 } + | + |abstract class A1 { def f: Int } + |class A2 { def f: Int = 4 } + | + |trait T4 extends A1 { def f = 5 } + |trait T5 extends A2 { override def f = 6 } + | + |trait T6 { def f: Int } + |trait T7 extends T6 { abstract override def f = super.f + 1 } + | + |trait T8 { override def clone() = super.clone() } + | + |class A3 extends T1 { override def f = 7 } + | + |class C1 extends T1 + |class C2 extends T2 + |class C3 extends T1 with T2 + |class C4 extends T2 with T1 + |class C5 extends T1 with T3 + | + |// traits extending a class that defines f + |class C6 extends T4 + |class C7 extends T5 + |class C8 extends A1 with T4 + |class C9 extends A2 with T5 + | + |// T6: abstract f in trait + |class C10 extends T6 with T1 + |class C11 extends T6 with T2 + |abstract class C12 extends A1 with T6 + |class C13 extends A2 with T6 + |class C14 extends T4 with T6 + |class C15 extends T5 with T6 + | + |// superclass overrides a trait method + |class C16 extends A3 + |class C17 extends A3 with T1 + | + |// abstract override + |class C18 extends T6 { def f = 22 } + |class C19 extends C18 with T7 + | + |class C20 extends T8 + """.stripMargin + + implicit val classes = compileClasses(compiler)(code).map(c => (c.name, c)).toMap + + val noForwarder = List('C1, 'C2, 'C3, 'C4, 'C10, 'C11, 'C12, 'C13, 'C16, 'C17) + for (c <- noForwarder) assertEquals(findMethods(c, "f"), Nil) + + checkForwarder('C5, "T3") + checkForwarder('C6, "T4") + checkForwarder('C7, "T5") + checkForwarder('C8, "T4") + checkForwarder('C9, "T5") + checkForwarder('C14, "T4") + checkForwarder('C15, "T5") + assertSameSummary(getSingleMethod('C18, "f"), List(BIPUSH, IRETURN)) + checkForwarder('C19, "T7") + assertSameCode(getSingleMethod('C19, "T7$$super$f"), List(VarOp(ALOAD, 0), Invoke(INVOKESPECIAL, "C18", "f", "()I", false), Op(IRETURN))) + assertInvoke(getSingleMethod('C20, "clone"), "T8", "clone") // mixin forwarder + } + + @Test + def noTraitMethodForwardersForOverloads(): Unit = { + import forwarderTestUtils._ + val code = + """trait T1 { def f(x: Int) = 0 } + |trait T2 { def f(x: String) = 1 } + |class C extends T1 with T2 + """.stripMargin + val List(c, t1, t2) = compileClasses(compiler)(code) + assertEquals(findMethods(c, "f"), Nil) + } + + @Test + def traitMethodForwardersForJavaDefaultMethods(): Unit = { + import forwarderTestUtils._ + val j1 = ("interface J1 { int f(); }", "J1.java") + val j2 = ("interface J2 { default int f() { return 1; } }", "J2.java") + val j3 = ("interface J3 extends J1 { default int f() { return 2; } }", "J3.java") + val j4 = ("interface J4 extends J2 { default int f() { return 3; } }", "J4.java") + val code = + """trait T1 extends J2 { override def f = 4 } + |trait T2 { self: J2 => override def f = 5 } + | + |class K1 extends J2 + |class K2 extends J1 with J2 + |class K3 extends J2 with J1 + | + |class K4 extends J3 + |class K5 extends J3 with J1 + |class K6 extends J1 with J3 + | + |class K7 extends J4 + |class K8 extends J4 with J2 + |class K9 extends J2 with J4 + | + |class K10 extends T1 with J2 + |class K11 extends J2 with T1 + | + |class K12 extends J2 with T2 + """.stripMargin + implicit val classes = compileClasses(compiler)(code, List(j1, j2, j3, j4)).map(c => (c.name, c)).toMap + + val noForwarder = List('K1, 'K2, 'K3, 'K4, 'K5, 'K6, 'K7, 'K8, 'K9, 'K10, 'K11) + for (c <- noForwarder) assertEquals(findMethods(c, "f"), Nil) + + checkForwarder('K12, "T2") + } + + @Test + def invocationReceivers(): Unit = { + val List(c1, c2, t, u) = compileClasses(compiler)(invocationReceiversTestCode.definitions("Object")) + // mixin forwarder in C1 + assertSameCode(getSingleMethod(c1, "clone"), List(VarOp(ALOAD, 0), Invoke(INVOKESPECIAL, "T", "clone", "()Ljava/lang/Object;", false), Op(ARETURN))) + assertInvoke(getSingleMethod(c1, "f1"), "T", "clone") + assertInvoke(getSingleMethod(c1, "f2"), "T", "clone") + assertInvoke(getSingleMethod(c1, "f3"), "C1", "clone") + assertInvoke(getSingleMethod(c2, "f1"), "T", "clone") + assertInvoke(getSingleMethod(c2, "f2"), "T", "clone") + assertInvoke(getSingleMethod(c2, "f3"), "C1", "clone") + + val List(c1b, c2b, tb, ub) = compileClasses(compiler)(invocationReceiversTestCode.definitions("String")) + def ms(c: ClassNode, n: String) = c.methods.asScala.toList.filter(_.name == n) + assert(ms(tb, "clone").length == 1) + assert(ms(ub, "clone").isEmpty) + val List(c1Clone) = ms(c1b, "clone") + assertEquals(c1Clone.desc, "()Ljava/lang/Object;") + assert((c1Clone.access | Opcodes.ACC_BRIDGE) != 0) + assertSameCode(convertMethod(c1Clone), List(VarOp(ALOAD, 0), Invoke(INVOKEVIRTUAL, "C1", "clone", "()Ljava/lang/String;", false), Op(ARETURN))) + + def iv(m: Method) = getSingleMethod(c1b, "f1").instructions.collect({case i: Invoke => i}) + assertSameCode(iv(getSingleMethod(c1b, "f1")), List(Invoke(INVOKEINTERFACE, "T", "clone", "()Ljava/lang/String;", true))) + assertSameCode(iv(getSingleMethod(c1b, "f2")), List(Invoke(INVOKEINTERFACE, "T", "clone", "()Ljava/lang/String;", true))) + // invokeinterface T.clone in C1 is OK here because it is not an override of Object.clone (different siganture) + assertSameCode(iv(getSingleMethod(c1b, "f3")), List(Invoke(INVOKEINTERFACE, "T", "clone", "()Ljava/lang/String;", true))) + } + + @Test + def invocationReceiversProtected(): Unit = { + // http://lrytz.github.io/scala-aladdin-bugtracker/displayItem.do%3Fid=455.html / 9954eaf + // also https://issues.scala-lang.org/browse/SI-1430 / 0bea2ab (same but with interfaces) + val aC = + """package a; + |/*package private*/ abstract class A { + | public int f() { return 1; } + | public int t; + |} + """.stripMargin + val bC = + """package a; + |public class B extends A { } + """.stripMargin + val iC = + """package a; + |/*package private*/ interface I { int f(); } + """.stripMargin + val jC = + """package a; + |public interface J extends I { } + """.stripMargin + val cC = + """package b + |class C { + | def f1(b: a.B) = b.f + | def f2(b: a.B) = { b.t = b.t + 1 } + | def f3(j: a.J) = j.f + |} + """.stripMargin + val List(c) = compileClasses(compiler)(cC, javaCode = List((aC, "A.java"), (bC, "B.java"), (iC, "I.java"), (jC, "J.java"))) + assertInvoke(getSingleMethod(c, "f1"), "a/B", "f") // receiver needs to be B (A is not accessible in class C, package b) + println(getSingleMethod(c, "f2").instructions.stringLines) + assertInvoke(getSingleMethod(c, "f3"), "a/J", "f") // receiver needs to be J + } + + @Test + def specialInvocationReceivers(): Unit = { + val code = + """class C { + | def f1(a: Array[String]) = a.clone() + | def f2(a: Array[Int]) = a.hashCode() + | def f3(n: Nothing) = n.hashCode() + | def f4(n: Null) = n.toString() + | + |} + """.stripMargin + val List(c) = compileClasses(compiler)(code) + assertInvoke(getSingleMethod(c, "f1"), "[Ljava/lang/String;", "clone") // array descriptor as receiver + assertInvoke(getSingleMethod(c, "f2"), "java/lang/Object", "hashCode") // object receiver + assertInvoke(getSingleMethod(c, "f3"), "java/lang/Object", "hashCode") + assertInvoke(getSingleMethod(c, "f4"), "java/lang/Object", "toString") + } +} + +object invocationReceiversTestCode { + // if cloneType is more specific than Object (e.g., String), a bridge method is generated. + def definitions(cloneType: String) = + s"""trait T { override def clone(): $cloneType = "hi" } + |trait U extends T + |class C1 extends U with Cloneable { + | // The comments below are true when $cloneType is Object. + | // C1 gets a forwarder for clone that invokes T.clone. this is needed because JVM method + | // resolution always prefers class members, so it would resolve to Object.clone, even if + | // C1 is a subtype of the interface T which has an overriding default method for clone. + | + | // invokeinterface T.clone + | def f1 = (this: T).clone() + | + | // cannot invokeinterface U.clone (NoSuchMethodError). Object.clone would work here, but + | // not in the example in C2 (illegal access to protected). T.clone works in all cases and + | // resolves correctly. + | def f2 = (this: U).clone() + | + | // invokevirtual C1.clone() + | def f3 = (this: C1).clone() + |} + | + |class C2 { + | def f1(t: T) = t.clone() // invokeinterface T.clone + | def f2(t: U) = t.clone() // invokeinterface T.clone -- Object.clone would be illegal (protected, explained in C1) + | def f3(t: C1) = t.clone() // invokevirtual C1.clone -- Object.clone would be illegal + |} + """.stripMargin + + val runCode = + """ + |val r = new StringBuffer() + |val c1 = new C1 + |r.append(c1.f1) + |r.append(c1.f2) + |r.append(c1.f3) + |val t = new T { } + |val u = new U { } + |val c2 = new C2 + |r.append(c2.f1(t)) + |r.append(c2.f1(u)) + |r.append(c2.f1(c1)) + |r.append(c2.f2(u)) + |r.append(c2.f2(c1)) + |r.append(c2.f3(c1)) + |r.toString + """.stripMargin +} diff --git a/test/junit/scala/issues/BytecodeTests.scala b/test/junit/scala/issues/BytecodeTests.scala deleted file mode 100644 index d4ed063a03..0000000000 --- a/test/junit/scala/issues/BytecodeTests.scala +++ /dev/null @@ -1,80 +0,0 @@ -package scala.issues - -import org.junit.runner.RunWith -import org.junit.runners.JUnit4 -import org.junit.Test -import scala.tools.asm.Opcodes -import scala.tools.nsc.backend.jvm.AsmUtils -import scala.tools.nsc.backend.jvm.CodeGenTools._ -import org.junit.Assert._ -import scala.collection.JavaConverters._ -import scala.tools.partest.ASMConverters._ - -@RunWith(classOf[JUnit4]) -class BytecodeTests { - val compiler = newCompiler() - - @Test - def t8731(): Unit = { - val code = - """class C { - | def f(x: Int) = (x: @annotation.switch) match { - | case 1 => 0 - | case 2 => 1 - | case 3 => 2 - | } - | final val K = 10 - | def g(x: Int) = (x: @annotation.switch) match { - | case K => 0 - | case 1 => 10 - | case 2 => 20 - | } - |} - """.stripMargin - - val List(c) = compileClasses(compiler)(code) - - assertTrue(getSingleMethod(c, "f").instructions.count(_.isInstanceOf[TableSwitch]) == 1) - assertTrue(getSingleMethod(c, "g").instructions.count(_.isInstanceOf[LookupSwitch]) == 1) - } - - @Test - def t8926(): Unit = { - import scala.reflect.internal.util.BatchSourceFile - - // this test cannot be implemented using partest because of its mixed-mode compilation strategy: - // partest first compiles all files with scalac, then the java files, and then again the scala - // using the output classpath. this shadows the bug SI-8926. - - val annotA = - """import java.lang.annotation.Retention; - |import java.lang.annotation.RetentionPolicy; - |@Retention(RetentionPolicy.RUNTIME) - |public @interface AnnotA { } - """.stripMargin - val annotB = "public @interface AnnotB { }" - - val scalaSrc = - """@AnnotA class A - |@AnnotB class B - """.stripMargin - - val compiler = newCompiler() - val run = new compiler.Run() - run.compileSources(List(new BatchSourceFile("AnnotA.java", annotA), new BatchSourceFile("AnnotB.java", annotB), new BatchSourceFile("Test.scala", scalaSrc))) - val outDir = compiler.settings.outputDirs.getSingleOutput.get - val outfiles = (for (f <- outDir.iterator if !f.isDirectory) yield (f.name, f.toByteArray)).toList - - def check(classfile: String, annotName: String) = { - val f = (outfiles collect { case (`classfile`, bytes) => AsmUtils.readClass(bytes) }).head - val descs = f.visibleAnnotations.asScala.map(_.desc).toList - assertTrue(descs.toString, descs exists (_ contains annotName)) - } - - check("A.class", "AnnotA") - - // known issue SI-8928: the visibility of AnnotB should be CLASS, but annotation classes without - // a @Retention annotation are currently emitted as RUNTIME. - check("B.class", "AnnotB") - } -} diff --git a/test/junit/scala/issues/OptimizedBytecodeTest.scala b/test/junit/scala/issues/OptimizedBytecodeTest.scala new file mode 100644 index 0000000000..1555e8945a --- /dev/null +++ b/test/junit/scala/issues/OptimizedBytecodeTest.scala @@ -0,0 +1,375 @@ +package scala.issues + +import org.junit.runner.RunWith +import org.junit.runners.JUnit4 +import org.junit.Test +import scala.tools.asm.Opcodes._ +import org.junit.Assert._ + +import scala.tools.nsc.backend.jvm.{AsmUtils, CodeGenTools} + +import CodeGenTools._ +import scala.tools.partest.ASMConverters +import ASMConverters._ +import AsmUtils._ + +import scala.tools.testing.ClearAfterClass + +object OptimizedBytecodeTest extends ClearAfterClass.Clearable { + val args = "-Yopt:l:classpath -Yopt-warnings" + var compiler = newCompiler(extraArgs = args) + def clear(): Unit = { compiler = null } +} + +@RunWith(classOf[JUnit4]) +class OptimizedBytecodeTest extends ClearAfterClass { + ClearAfterClass.stateToClear = OptimizedBytecodeTest + + val compiler = OptimizedBytecodeTest.compiler + + @Test + def t2171(): Unit = { + val code = + """class C { + | final def m(msg: => String) = try 0 catch { case ex: Throwable => println(msg) } + | def t(): Unit = while (true) m("...") + |} + """.stripMargin + val List(c) = compileClasses(compiler)(code) + assertSameCode(getSingleMethod(c, "t"), List(Label(0), Jump(GOTO, Label(0)))) + } + + @Test + def t3430(): Unit = { + val code = + """class C { + | final def m(f: String => Boolean) = f("a") + | def t(): Boolean = + | m { s1 => + | m { s2 => + | while (true) { } + | true + | } + | } + |} + """.stripMargin + val List(c) = compileClasses(compiler)(code) + + assertSameSummary(getSingleMethod(c, "t"), List( + LDC, ASTORE, ALOAD /*0*/, ALOAD /*1*/, "C$$$anonfun$1", IRETURN)) + assertSameSummary(getSingleMethod(c, "C$$$anonfun$1"), List(LDC, "C$$$anonfun$2", IRETURN)) + assertSameSummary(getSingleMethod(c, "C$$$anonfun$2"), List(-1 /*A*/, GOTO /*A*/)) + } + + @Test + def t3252(): Unit = { + val code = + """class C { + | def t(x: Boolean): Thread = { + | g { + | x match { + | case false => Tat.h { } + | } + | } + | } + | + | private def g[T](block: => T) = ??? + |} + |object Tat { + | def h(block: => Unit): Nothing = ??? + |} + """.stripMargin + val List(c, t, tMod) = compileClasses(compiler)(code, allowMessage = _.msg.contains("not be exhaustive")) + assertSameSummary(getSingleMethod(c, "t"), List(GETSTATIC, "$qmark$qmark$qmark", ATHROW)) + } + + @Test + def t6157(): Unit = { + val code = + """class C { + | def t = println(ErrorHandler.defaultIfIOException("String")("String")) + |} + |object ErrorHandler { + | import java.io.IOException + | @inline + | def defaultIfIOException[T](default: => T)(closure: => T): T = try closure catch { + | case e: IOException => default + | } + |} + """.stripMargin + + val msg = + """ErrorHandler$::defaultIfIOException(Lscala/Function0;Lscala/Function0;)Ljava/lang/Object; is annotated @inline but could not be inlined: + |The operand stack at the callsite in C::t()V contains more values than the + |arguments expected by the callee ErrorHandler$::defaultIfIOException(Lscala/Function0;Lscala/Function0;)Ljava/lang/Object;. These values would be discarded + |when entering an exception handler declared in the inlined method.""".stripMargin + + compileClasses(compiler)(code, allowMessage = _.msg == msg) + } + + @Test + def t6547(): Unit = { // "pos" test -- check that it compiles + val code = + """trait ConfigurableDefault[@specialized V] { + | def fillArray(arr: Array[V], v: V) = (arr: Any) match { + | case x: Array[Int] => null + | case x: Array[Long] => v.asInstanceOf[Long] + | } + |} + """.stripMargin + compileClasses(compiler)(code) + } + + @Test + def t8062(): Unit = { + val c1 = + """package warmup + |object Warmup { def filter[A](p: Any => Boolean): Any = filter[Any](p) } + """.stripMargin + val c2 = "class C { def t = warmup.Warmup.filter[Any](x => false) }" + val List(c, _, _) = compileClassesSeparately(List(c1, c2), extraArgs = OptimizedBytecodeTest.args) + assertInvoke(getSingleMethod(c, "t"), "warmup/Warmup$", "filter") + } + + @Test + def t8306(): Unit = { // "pos" test + val code = + """class C { + | def foo: Int = 123 + | lazy val extension: Int = foo match { + | case idx if idx != -1 => 15 + | case _ => 17 + | } + |} + """.stripMargin + compileClasses(compiler)(code) + } + + @Test + def t8359(): Unit = { // "pos" test + // This is a minimization of code that crashed the compiler during bootstrapping + // in the first iteration of https://github.com/scala/scala/pull/4373, the PR + // that adjusted the order of free and declared params in LambdaLift. + + // Was: + // java.lang.AssertionError: assertion failed: + // Record Record(<$anon: Function1>,Map(value a$1 -> Deref(LocalVar(value b)))) does not contain a field value b$1 + // at scala.tools.nsc.Global.assert(Global.scala:262) + // at scala.tools.nsc.backend.icode.analysis.CopyPropagation$copyLattice$State.getFieldNonRecordValue(CopyPropagation.scala:113) + // at scala.tools.nsc.backend.icode.analysis.CopyPropagation$copyLattice$State.getFieldNonRecordValue(CopyPropagation.scala:122) + // at scala.tools.nsc.backend.opt.ClosureElimination$ClosureElim$$anonfun$analyzeMethod$1$$anonfun$apply$2.replaceFieldAccess$1(ClosureElimination.scala:124) + val code = + """package test + |class Typer { + | def bar(a: Boolean, b: Boolean): Unit = { + | @inline + | def baz(): Unit = { + | ((_: Any) => (Typer.this, a, b)).apply("") + | } + | ((_: Any) => baz()).apply("") + | } + |} + """.stripMargin + compileClasses(compiler)(code) + } + + @Test + def t9123(): Unit = { // "pos" test + val code = + """trait Setting { + | type T + | def value: T + |} + |object Test { + | def test(x: Some[Setting]) = x match { + | case Some(dep) => Some(dep.value) map (_ => true) + | } + |} + """.stripMargin + compileClasses(compiler)(code) + } + + @Test + def traitForceInfo(): Unit = { + // This did NOT crash unless it's in the interactive package. + // error: java.lang.AssertionError: assertion failed: trait Contexts.NoContext$ linkedModule: <none>List() + // at scala.Predef$.assert(Predef.scala:160) + // at scala.tools.nsc.symtab.classfile.ClassfileParser$innerClasses$.innerSymbol$1(ClassfileParser.scala:1211) + // at scala.tools.nsc.symtab.classfile.ClassfileParser$innerClasses$.classSymbol(ClassfileParser.scala:1223) + // at scala.tools.nsc.symtab.classfile.ClassfileParser.classNameToSymbol(ClassfileParser.scala:489) + // at scala.tools.nsc.symtab.classfile.ClassfileParser.sig2type$1(ClassfileParser.scala:757) + // at scala.tools.nsc.symtab.classfile.ClassfileParser.sig2type$1(ClassfileParser.scala:789) + val code = + """package scala.tools.nsc + |package interactive + | + |trait MyContextTrees { + | val self: Global + | val NoContext = self.analyzer.NoContext + |} + """.stripMargin + compileClasses(compiler)(code) + } + + @Test + def t9160(): Unit = { + val code = + """class C { + | def getInt: Int = 0 + | def t(trees: Object): Int = { + | trees match { + | case Some(elems) => + | case tree => getInt + | } + | 55 + | } + |} + """.stripMargin + val List(c) = compileClasses(compiler)(code) + assertSameSummary(getSingleMethod(c, "t"), List( + ALOAD /*1*/, INSTANCEOF /*Some*/, IFNE /*A*/, + ALOAD /*0*/, "getInt", POP, + -1 /*A*/, BIPUSH, IRETURN)) + } + + @Test + def t8796(): Unit = { + val code = + """final class C { + | def pr(): Unit = () + | def t(index: Int): Unit = index match { + | case 0 => pr() + | case 1 => pr() + | case _ => t(index - 2) + | } + |} + """.stripMargin + val List(c) = compileClasses(compiler)(code) + assertSameSummary(getSingleMethod(c, "t"), List( + -1 /*A*/, ILOAD /*1*/, TABLESWITCH, + -1, ALOAD, "pr", RETURN, + -1, ALOAD, "pr", RETURN, + -1, ILOAD, ICONST_2, ISUB, ISTORE, GOTO /*A*/)) + } + + @Test + def t8524(): Unit = { + val c1 = + """package library + |object Library { + | @inline def pleaseInlineMe() = 1 + | object Nested { @inline def pleaseInlineMe() = 2 } + |} + """.stripMargin + + val c2 = + """class C { + | def t = library.Library.pleaseInlineMe() + library.Library.Nested.pleaseInlineMe() + |} + """.stripMargin + + val cls = compileClassesSeparately(List(c1, c2), extraArgs = OptimizedBytecodeTest.args) + val c = cls.find(_.name == "C").get + assertSameSummary(getSingleMethod(c, "t"), List( + GETSTATIC, IFNONNULL, ACONST_NULL, ATHROW, // module load and null checks not yet eliminated + -1, ICONST_1, GETSTATIC, IFNONNULL, ACONST_NULL, ATHROW, + -1, ICONST_2, IADD, IRETURN)) + } + + @Test + def privateInline(): Unit = { + val code = + """final class C { + | private var x1 = false + | var x2 = false + | + | @inline private def wrapper1[T](body: => T): T = { + | val saved = x1 + | x1 = true + | try body + | finally x1 = saved + | } + | + | @inline private def wrapper2[T](body: => T): T = { + | val saved = x2 + | x2 = true + | try body + | finally x2 = saved + | } + | // inlined + | def f1a() = wrapper1(5) + | // not inlined: even after inlining `identity`, the Predef module is already on the stack for the + | // subsequent null check (the receiver of an inlined method, in this case Predef, is checked for + | // nullness, to ensure an NPE is thrown) + | def f1b() = identity(wrapper1(5)) + | + | def f2a() = wrapper2(5) // inlined + | def f2b() = identity(wrapper2(5)) // not inlined + |} + """.stripMargin + val List(c) = compileClasses(compiler)(code, allowMessage = _.msg.contains("exception handler declared in the inlined method")) + assertInvoke(getSingleMethod(c, "f1a"), "C", "C$$$anonfun$1") + assertInvoke(getSingleMethod(c, "f1b"), "C", "wrapper1") + assertInvoke(getSingleMethod(c, "f2a"), "C", "C$$$anonfun$3") + assertInvoke(getSingleMethod(c, "f2b"), "C", "wrapper2") + } + + @Test + def t7060(): Unit = { + val code = + """class C { + | @inline final def mbarray_apply_minibox(array: Any, tag: Byte): Long = + | if (tag == 0) array.asInstanceOf[Array[Long]](0) + | else array.asInstanceOf[Array[Byte]](0).toLong + | + | def t = mbarray_apply_minibox(null, 0) + |} + """.stripMargin + val List(c) = compileClasses(compiler)(code) + assertNoInvoke(getSingleMethod(c, "t")) + } + + @Test + def t8315(): Unit = { + val code = + """class C { + | def t(as: Listt): Unit = { + | map(as, (_: Any) => return) + | } + | final def map(x: Listt, f: Any => Any): Any = { + | if (x eq Nill) "" else f("") + | } + |} + |object Nill extends Listt + |class Listt + """.stripMargin + val List(c, nil, nilMod, listt) = compileClasses(compiler)(code) + assertInvoke(getSingleMethod(c, "t"), "C", "C$$$anonfun$1") + } + + @Test + def t8315b(): Unit = { + val code = + """class C { + | def crash: Unit = { + | val key = "" + | try map(new F(key)) + | catch { case _: Throwable => } + | } + | final def map(f: F): Any = f.apply("") + |} + |final class F(key: String) { + | final def apply(a: Any): Any = throw new RuntimeException(key) + |} + """.stripMargin + val List(c, f) = compileClasses(compiler)(code) + assertInvoke(getSingleMethod(c, "crash"), "C", "map") + } + + @Test + def optimiseEnablesNewOpt(): Unit = { + val code = """class C { def t = (1 to 10) foreach println }""" + val List(c) = readAsmClasses(compile(newCompiler(extraArgs = "-optimise -deprecation"))(code, allowMessage = _.msg.contains("is deprecated"))) + assertInvoke(getSingleMethod(c, "t"), "C", "C$$$anonfun$1") // range-foreach inlined from classpath + } +} diff --git a/test/junit/scala/issues/RunTest.scala b/test/junit/scala/issues/RunTest.scala new file mode 100644 index 0000000000..781f2ef343 --- /dev/null +++ b/test/junit/scala/issues/RunTest.scala @@ -0,0 +1,150 @@ +package scala.issues + +import org.junit.runner.RunWith +import org.junit.runners.JUnit4 +import org.junit.{AfterClass, BeforeClass, Test} +import org.junit.Assert._ + +import scala.reflect.runtime._ +import scala.tools.reflect.ToolBox +import scala.tools.testing.ClearAfterClass + +object RunTest extends ClearAfterClass.Clearable { + var toolBox = universe.runtimeMirror(getClass.getClassLoader).mkToolBox() + override def clear(): Unit = { toolBox = null } + + // definitions for individual tests + + class VC(val x: Any) extends AnyVal +} + +@RunWith(classOf[JUnit4]) +class RunTest extends ClearAfterClass { + ClearAfterClass.stateToClear = RunTest + + def run[T](code: String): T = { + val tb = RunTest.toolBox + tb.eval(tb.parse(code)).asInstanceOf[T] + } + + @Test + def classOfValueClassAlias(): Unit = { + val code = + """import scala.issues.RunTest.VC + |type aVC = VC + |type aInt = Int + |type aInteger = Integer + |classOf[VC] == classOf[aVC] && + | classOf[aInt] == classOf[Int] && + | classOf[aInteger] == classOf[Integer] && + | classOf[aInt] != classOf[aInteger] + """.stripMargin + assertTrue(run[Boolean](code)) + } + + @Test + def classOfFinalVal(): Unit = { + val code = + """class C { + | final val a1 = classOf[Int] + | final val b1 = classOf[List[_]] + | final val c1 = classOf[List[String]] + | final val d1 = classOf[Array[Int]] + | final val e1 = classOf[Array[List[_]]] + | final val f1 = classOf[Array[_]] + | + | val a2 = classOf[Int] + | val b2 = classOf[List[_]] + | val c2 = classOf[List[String]] + | val d2 = classOf[Array[Int]] + | val e2 = classOf[Array[List[_]]] + | val f2 = classOf[Array[_]] + | + | val listC = Class.forName("scala.collection.immutable.List") + | + | val compare = List( + | (a1, a2, Integer.TYPE), + | (b1, b2, listC), + | (c1, c2, listC), + | (d1, d2, Array(1).getClass), + | (e1, e2, Array(List()).getClass), + | (f1, f2, new Object().getClass)) + |} + |(new C).compare + """.stripMargin + type K = Class[_] + val cs = run[List[(K, K, K)]](code) + for ((x, y, z) <- cs) { + assertEquals(x, y) + assertEquals(x, z) + } + } + + @Test + def t9702(): Unit = { + val code = + """import javax.annotation.Resource + |import scala.issues.RunTest.VC + |class C { + | type aList[K] = List[K] + | type aVC = VC + | type aInt = Int + | type aInteger = Integer + | @Resource(`type` = classOf[List[Int]]) def a = 0 + | @Resource(`type` = classOf[List[_]]) def b = 0 + | @Resource(`type` = classOf[aList[_]]) def c = 0 + | @Resource(`type` = classOf[Int]) def d = 0 + | @Resource(`type` = classOf[aInt]) def e = 0 + | @Resource(`type` = classOf[Integer]) def f = 0 + | @Resource(`type` = classOf[aInteger]) def g = 0 + | @Resource(`type` = classOf[VC]) def h = 0 + | @Resource(`type` = classOf[aVC]) def i = 0 + | @Resource(`type` = classOf[Array[Int]]) def j = 0 + | @Resource(`type` = classOf[Array[List[_]]]) def k = 0 + |} + |val c = classOf[C] + |def typeArg(meth: String) = c.getDeclaredMethod(meth).getDeclaredAnnotation(classOf[Resource]).`type` + |('a' to 'k').toList.map(_.toString).map(typeArg) + """.stripMargin + + val l = Class.forName("scala.collection.immutable.List") + val i = Integer.TYPE + val ig = new Integer(1).getClass + val v = new RunTest.VC(1).getClass + val ai = Array(1).getClass + val al = Array(List()).getClass + + // sanity checks + assertEquals(i, classOf[Int]) + assertNotEquals(i, ig) + + assertEquals(run[List[Class[_]]](code), + List(l, l, l, i, i, ig, ig, v, v, ai, al)) + } + + @Test + def annotationInfoNotErased(): Unit = { + val code = + """import javax.annotation.Resource + |import scala.annotation.meta.getter + |class C { + | type Rg = Resource @getter + | @(Resource @getter)(`type` = classOf[Int]) def a = 0 + | @Rg(`type` = classOf[Int]) def b = 0 + |} + |val c = classOf[C] + |def typeArg(meth: String) = c.getDeclaredMethod(meth).getDeclaredAnnotation(classOf[Resource]).`type` + |List("a", "b") map typeArg + |""".stripMargin + + val i = Integer.TYPE + assertEquals(run[List[Class[_]]](code), List(i, i)) + } + + @Test + def invocationReceivers(): Unit = { + import invocationReceiversTestCode._ + assertEquals(run[String](definitions("Object") + runCode), "hi" * 9) + assertEquals(run[String](definitions("String") + runCode), "hi" * 9) // bridge method for clone generated + } +} diff --git a/test/junit/scala/math/BigDecimalTest.scala b/test/junit/scala/math/BigDecimalTest.scala index a9e2481f37..5de02cbe0c 100644 --- a/test/junit/scala/math/BigDecimalTest.scala +++ b/test/junit/scala/math/BigDecimalTest.scala @@ -260,4 +260,9 @@ class BigDecimalTest { testPrecision() testRounded() } + + @Test + def testIsComparable() { + assert(BigDecimal(0.1).isInstanceOf[java.lang.Comparable[_]]) + } } diff --git a/test/junit/scala/math/BigIntTest.scala b/test/junit/scala/math/BigIntTest.scala new file mode 100644 index 0000000000..5a5694a775 --- /dev/null +++ b/test/junit/scala/math/BigIntTest.scala @@ -0,0 +1,16 @@ +package scala.math + +import java.math.{BigInteger => BI, MathContext => MC} + +import org.junit.Test +import org.junit.runner.RunWith +import org.junit.runners.JUnit4 + +@RunWith(classOf[JUnit4]) +class BigIntTest { + + @Test + def testIsComparable() { + assert(BigInt(1).isInstanceOf[java.lang.Comparable[_]]) + } +} diff --git a/test/junit/scala/reflect/ClassTag.scala b/test/junit/scala/reflect/ClassTagTest.scala index 49022dccda..49022dccda 100644 --- a/test/junit/scala/reflect/ClassTag.scala +++ b/test/junit/scala/reflect/ClassTagTest.scala diff --git a/test/junit/scala/reflect/internal/PrintersTest.scala b/test/junit/scala/reflect/internal/PrintersTest.scala index 9bfe6eecb8..2305e7ea50 100644 --- a/test/junit/scala/reflect/internal/PrintersTest.scala +++ b/test/junit/scala/reflect/internal/PrintersTest.scala @@ -8,14 +8,6 @@ import scala.reflect.runtime.{currentMirror=>cm} import org.junit.runner.RunWith import org.junit.runners.JUnit4 -@RunWith(classOf[JUnit4]) -class PrintersTest extends BasePrintTests - with ClassPrintTests - with TraitPrintTests - with ValAndDefPrintTests - with QuasiTreesPrintTests - with PackagePrintTests - object PrinterHelper { val toolbox = cm.mkToolBox() @@ -73,7 +65,8 @@ object PrinterHelper { import PrinterHelper._ -trait BasePrintTests { +@RunWith(classOf[JUnit4]) +class BasePrintTest { @Test def testIdent = assertTreeCode(Ident("*"))("*") @Test def testConstant1 = assertTreeCode(Literal(Constant("*")))("\"*\"") @@ -348,7 +341,8 @@ trait BasePrintTests { @Test def testImport4 = assertPrintedCode("import scala.collection._") } -trait ClassPrintTests { +@RunWith(classOf[JUnit4]) +class ClassPrintTest { @Test def testClass = assertPrintedCode("class *") @Test def testClassWithBody = assertPrintedCode(sm""" @@ -833,7 +827,8 @@ trait ClassPrintTests { |}""") } -trait TraitPrintTests { +@RunWith(classOf[JUnit4]) +class TraitPrintTest { @Test def testTrait = assertPrintedCode("trait *") @Test def testTraitWithBody = assertPrintedCode(sm""" @@ -953,7 +948,8 @@ trait TraitPrintTests { |}""") } -trait ValAndDefPrintTests { +@RunWith(classOf[JUnit4]) +class ValAndDefPrintTest { @Test def testVal1 = assertPrintedCode("val a: scala.Unit = ()") @Test def testVal2 = assertPrintedCode("val * : scala.Unit = ()") @@ -1093,7 +1089,8 @@ trait ValAndDefPrintTests { |}""", wrapCode = true) } -trait PackagePrintTests { +@RunWith(classOf[JUnit4]) +class PackagePrintTest { @Test def testPackage1 = assertPrintedCode(sm""" |package foo.bar { | @@ -1131,7 +1128,8 @@ trait PackagePrintTests { |}""", checkTypedTree = false) } -trait QuasiTreesPrintTests { +@RunWith(classOf[JUnit4]) +class QuasiTreesPrintTest { @Test def testQuasiIdent = assertTreeCode(q"*")("*") @Test def testQuasiVal = assertTreeCode(q"val * : Unit = null")("val * : Unit = null") diff --git a/test/junit/scala/reflect/internal/TreeGenTest.scala b/test/junit/scala/reflect/internal/TreeGenTest.scala new file mode 100644 index 0000000000..db1ea5cf6a --- /dev/null +++ b/test/junit/scala/reflect/internal/TreeGenTest.scala @@ -0,0 +1,51 @@ +package scala.reflect.internal + +import org.junit.Assert._ +import org.junit.Test +import org.junit.runner.RunWith +import org.junit.runners.JUnit4 + +import scala.runtime.ScalaRunTime +import scala.tools.nsc.symtab.SymbolTableForUnitTesting + +@RunWith(classOf[JUnit4]) +class TreeGenTest { + object symbolTable extends SymbolTableForUnitTesting + + import symbolTable._ + + @Test + def attributedRefToTopLevelMemberNotPrefixedByThis_t9473_a(): Unit = { + val SomeClass = symbolOf[Some[_]] + val ref = gen.mkAttributedRef(SomeClass) + assertEquals("scala.Some", ref.toString) // was scala.this.Some + ref match { + case sel @ Select(pre @ Ident(preName), name) => + assertEquals(TermName("scala"), preName) + assertEquals(TypeName("Some"), name) + assertEquals(SomeClass, sel.symbol) + case _ => fail(showRaw(ref)) + } + } + + @Test + def attributedRefToTopLevelMemberNotPrefixedByThis_t9473_b(): Unit = { + val ScalaRuntimeModule = symbolOf[ScalaRunTime.type].sourceModule + val ref = gen.mkAttributedRef(ScalaRuntimeModule) + assertEquals("scala.runtime.ScalaRunTime", ref.toString) + ref match { + case sel @ Select(Select(Ident(TermName("scala")), TermName("runtime")), TermName("ScalaRunTime")) => + case _ => fail(showRaw(ref)) + } + } + @Test + def attributedRefToTopLevelMemberNotPrefixedByThis_t9473_c(): Unit = { + val DummyImplicitClass = symbolOf[Predef.DummyImplicit] + val ref = gen.mkAttributedRef(DummyImplicitClass) + assertEquals("scala.Predef.DummyImplicit", ref.toString) +// ref match { +// case sel @ Select(Select(Ident(TermName("scala")), TermName("runtime")), TermName("ScalaRunTime")) => +// case _ => fail(showRaw(ref)) +// } + } +} diff --git a/test/junit/scala/reflect/internal/TypesTest.scala b/test/junit/scala/reflect/internal/TypesTest.scala index 95194ef0a4..05a77cfb47 100644 --- a/test/junit/scala/reflect/internal/TypesTest.scala +++ b/test/junit/scala/reflect/internal/TypesTest.scala @@ -1,9 +1,10 @@ package scala.reflect.internal import org.junit.Assert._ -import org.junit.Test +import org.junit.{Assert, Test} import org.junit.runner.RunWith import org.junit.runners.JUnit4 +import scala.collection.mutable import scala.tools.nsc.symtab.SymbolTableForUnitTesting @RunWith(classOf[JUnit4]) @@ -32,4 +33,29 @@ class TypesTest { val uniquelyNarrowed2 = refinedType(boolWithString1narrow2 :: Nil, NoSymbol) assert(uniquelyNarrowed1 =:= uniquelyNarrowed2) } + + @Test + def testTransitivityWithModuleTypeRef(): Unit = { + import rootMirror.EmptyPackageClass + val (module, moduleClass) = EmptyPackageClass.newModuleAndClassSymbol(TermName("O"), NoPosition, 0L) + val minfo = ClassInfoType(List(ObjectTpe), newScope, moduleClass) + module.moduleClass setInfo minfo + module setInfo module.moduleClass.tpe + val tp1 = TypeRef(ThisType(EmptyPackageClass), moduleClass, Nil) + val tp2 = SingleType(ThisType(EmptyPackageClass), module) + val tp3 = ThisType(moduleClass) + val tps = List(tp1, tp2, tp3) + val results = mutable.Buffer[String]() + tps.permutations.foreach { + case ts @ List(a, b, c) => + def tsShownRaw = ts.map(t => showRaw(t)).mkString(", ") + if (a <:< b && b <:< c && !(a <:< c)) results += s"<:< intransitive: $tsShownRaw" + if (a =:= b && b =:= c && !(a =:= c)) results += s"=:= intransitive: $tsShownRaw" + } + results.toList match { + case Nil => // okay + case xs => + Assert.fail(xs.mkString("\n")) + } + } } diff --git a/test/junit/scala/runtime/LambdaDeserializerTest.java b/test/junit/scala/runtime/LambdaDeserializerTest.java new file mode 100644 index 0000000000..069eb4aab6 --- /dev/null +++ b/test/junit/scala/runtime/LambdaDeserializerTest.java @@ -0,0 +1,193 @@ +package scala.runtime; + +import org.junit.Assert; +import org.junit.Test; + +import java.io.Serializable; +import java.lang.invoke.MethodHandle; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.SerializedLambda; +import java.lang.reflect.Method; +import java.util.Arrays; +import java.util.HashMap; + +public final class LambdaDeserializerTest { + private LambdaHost lambdaHost = new LambdaHost(); + + @Test + public void serializationPrivate() { + F1<Boolean, String> f1 = lambdaHost.lambdaBackedByPrivateImplMethod(); + Assert.assertEquals(f1.apply(true), reconstitute(f1).apply(true)); + } + + @Test + public void serializationStatic() { + F1<Boolean, String> f1 = lambdaHost.lambdaBackedByStaticImplMethod(); + Assert.assertEquals(f1.apply(true), reconstitute(f1).apply(true)); + } + + @Test + public void serializationVirtualMethodReference() { + F1<Boolean, String> f1 = lambdaHost.lambdaBackedByVirtualMethodReference(); + Assert.assertEquals(f1.apply(true), reconstitute(f1).apply(true)); + } + + @Test + public void serializationInterfaceMethodReference() { + F1<I, Object> f1 = lambdaHost.lambdaBackedByInterfaceMethodReference(); + I i = new I() { + }; + Assert.assertEquals(f1.apply(i), reconstitute(f1).apply(i)); + } + + @Test + public void serializationStaticMethodReference() { + F1<Boolean, String> f1 = lambdaHost.lambdaBackedByStaticMethodReference(); + Assert.assertEquals(f1.apply(true), reconstitute(f1).apply(true)); + } + + @Test + public void serializationNewInvokeSpecial() { + F0<Object> f1 = lambdaHost.lambdaBackedByConstructorCall(); + Assert.assertEquals(f1.apply(), reconstitute(f1).apply()); + } + + @Test + public void uncached() { + F0<Object> f1 = lambdaHost.lambdaBackedByConstructorCall(); + F0<Object> reconstituted1 = reconstitute(f1); + F0<Object> reconstituted2 = reconstitute(f1); + Assert.assertNotEquals(reconstituted1.getClass(), reconstituted2.getClass()); + } + + @Test + public void cached() { + HashMap<String, MethodHandle> cache = new HashMap<>(); + F0<Object> f1 = lambdaHost.lambdaBackedByConstructorCall(); + F0<Object> reconstituted1 = reconstitute(f1, cache); + F0<Object> reconstituted2 = reconstitute(f1, cache); + Assert.assertEquals(reconstituted1.getClass(), reconstituted2.getClass()); + } + + @Test + public void cachedStatic() { + HashMap<String, MethodHandle> cache = new HashMap<>(); + F1<Boolean, String> f1 = lambdaHost.lambdaBackedByStaticImplMethod(); + // Check that deserialization of a static lambda always returns the + // same instance. + Assert.assertSame(reconstitute(f1, cache), reconstitute(f1, cache)); + + // (as is the case with regular invocation.) + Assert.assertSame(f1, lambdaHost.lambdaBackedByStaticImplMethod()); + } + + @Test + public void implMethodNameChanged() { + F1<Boolean, String> f1 = lambdaHost.lambdaBackedByStaticImplMethod(); + SerializedLambda sl = writeReplace(f1); + checkIllegalAccess(copySerializedLambda(sl, sl.getImplMethodName() + "___", sl.getImplMethodSignature())); + } + + @Test + public void implMethodSignatureChanged() { + F1<Boolean, String> f1 = lambdaHost.lambdaBackedByStaticImplMethod(); + SerializedLambda sl = writeReplace(f1); + checkIllegalAccess(copySerializedLambda(sl, sl.getImplMethodName(), sl.getImplMethodSignature().replace("Boolean", "Integer"))); + } + + private void checkIllegalAccess(SerializedLambda serialized) { + try { + LambdaDeserializer.deserializeLambda(MethodHandles.lookup(), null, serialized); + throw new AssertionError(); + } catch (IllegalArgumentException iae) { + if (!iae.getMessage().contains("Illegal lambda deserialization")) { + Assert.fail("Unexpected message: " + iae.getMessage()); + } + } + } + + private SerializedLambda copySerializedLambda(SerializedLambda sl, String implMethodName, String implMethodSignature) { + Object[] captures = new Object[sl.getCapturedArgCount()]; + for (int i = 0; i < captures.length; i++) { + captures[i] = sl.getCapturedArg(i); + } + return new SerializedLambda(loadClass(sl.getCapturingClass()), sl.getFunctionalInterfaceClass(), sl.getFunctionalInterfaceMethodName(), + sl.getFunctionalInterfaceMethodSignature(), sl.getImplMethodKind(), sl.getImplClass(), implMethodName, implMethodSignature, + sl.getInstantiatedMethodType(), captures); + } + + private Class<?> loadClass(String className) { + try { + return Class.forName(className.replace('/', '.')); + } catch (ClassNotFoundException e) { + throw new RuntimeException(e); + } + } + private <A, B> A reconstitute(A f1) { + return reconstitute(f1, null); + } + + @SuppressWarnings("unchecked") + private <A, B> A reconstitute(A f1, java.util.HashMap<String, MethodHandle> cache) { + try { + return (A) LambdaDeserializer.deserializeLambda(LambdaHost.lookup(), cache, writeReplace(f1)); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + private <A> SerializedLambda writeReplace(A f1) { + try { + Method writeReplace = f1.getClass().getDeclaredMethod("writeReplace"); + writeReplace.setAccessible(true); + return (SerializedLambda) writeReplace.invoke(f1); + } catch (Exception e) { + throw new RuntimeException(e); + } + } +} + + +interface F1<A, B> extends Serializable { + B apply(A a); +} + +interface F0<A> extends Serializable { + A apply(); +} + +class LambdaHost { + public F1<Boolean, String> lambdaBackedByPrivateImplMethod() { + int local = 42; + return (b) -> Arrays.asList(local, b ? "true" : "false", LambdaHost.this).toString(); + } + + @SuppressWarnings("Convert2MethodRef") + public F1<Boolean, String> lambdaBackedByStaticImplMethod() { + return (b) -> String.valueOf(b); + } + + public F1<Boolean, String> lambdaBackedByStaticMethodReference() { + return String::valueOf; + } + + public F1<Boolean, String> lambdaBackedByVirtualMethodReference() { + return Object::toString; + } + + public F1<I, Object> lambdaBackedByInterfaceMethodReference() { + return I::i; + } + + public F0<Object> lambdaBackedByConstructorCall() { + return String::new; + } + + public static MethodHandles.Lookup lookup() { + return MethodHandles.lookup(); + } +} + +interface I { + default String i() { return "i"; }; +} diff --git a/test/junit/scala/runtime/ScalaRunTimeTest.scala b/test/junit/scala/runtime/ScalaRunTimeTest.scala index 9da197c71a..5bfb12610e 100644 --- a/test/junit/scala/runtime/ScalaRunTimeTest.scala +++ b/test/junit/scala/runtime/ScalaRunTimeTest.scala @@ -5,66 +5,66 @@ import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.JUnit4 -/** Tests for the private class DefaultPromise */ +/** Tests for the runtime object ScalaRunTime */ @RunWith(classOf[JUnit4]) class ScalaRunTimeTest { @Test - def testIsTuple() { - import ScalaRunTime.isTuple - def check(v: Any) = { - assertTrue(v.toString, isTuple(v)) + def testStingOf() { + import ScalaRunTime.stringOf + import scala.collection._ + import parallel.ParIterable + + assertEquals("null", stringOf(null)) + assertEquals( "\"\"", stringOf("")) + + assertEquals("abc", stringOf("abc")) + assertEquals("\" abc\"", stringOf(" abc")) + assertEquals("\"abc \"", stringOf("abc ")) + + assertEquals("""Array()""", stringOf(Array.empty[AnyRef])) + assertEquals("""Array()""", stringOf(Array.empty[Int])) + assertEquals("""Array(1, 2, 3)""", stringOf(Array(1, 2, 3))) + assertEquals("""Array(a, "", " c", null)""", stringOf(Array("a", "", " c", null))) + assertEquals("""Array(Array("", 1, Array(5)), Array(1))""", + stringOf(Array(Array("", 1, Array(5)), Array(1)))) + + val map = Map(1->"", 2->"a", 3->" a", 4->null) + assertEquals(s"""${map.stringPrefix}(1 -> "", 2 -> a, 3 -> " a", 4 -> null)""", stringOf(map)) + assertEquals(s"""${map.stringPrefix}(1 -> "", 2 -> a)""", stringOf(map, 2)) + + val iterable = Iterable("a", "", " c", null) + assertEquals(s"""${iterable.stringPrefix}(a, "", " c", null)""", stringOf(iterable)) + assertEquals(s"""${iterable.stringPrefix}(a, "")""", stringOf(iterable, 2)) + + val parIterable = ParIterable("a", "", " c", null) + assertEquals(s"""${parIterable.stringPrefix}(a, "", " c", null)""", stringOf(parIterable)) + assertEquals(s"""${parIterable.stringPrefix}(a, "")""", stringOf(parIterable, 2)) + + val traversable = new Traversable[Int] { + def foreach[U](f: Int => U): Unit = (0 to 3).foreach(f) } + assertEquals(s"${traversable.stringPrefix}(0, 1, 2, 3)", stringOf(traversable)) + assertEquals(s"${traversable.stringPrefix}(0, 1)", stringOf(traversable, 2)) - val s = "" - check(Tuple1(s)) - check((s, s)) - check((s, s, s)) - check((s, s, s, s)) - check((s, s, s, s, s)) - check((s, s, s, s, s, s)) - check((s, s, s, s, s, s, s)) - check((s, s, s, s, s, s, s, s)) - check((s, s, s, s, s, s, s, s, s)) - check((s, s, s, s, s, s, s, s, s, s)) - check((s, s, s, s, s, s, s, s, s, s, s)) - check((s, s, s, s, s, s, s, s, s, s, s, s)) - check((s, s, s, s, s, s, s, s, s, s, s, s, s)) - check((s, s, s, s, s, s, s, s, s, s, s, s, s, s)) - check((s, s, s, s, s, s, s, s, s, s, s, s, s, s, s)) - check((s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s)) - check((s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s)) - check((s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s)) - check((s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s)) - check((s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s)) - check((s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s)) - check((s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s)) + val tuple1 = Tuple1(0) + assertEquals("(0,)", stringOf(tuple1)) + assertEquals("(0,)", stringOf(tuple1, 0)) + assertEquals("(Array(0),)", stringOf(Tuple1(Array(0)))) - // some specialized variants will have mangled classnames - check(Tuple1(0)) - check((0, 0)) - check((0, 0, 0)) - check((0, 0, 0, 0)) - check((0, 0, 0, 0, 0)) - check((0, 0, 0, 0, 0, 0)) - check((0, 0, 0, 0, 0, 0, 0)) - check((0, 0, 0, 0, 0, 0, 0, 0)) - check((0, 0, 0, 0, 0, 0, 0, 0, 0)) - check((0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) - check((0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) - check((0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) - check((0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) - check((0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) - check((0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) - check((0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) - check((0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) - check((0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) - check((0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) - check((0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) - check((0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) - check((0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) + val tuple2 = Tuple2(0, 1) + assertEquals("(0,1)", stringOf(tuple2)) + assertEquals("(0,1)", stringOf(tuple2, 0)) + assertEquals("(Array(0),1)", stringOf((Array(0), 1))) - case class C() - val c = new C() - assertFalse(c.toString, isTuple(c)) + val tuple3 = Tuple3(0, 1, 2) + assertEquals("(0,1,2)", stringOf(tuple3)) + assertEquals("(0,1,2)", stringOf(tuple3, 0)) + assertEquals("(Array(0),1,2)", stringOf((Array(0), 1, 2))) + + val x = new Object { + override def toString(): String = "this is the stringOf string" + } + assertEquals(stringOf(x), "this is the stringOf string") + assertEquals(stringOf(x, 2), "this is the stringOf string") } } diff --git a/test/junit/scala/sys/process/t7350.scala b/test/junit/scala/sys/process/t7350.scala new file mode 100644 index 0000000000..9fdcac8ccc --- /dev/null +++ b/test/junit/scala/sys/process/t7350.scala @@ -0,0 +1,298 @@ +package scala.sys.process + +import org.junit.runner.RunWith +import org.junit.runners.JUnit4 +import org.junit.Test +import java.io.{InputStream, OutputStream, PipedInputStream, PipedOutputStream, ByteArrayInputStream, + ByteArrayOutputStream, IOException, Closeable} +import java.lang.reflect.InvocationTargetException +import scala.concurrent.{Await, Future} +import scala.concurrent.duration.{Duration, SECONDS} +import scala.concurrent.ExecutionContext.Implicits.global +import scala.util.control.Exception.ignoring + +// Each test normally ends in a moment, but for failure cases, waits until one second. + +@RunWith(classOf[JUnit4]) +class PipedProcessTest { + class ProcessMock(error: Boolean) extends Process { + var destroyCount = 0 + def isAlive() = false + def exitValue(): Int = { + if (error) { + throw new InterruptedException() + } + 0 + } + def destroy(): Unit = { destroyCount += 1 } + } + + class ProcessBuilderMock(process: Process, error: Boolean) extends ProcessBuilder.AbstractBuilder { + override def run(io: ProcessIO): Process = { + if (error) { + throw new IOException() + } + process + } + } + + class PipeSinkMock extends Process.PipeSink("PipeSinkMock") { + var releaseCount = 0 + override val pipe = null + override val sink = null + override def run(): Unit = {} + override def connectOut(out: OutputStream): Unit = {} + override def connectIn(pipeOut: PipedOutputStream): Unit = {} + override def release(): Unit = { releaseCount += 1 } + } + + class PipeSourceMock extends Process.PipeSource("PipeSourceMock") { + var releaseCount = 0 + override val pipe = null + override val source = null + override def run(): Unit = {} + override def connectIn(in: InputStream): Unit = {} + override def connectOut(sink: Process.PipeSink): Unit = {} + override def release(): Unit = { releaseCount += 1 } + } + + class PipedProcesses(a: ProcessBuilder, b: ProcessBuilder, defaultIO: ProcessIO, toError: Boolean) + extends Process.PipedProcesses(a, b, defaultIO, toError) { + def callRunAndExitValue(source: Process.PipeSource, sink: Process.PipeSink) = { + val m = classOf[Process.PipedProcesses].getDeclaredMethod("runAndExitValue", classOf[Process.PipeSource], classOf[Process.PipeSink]) + m.setAccessible(true) + try m.invoke(this, source, sink).asInstanceOf[Option[Int]] + catch { + case err: InvocationTargetException => throw err.getTargetException + } + } + } + + // PipedProcesses need not to release resources when it normally end + @Test + def normallyEnd() { + val io = BasicIO(false, ProcessLogger(_ => ())) + val source = new PipeSourceMock + val sink = new PipeSinkMock + val a = new ProcessMock(error = false) + val b = new ProcessMock(error = false) + val p = new PipedProcesses(new ProcessBuilderMock(a, error = false), new ProcessBuilderMock(b, error = false), io, false) + val f = Future { + p.callRunAndExitValue(source, sink) + } + Await.result(f, Duration(1, SECONDS)) + assert(source.releaseCount == 0) + assert(sink.releaseCount == 0) + assert(a.destroyCount == 0) + assert(b.destroyCount == 0) + } + + // PipedProcesses must release resources when b.run() failed + @Test + def bFailed() { + val io = BasicIO(false, ProcessLogger(_ => ())) + val source = new PipeSourceMock + val sink = new PipeSinkMock + val a = new ProcessMock(error = false) + val b = new ProcessMock(error = false) + val p = new PipedProcesses(new ProcessBuilderMock(a, error = false), new ProcessBuilderMock(b, error = true), io, false) + val f = Future { + ignoring(classOf[IOException]) { + p.callRunAndExitValue(source, sink) + } + } + Await.result(f, Duration(1, SECONDS)) + assert(source.releaseCount == 1) + assert(sink.releaseCount == 1) + assert(a.destroyCount == 0) + assert(b.destroyCount == 0) + } + + // PipedProcesses must release resources when a.run() failed + @Test + def aFailed() { + val io = BasicIO(false, ProcessLogger(_ => ())) + val source = new PipeSourceMock + val sink = new PipeSinkMock + val a = new ProcessMock(error = false) + val b = new ProcessMock(error = false) + val p = new PipedProcesses(new ProcessBuilderMock(a, error = true), new ProcessBuilderMock(b, error = false), io, false) + val f = Future { + ignoring(classOf[IOException]) { + p.callRunAndExitValue(source, sink) + } + } + Await.result(f, Duration(1, SECONDS)) + assert(source.releaseCount == 1) + assert(sink.releaseCount == 1) + assert(a.destroyCount == 0) + assert(b.destroyCount == 1) + } + + // PipedProcesses must release resources when interrupted during waiting for first.exitValue() + @Test + def firstInterrupted() { + val io = BasicIO(false, ProcessLogger(_ => ())) + val source = new PipeSourceMock + val sink = new PipeSinkMock + val a = new ProcessMock(error = true) + val b = new ProcessMock(error = false) + val p = new PipedProcesses(new ProcessBuilderMock(a, error = false), new ProcessBuilderMock(b, error = false), io, false) + val f = Future { + p.callRunAndExitValue(source, sink) + } + Await.result(f, Duration(1, SECONDS)) + assert(source.releaseCount == 1) + assert(sink.releaseCount == 1) + assert(a.destroyCount == 1) + assert(b.destroyCount == 1) + } + + // PipedProcesses must release resources when interrupted during waiting for second.exitValue() + @Test + def secondInterrupted() { + val io = BasicIO(false, ProcessLogger(_ => ())) + val source = new PipeSourceMock + val sink = new PipeSinkMock + val a = new ProcessMock(error = false) + val b = new ProcessMock(error = true) + val p = new PipedProcesses(new ProcessBuilderMock(a, error = false), new ProcessBuilderMock(b, error = false), io, false) + val f = Future { + p.callRunAndExitValue(source, sink) + } + Await.result(f, Duration(1, SECONDS)) + assert(source.releaseCount == 1) + assert(sink.releaseCount == 1) + assert(a.destroyCount == 1) + assert(b.destroyCount == 1) + } +} + +@RunWith(classOf[JUnit4]) +class PipeSourceSinkTest { + def throwsIOException(f: => Unit) = { + try { f; false } + catch { case _: IOException => true } + } + + class PipeSink extends Process.PipeSink("TestPipeSink") { + def ensureRunloopStarted() = { + while (sink.size() > 0) { + Thread.sleep(1) + } + } + def isReleased = { + val field = classOf[Process.PipeSink].getDeclaredField("pipe") + field.setAccessible(true) + val pipe = field.get(this).asInstanceOf[PipedInputStream] + !this.isAlive && throwsIOException { pipe.read() } + } + } + + class PipeSource extends Process.PipeSource("TestPipeSource") { + def ensureRunloopStarted() = { + while (source.size() > 0) { + Thread.sleep(1) + } + } + def isReleased = { + val field = classOf[Process.PipeSource].getDeclaredField("pipe") + field.setAccessible(true) + val pipe = field.get(this).asInstanceOf[PipedOutputStream] + !this.isAlive && throwsIOException { pipe.write(1) } + } + } + + trait CloseChecking extends Closeable { + var closed = false + override def close() = closed = true + } + class DebugOutputStream extends ByteArrayOutputStream with CloseChecking + class DebugInputStream(s: String) extends ByteArrayInputStream(s.getBytes()) with CloseChecking + class DebugInfinityInputStream extends InputStream with CloseChecking { + def read() = 1 + } + + def sourceSink() = { + val source = new PipeSource + val sink = new PipeSink + source connectOut sink + source.start() + sink.start() + (source, sink) + } + + // PipeSource and PipeSink must release resources when it normally end + @Test + def normallyEnd() { + val in = new DebugInputStream("aaa") + val (source, sink) = sourceSink() + val out = new DebugOutputStream + source connectIn in + sink connectOut out + val f = Future { + source.join() + sink.join() + } + Await.result(f, Duration(1, SECONDS)) + assert(in.closed == true) + assert(out.closed == true) + assert(source.isReleased == true) + assert(sink.isReleased == true) + } + + // PipeSource and PipeSink must release resources when interrupted during waiting for source.take() + @Test + def sourceInterrupted() { + val (source, sink) = sourceSink() + val out = new DebugOutputStream + sink connectOut out + val f = Future { + sink.ensureRunloopStarted() + source.release() + sink.release() + } + Await.result(f, Duration(1, SECONDS)) + assert(out.closed == true) + assert(source.isReleased == true) + assert(sink.isReleased == true) + } + + // PipeSource and PipeSink must release resources when interrupted during waiting for sink.take() + @Test + def sinkInterrupted() { + val in = new DebugInputStream("aaa") + val (source, sink) = sourceSink() + source connectIn in + val f = Future { + source.ensureRunloopStarted() + source.release() + sink.release() + } + Await.result(f, Duration(1, SECONDS)) + assert(in.closed == true) + assert(source.isReleased == true) + assert(sink.isReleased == true) + } + + // PipeSource and PipeSink must release resources when interrupted during copy streams" + @Test + def runloopInterrupted() { + val in = new DebugInfinityInputStream + val (source, sink) = sourceSink() + val out = new DebugOutputStream + source connectIn in + sink connectOut out + val f = Future { + source.ensureRunloopStarted() + sink.ensureRunloopStarted() + source.release() + sink.release() + } + Await.result(f, Duration(1, SECONDS)) + assert(in.closed == true) + assert(out.closed == true) + assert(source.isReleased == true) + assert(sink.isReleased == true) + } +} diff --git a/test/junit/scala/tools/nsc/backend/jvm/BTypesTest.scala b/test/junit/scala/tools/nsc/backend/jvm/BTypesTest.scala index 6ada0e20fb..8b8e2b36de 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/BTypesTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/BTypesTest.scala @@ -12,7 +12,7 @@ import scala.tools.testing.ClearAfterClass object BTypesTest extends ClearAfterClass.Clearable { var compiler = { - val comp = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:l:none") + val comp = newCompiler(extraArgs = "-Yopt:l:none") new comp.Run() // initializes some of the compiler comp.exitingDelambdafy(comp.scalaPrimitives.init()) // needed: it's only done when running the backend, and we don't actually run the compiler comp.exitingDelambdafy(comp.genBCode.bTypes.initializeCoreBTypes()) diff --git a/test/junit/scala/tools/nsc/backend/jvm/CodeGenTools.scala b/test/junit/scala/tools/nsc/backend/jvm/CodeGenTools.scala index ee9580c1c3..fe43ed2f6a 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/CodeGenTools.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/CodeGenTools.scala @@ -48,11 +48,13 @@ object CodeGenTools { resetOutput(compiler) compiler } - + def newCompilerWithoutVirtualOutdir(defaultArgs: String = "-usejavacp", extraArgs: String = ""): Global = { - val settings = new Settings() + def showError(s: String) = throw new Exception(s) + val settings = new Settings(showError) val args = (CommandLineParser tokenize defaultArgs) ++ (CommandLineParser tokenize extraArgs) - settings.processArguments(args, processAll = true) + val (_, nonSettingsArgs) = settings.processArguments(args, processAll = true) + if (nonSettingsArgs.nonEmpty) showError("invalid compiler flags: " + nonSettingsArgs.mkString(" ")) new Global(settings, new StoreReporter) } @@ -93,6 +95,23 @@ object CodeGenTools { getGeneratedClassfiles(compiler.settings.outputDirs.getSingleOutput.get) } + def compileTransformed(compiler: Global)(scalaCode: String, javaCode: List[(String, String)] = Nil, beforeBackend: compiler.Tree => compiler.Tree): List[(String, Array[Byte])] = { + compiler.settings.stopBefore.value = "jvm" :: Nil + val run = newRun(compiler) + import compiler._ + val scalaUnit = newCompilationUnit(scalaCode, "unitTestSource.scala") + val javaUnits = javaCode.map(p => newCompilationUnit(p._1, p._2)) + val units = scalaUnit :: javaUnits + run.compileUnits(units, run.parserPhase) + compiler.settings.stopBefore.value = Nil + scalaUnit.body = beforeBackend(scalaUnit.body) + checkReport(compiler, _ => false) + val run1 = newRun(compiler) + run1.compileUnits(units, run1.phaseNamed("jvm")) + checkReport(compiler, _ => false) + getGeneratedClassfiles(compiler.settings.outputDirs.getSingleOutput.get) + } + /** * Compile multiple Scala files separately into a single output directory. * @@ -145,13 +164,54 @@ object CodeGenTools { convertMethod(m) } + def assertSameCode(method: Method, expected: List[Instruction]): Unit = assertSameCode(method.instructions.dropNonOp, expected) def assertSameCode(actual: List[Instruction], expected: List[Instruction]): Unit = { - assertTrue(s"\nExpected: $expected\nActual : $actual", actual === expected) + assert(actual === expected, s"\nExpected: $expected\nActual : $actual") + } + + def assertSameSummary(method: Method, expected: List[Any]): Unit = assertSameSummary(method.instructions, expected) + def assertSameSummary(actual: List[Instruction], expected: List[Any]): Unit = { + def expectedString = expected.map({ + case s: String => s""""$s"""" + case i: Int => opcodeToString(i, i) + }).mkString("List(", ", ", ")") + assert(actual.summary == expected, s"\nFound : ${actual.summaryText}\nExpected: $expectedString") + } + + def assertNoInvoke(m: Method): Unit = assertNoInvoke(m.instructions) + def assertNoInvoke(ins: List[Instruction]): Unit = { + assert(!ins.exists(_.isInstanceOf[Invoke]), ins.stringLines) + } + + def assertInvoke(m: Method, receiver: String, method: String): Unit = assertInvoke(m.instructions, receiver, method) + def assertInvoke(l: List[Instruction], receiver: String, method: String): Unit = { + assert(l.exists { + case Invoke(_, `receiver`, `method`, _, _) => true + case _ => false + }, l.stringLines) + } + + def assertDoesNotInvoke(m: Method, method: String): Unit = assertDoesNotInvoke(m.instructions, method) + def assertDoesNotInvoke(l: List[Instruction], method: String): Unit = { + assert(!l.exists { + case i: Invoke => i.name == method + case _ => false + }, l.stringLines) + } + + def assertInvokedMethods(m: Method, expected: List[String]): Unit = assertInvokedMethods(m.instructions, expected) + def assertInvokedMethods(l: List[Instruction], expected: List[String]): Unit = { + def quote(l: List[String]) = l.map(s => s""""$s"""").mkString("List(", ", ", ")") + val actual = l collect { case i: Invoke => i.owner + "." + i.name } + assert(actual == expected, s"\nFound : ${quote(actual)}\nExpected: ${quote(expected)}") } def getSingleMethod(classNode: ClassNode, name: String): Method = convertMethod(classNode.methods.asScala.toList.find(_.name == name).get) + def findAsmMethods(c: ClassNode, p: String => Boolean) = c.methods.iterator.asScala.filter(m => p(m.name)).toList.sortBy(_.name) + def findAsmMethod(c: ClassNode, name: String) = findAsmMethods(c, _ == name).head + /** * Instructions that match `query` when textified. * If `query` starts with a `+`, the next instruction is returned. @@ -159,7 +219,7 @@ object CodeGenTools { def findInstr(method: MethodNode, query: String): List[AbstractInsnNode] = { val useNext = query(0) == '+' val instrPart = if (useNext) query.drop(1) else query - val insns = method.instructions.iterator.asScala.find(i => textify(i) contains instrPart).toList + val insns = method.instructions.iterator.asScala.filter(i => textify(i) contains instrPart).toList if (useNext) insns.map(_.getNext) else insns } @@ -175,4 +235,8 @@ object CodeGenTools { implicit class MortalInstruction(val ins: Instruction) extends AnyVal { def dead: (Instruction, Boolean) = (ins, false) } + + implicit class listStringLines[T](val l: List[T]) extends AnyVal { + def stringLines = l.mkString("\n") + } } diff --git a/test/junit/scala/tools/nsc/backend/jvm/DefaultMethodTest.scala b/test/junit/scala/tools/nsc/backend/jvm/DefaultMethodTest.scala new file mode 100644 index 0000000000..2ce9d21331 --- /dev/null +++ b/test/junit/scala/tools/nsc/backend/jvm/DefaultMethodTest.scala @@ -0,0 +1,43 @@ +package scala.tools.nsc.backend.jvm + +import org.junit.Assert._ +import org.junit.Test + +import scala.collection.JavaConverters +import scala.tools.asm.Opcodes +import scala.tools.asm.tree.ClassNode +import scala.tools.nsc.backend.jvm.CodeGenTools._ +import JavaConverters._ +import scala.tools.testing.ClearAfterClass + +object DefaultMethodTest extends ClearAfterClass.Clearable { + var compiler = newCompiler() + def clear(): Unit = { compiler = null } +} + +class DefaultMethodTest extends ClearAfterClass { + ClearAfterClass.stateToClear = DefaultMethodTest + val compiler = DefaultMethodTest.compiler + + @Test + def defaultMethodsViaGenBCode(): Unit = { + import compiler._ + val code = "package pack { trait T { def foo: Int }}" + object makeFooDefaultMethod extends Transformer { + val Foo = TermName("foo") + /** Transforms a single tree. */ + override def transform(tree: compiler.Tree): compiler.Tree = tree match { + case dd @ DefDef(_, Foo, _, _, _, _) => + dd.symbol.setFlag(reflect.internal.Flags.JAVA_DEFAULTMETHOD) + copyDefDef(dd)(rhs = Literal(Constant(1)).setType(definitions.IntTpe)) + case _ => super.transform(tree) + } + } + val asmClasses: List[ClassNode] = readAsmClasses(compileTransformed(compiler)(code, Nil, makeFooDefaultMethod.transform(_))) + val foo = asmClasses.head.methods.iterator.asScala.toList.last + assertTrue("default method should not be abstract", (foo.access & Opcodes.ACC_ABSTRACT) == 0) + assertTrue("default method body emitted", foo.instructions.size() > 0) + } + + +} diff --git a/test/junit/scala/tools/nsc/backend/jvm/DirectCompileTest.scala b/test/junit/scala/tools/nsc/backend/jvm/DirectCompileTest.scala index 240d3523f1..0cdc6ead10 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/DirectCompileTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/DirectCompileTest.scala @@ -10,7 +10,7 @@ import scala.tools.partest.ASMConverters._ import scala.tools.testing.ClearAfterClass object DirectCompileTest extends ClearAfterClass.Clearable { - var compiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:l:method") + var compiler = newCompiler(extraArgs = "-Yopt:l:method") def clear(): Unit = { compiler = null } } diff --git a/test/junit/scala/tools/nsc/backend/jvm/IndyLambdaTest.scala b/test/junit/scala/tools/nsc/backend/jvm/IndyLambdaTest.scala new file mode 100644 index 0000000000..d29f6b0a13 --- /dev/null +++ b/test/junit/scala/tools/nsc/backend/jvm/IndyLambdaTest.scala @@ -0,0 +1,74 @@ +package scala.tools.nsc.backend.jvm + +import org.junit.Assert._ +import org.junit.{Assert, Test} + +import scala.tools.asm.{Handle, Opcodes} +import scala.tools.asm.tree.InvokeDynamicInsnNode +import scala.tools.nsc.backend.jvm.AsmUtils._ +import scala.tools.nsc.backend.jvm.CodeGenTools._ +import scala.tools.testing.ClearAfterClass +import scala.collection.JavaConverters._ + +object IndyLambdaTest extends ClearAfterClass.Clearable { + var compiler = newCompiler() + + def clear(): Unit = { + compiler = null + } +} + +class IndyLambdaTest extends ClearAfterClass { + ClearAfterClass.stateToClear = IndyLambdaTest + val compiler = IndyLambdaTest.compiler + + @Test def boxingBridgeMethodUsedSelectively(): Unit = { + def implMethodDescriptorFor(code: String): String = { + val method = compileMethods(compiler)(s"""def f = $code """).find(_.name == "f").get + val x = method.instructions.iterator.asScala.toList + x.flatMap { + case insn : InvokeDynamicInsnNode => insn.bsmArgs.collect { case h : Handle => h.getDesc } + case _ => Nil + }.head + } + + val obj = "Ljava/lang/Object;" + val str = "Ljava/lang/String;" + + // unspecialized functions that have a primitive in parameter or return position + // give rise to a "boxing bridge" method (which has the suffix `$adapted`). + // This is because Scala's unboxing of null values gives zero, whereas Java's throw a NPE. + + // 1. Here we show that we are calling the boxing bridge (the lambda bodies here are compiled into + // methods of `(I)Ljava/lang/Object;` / `(I)Ljava/lang/Object;` respectively.) + assertEquals(s"($obj)$obj", implMethodDescriptorFor("(x: Int) => new Object")) + assertEquals(s"($obj)$obj", implMethodDescriptorFor("(x: Object) => 0")) + + // 2a. We don't need such adaptations for parameters or return values with types that differ + // from Object due to other generic substitution, LambdaMetafactory will downcast the arguments. + assertEquals(s"($str)$str", implMethodDescriptorFor("(x: String) => x")) + + // 2b. Testing 2a. in combination with 1. + assertEquals(s"($obj)$str", implMethodDescriptorFor("(x: Int) => \"\"")) + assertEquals(s"($str)$obj", implMethodDescriptorFor("(x: String) => 0")) + + // 3. Specialized functions, don't need any of this as they implement a method like `apply$mcII$sp`, + // and the (un)boxing is handled in the base class in code emitted by scalac. + assertEquals("(I)I", implMethodDescriptorFor("(x: Int) => x")) + + // non-builtin sams are like specialized functions + compileClasses(compiler)("class VC(private val i: Int) extends AnyVal; trait FunVC { def apply(a: VC): VC }") + assertEquals("(I)I", implMethodDescriptorFor("((x: VC) => x): FunVC")) + + compileClasses(compiler)("trait Fun1[T, U] { def apply(a: T): U }") + assertEquals(s"($obj)$str", implMethodDescriptorFor("(x => x.toString): Fun1[Int, String]")) + assertEquals(s"($obj)$obj", implMethodDescriptorFor("(x => println(x)): Fun1[Int, Unit]")) + assertEquals(s"($obj)$str", implMethodDescriptorFor("((x: VC) => \"\") : Fun1[VC, String]")) + assertEquals(s"($str)$obj", implMethodDescriptorFor("((x: String) => new VC(0)) : Fun1[String, VC]")) + + compileClasses(compiler)("trait Coll[A, Repr] extends Any") + compileClasses(compiler)("final class ofInt(val repr: Array[Int]) extends AnyVal with Coll[Int, Array[Int]]") + + assertEquals(s"([I)$obj", implMethodDescriptorFor("((xs: Array[Int]) => new ofInt(xs)): Array[Int] => Coll[Int, Array[Int]]")) + } +} diff --git a/test/junit/scala/tools/nsc/backend/jvm/IndySammyTest.scala b/test/junit/scala/tools/nsc/backend/jvm/IndySammyTest.scala new file mode 100644 index 0000000000..b9e45a7dc9 --- /dev/null +++ b/test/junit/scala/tools/nsc/backend/jvm/IndySammyTest.scala @@ -0,0 +1,160 @@ +package scala.tools.nsc +package backend.jvm + +import org.junit.Assert.assertEquals +import org.junit.runner.RunWith +import org.junit.runners.JUnit4 +import org.junit.Test + +import scala.tools.asm.Opcodes._ +import scala.tools.asm.tree._ +import scala.tools.nsc.reporters.StoreReporter +import CodeGenTools._ +import scala.tools.partest.ASMConverters +import ASMConverters._ + +import scala.tools.testing.ClearAfterClass + +object IndySammyTest extends ClearAfterClass.Clearable { + var _compiler = newCompiler() + + def compile(scalaCode: String, javaCode: List[(String, String)] = Nil, allowMessage: StoreReporter#Info => Boolean = _ => false): List[ClassNode] = + compileClasses(_compiler)(scalaCode, javaCode, allowMessage) + + def clear(): Unit = { _compiler = null } +} + +@RunWith(classOf[JUnit4]) +class IndySammyTest extends ClearAfterClass { + ClearAfterClass.stateToClear = IndySammyTest + import IndySammyTest._ + + val compiler = _compiler + + def funClassName(from: String, to: String) = s"Fun$from$to" + def classPrologue(from: String, to: String) = + "class VC(private val i: Int) extends AnyVal\n" + + s"trait ${funClassName(from, to)} { def apply(a: $from): $to}" + + def lamDef(from: String, to: String, body: String => String) = + s"""def lam = (x => ${body("x")}): ${funClassName(from, to)}""" + + def appDef(arg: String) = s"""def app = lam($arg)""" + + /* Create a lambda of type "$from => $to" (with body "$body(x)" if "x" is the argument name), + * and apply it to `arg`. + * + * Check: + * - the signature of the apply method + * - the instructions in the lambda's body (anonfun method) + * - the instructions used to create the argument for the application + * (and the return corresponding to the lambda's result type) + */ + def test(from: String, to: String, arg: String, body: String => String = x => x) + (expectedSig: String, lamBody: List[Instruction], appArgs: List[Instruction], ret: Instruction) + (allowMessage: StoreReporter#Info => Boolean = _ => false) = { + val cls = compile(s"${classPrologue(from, to)}") + val methodNodes = compileMethods(compiler)(lamDef(from, to, body) +";"+ appDef(arg), allowMessage) + + val applySig = cls.head.methods.get(0).desc + val anonfun = methodNodes.find(_.name contains "$anonfun$").map(convertMethod).get + val lamInsn = methodNodes.find(_.name == "lam").map(instructionsFromMethod).get.dropNonOp + val applyInvoke = methodNodes.find(_.name == "app").map(convertMethod).get + + assertEquals(expectedSig, applySig) + assert(lamInsn.length == 2 && lamInsn.head.isInstanceOf[InvokeDynamic], lamInsn) + assertSameCode(anonfun, lamBody) + assertSameCode(applyInvoke, List( + VarOp(ALOAD, 0), + Invoke(INVOKEVIRTUAL, "C", "lam", s"()L${funClassName(from, to)};", false)) ++ appArgs ++ List( + Invoke(INVOKEINTERFACE, funClassName(from, to), "apply", applySig, true), ret) + ) + } + +// def testSpecial(lam: String, lamTp: String, arg: String)(allowMessage: StoreReporter#Info => Boolean = _ => false) = { +// val cls = compile("trait Special[@specialized A] { def apply(a: A): A}" ) +// val methodNodes = compileMethods(compiler)(s"def lam : $lamTp = $lam" +";"+ appDef(arg), allowMessage) +// +// val anonfun = methodNodes.filter(_.name contains "$anonfun$").map(convertMethod) +// val lamInsn = methodNodes.find(_.name == "lam").map(instructionsFromMethod).get.dropNonOp +// val applyInvoke = methodNodes.find(_.name == "app").map(convertMethod).get +// +// assert(lamInsn.length == 2 && lamInsn.head.isInstanceOf[InvokeDynamic], lamInsn) +// assertSameCode(anonfun, lamBody) +// assertSameCode(applyInvoke, List( +// VarOp(ALOAD, 0), +// Invoke(INVOKEVIRTUAL, "C", "lam", s"()L${funClassName(from, to)};", false)) ++ appArgs ++ List( +// Invoke(INVOKEINTERFACE, funClassName(from, to), "apply", applySig, true), ret) +// ) +// } + + // x => x : VC => VC applied to VC(1) + @Test + def testVC_VC_VC = + test("VC", "VC", "new VC(1)")("(I)I", + List(VarOp(ILOAD, 0), Op(IRETURN)), + List(Op(ICONST_1)), + Op(IRETURN))() + + // x => new VC(x) : Int => VC applied to 1 + @Test + def testInt_VC_1 = + test("Int", "VC", "1", x => s"new VC($x)")("(I)I", + List(VarOp(ILOAD, 0), Op(IRETURN)), + List(Op(ICONST_1)), + Op(IRETURN))() + + // x => x : VC => Int applied to VC(1) + @Test + def testVC_Int_VC = + test("VC", "Int", "new VC(1)", x => "1")("(I)I", + List(Op(ICONST_1), Op(IRETURN)), + List(Op(ICONST_1)), + Op(IRETURN))() + + // x => new VC(1) : VC => Any applied to VC(1) + @Test + def testVC_Any_VC = + test("VC", "Any", "new VC(1)", x => s"new VC(1)")("(I)Ljava/lang/Object;", + List(TypeOp(NEW, "VC"), Op(DUP), Op(ICONST_1), Invoke(INVOKESPECIAL, "VC", "<init>", "(I)V", false), Op(ARETURN)), + List(Op(ICONST_1)), + Op(ARETURN))() + + + // x => x : VC => Unit applied to VC(1) + @Test + def testVC_Unit_VC = + test("VC", "Unit", "new VC(1)")("(I)V", + List(VarOp(ILOAD, 0), Op(POP), Op(RETURN)), + List(Op(ICONST_1)), + Op(RETURN))(allowMessage = _.msg.contains("pure expression")) + + // x => new VC(x.asInstanceOf[Int]) : Any => VC applied to 1 + // + // Scala: + // def lam = (x => new VC(x.asInstanceOf[Int])): FunAny_VC + // def app = lam(1) + // Java: + // FunAny_VC lam() { return x -> BoxesRunTime.unboxToInt((Object)x); } + // int app() { lam().apply(BoxesRunTime.boxToInteger((int)1)); + @Test + def testAny_VC_1 = + test("Any", "VC", "1", x => s"new VC($x.asInstanceOf[Int])")("(Ljava/lang/Object;)I", + List(VarOp(ALOAD, 0), Invoke(INVOKESTATIC, "scala/runtime/BoxesRunTime", "unboxToInt", "(Ljava/lang/Object;)I", false), Op(IRETURN)), + List(Op(ICONST_1), Invoke(INVOKESTATIC, "scala/runtime/BoxesRunTime", "boxToInteger", "(I)Ljava/lang/Integer;", false)), + Op(IRETURN))() + + // TODO + // x => x : Special[Int] applied to 1 +// @Test +// def testSpecial_Int_1 = +// testSpecial("x => x", "Special[Int]", "1")() + + + // Tests ThisReferringMethodsTraverser + @Test + def testStaticIfNoThisReference: Unit = { + val methodNodes = compileMethods(compiler)("def foo = () => () => () => 42") + methodNodes.forall(m => !m.name.contains("anonfun") || (m.access & ACC_STATIC) == ACC_STATIC) + } +} diff --git a/test/junit/scala/tools/nsc/backend/jvm/StringConcatTest.scala b/test/junit/scala/tools/nsc/backend/jvm/StringConcatTest.scala new file mode 100644 index 0000000000..2a9b8f7198 --- /dev/null +++ b/test/junit/scala/tools/nsc/backend/jvm/StringConcatTest.scala @@ -0,0 +1,133 @@ +package scala.tools.nsc +package backend.jvm + +import org.junit.runner.RunWith +import org.junit.runners.JUnit4 +import org.junit.Test +import scala.tools.asm.Opcodes._ +import org.junit.Assert._ + +import scala.tools.testing.AssertUtil._ + +import CodeGenTools._ +import scala.tools.partest.ASMConverters +import ASMConverters._ +import scala.tools.testing.ClearAfterClass + +object StringConcatTest extends ClearAfterClass.Clearable { + var compiler = newCompiler() + def clear(): Unit = { compiler = null } +} + +@RunWith(classOf[JUnit4]) +class StringConcatTest extends ClearAfterClass { + ClearAfterClass.stateToClear = StringConcatTest + val compiler = StringConcatTest.compiler + + @Test + def appendOverloadNoBoxing(): Unit = { + val code = + """class C { + | def t1( + | v: Unit, + | z: Boolean, + | c: Char, + | b: Byte, + | s: Short, + | i: Int, + | l: Long, + | f: Float, + | d: Double, + | str: String, + | sbuf: java.lang.StringBuffer, + | chsq: java.lang.CharSequence, + | chrs: Array[Char]) = str + this + v + z + c + b + s + i + f + l + d + sbuf + chsq + chrs + | + | // similar, but starting off with any2stringadd + | def t2( + | v: Unit, + | z: Boolean, + | c: Char, + | b: Byte, + | s: Short, + | i: Int, + | l: Long, + | f: Float, + | d: Double, + | str: String, + | sbuf: java.lang.StringBuffer, + | chsq: java.lang.CharSequence, + | chrs: Array[Char]) = this + str + v + z + c + b + s + i + f + l + d + sbuf + chsq + chrs + |} + """.stripMargin + val List(c) = compileClasses(compiler)(code) + + def invokeNameDesc(m: String): List[String] = getSingleMethod(c, m).instructions collect { + case Invoke(_, _, name, desc, _) => name + desc + } + assertEquals(invokeNameDesc("t1"), List( + "<init>()V", + "append(Ljava/lang/String;)Ljava/lang/StringBuilder;", + "append(Ljava/lang/Object;)Ljava/lang/StringBuilder;", + "append(Ljava/lang/Object;)Ljava/lang/StringBuilder;", + "append(Z)Ljava/lang/StringBuilder;", + "append(C)Ljava/lang/StringBuilder;", + "append(I)Ljava/lang/StringBuilder;", + "append(I)Ljava/lang/StringBuilder;", + "append(I)Ljava/lang/StringBuilder;", + "append(F)Ljava/lang/StringBuilder;", + "append(J)Ljava/lang/StringBuilder;", + "append(D)Ljava/lang/StringBuilder;", + "append(Ljava/lang/StringBuffer;)Ljava/lang/StringBuilder;", + "append(Ljava/lang/CharSequence;)Ljava/lang/StringBuilder;", + "append(Ljava/lang/Object;)Ljava/lang/StringBuilder;", // test that we're not using the [C overload + "toString()Ljava/lang/String;")) + + assertEquals(invokeNameDesc("t2"), List( + "<init>()V", + "any2stringadd(Ljava/lang/Object;)Ljava/lang/Object;", + "$plus$extension(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/String;", + "append(Ljava/lang/String;)Ljava/lang/StringBuilder;", + "append(Ljava/lang/Object;)Ljava/lang/StringBuilder;", + "append(Z)Ljava/lang/StringBuilder;", + "append(C)Ljava/lang/StringBuilder;", + "append(I)Ljava/lang/StringBuilder;", + "append(I)Ljava/lang/StringBuilder;", + "append(I)Ljava/lang/StringBuilder;", + "append(F)Ljava/lang/StringBuilder;", + "append(J)Ljava/lang/StringBuilder;", + "append(D)Ljava/lang/StringBuilder;", + "append(Ljava/lang/StringBuffer;)Ljava/lang/StringBuilder;", + "append(Ljava/lang/CharSequence;)Ljava/lang/StringBuilder;", + "append(Ljava/lang/Object;)Ljava/lang/StringBuilder;", // test that we're not using the [C overload + "toString()Ljava/lang/String;")) + } + + @Test + def concatPrimitiveCorrectness(): Unit = { + val obj: Object = new { override def toString = "TTT" } + def t( + v: Unit, + z: Boolean, + c: Char, + b: Byte, + s: Short, + i: Int, + l: Long, + f: Float, + d: Double, + str: String, + sbuf: java.lang.StringBuffer, + chsq: java.lang.CharSequence, + chrs: Array[Char]) = { + val s1 = str + obj + v + z + c + b + s + i + f + l + d + sbuf + chsq + chrs + val s2 = obj + str + v + z + c + b + s + i + f + l + d + sbuf + chsq + chrs + s1 + "//" + s2 + } + def sbuf = { val r = new java.lang.StringBuffer(); r.append("sbuf"); r } + def chsq: java.lang.CharSequence = "chsq" + val s = t((), true, 'd', 3: Byte, 12: Short, 3, -32l, 12.3f, -4.2d, "me", sbuf, chsq, Array('a', 'b')) + val r = s.replaceAll("""\[C@\w+""", "<ARRAY>") + assertEquals(r, "meTTT()trued312312.3-32-4.2sbufchsq<ARRAY>//TTTme()trued312312.3-32-4.2sbufchsq<ARRAY>") + } +} diff --git a/test/junit/scala/tools/nsc/backend/jvm/analysis/NullnessAnalyzerTest.scala b/test/junit/scala/tools/nsc/backend/jvm/analysis/NullnessAnalyzerTest.scala index 94e776aadb..ab05c15e85 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/analysis/NullnessAnalyzerTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/analysis/NullnessAnalyzerTest.scala @@ -20,7 +20,7 @@ import AsmUtils._ import scala.collection.convert.decorateAsScala._ object NullnessAnalyzerTest extends ClearAfterClass.Clearable { - var noOptCompiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:l:none") + var noOptCompiler = newCompiler(extraArgs = "-Yopt:l:none") def clear(): Unit = { noOptCompiler = null @@ -31,25 +31,22 @@ object NullnessAnalyzerTest extends ClearAfterClass.Clearable { class NullnessAnalyzerTest extends ClearAfterClass { ClearAfterClass.stateToClear = NullnessAnalyzerTest val noOptCompiler = NullnessAnalyzerTest.noOptCompiler + import noOptCompiler.genBCode.bTypes.backendUtils._ - def newNullnessAnalyzer(methodNode: MethodNode, classInternalName: InternalName = "C"): NullnessAnalyzer = { - val nullnessAnalyzer = new NullnessAnalyzer - nullnessAnalyzer.analyze(classInternalName, methodNode) - nullnessAnalyzer - } + def newNullnessAnalyzer(methodNode: MethodNode, classInternalName: InternalName = "C") = new AsmAnalyzer(methodNode, classInternalName, new NullnessAnalyzer(noOptCompiler.genBCode.bTypes)) - def testNullness(analyzer: NullnessAnalyzer, method: MethodNode, query: String, index: Int, nullness: Nullness): Unit = { + def testNullness(analyzer: AsmAnalyzer[NullnessValue], method: MethodNode, query: String, index: Int, nullness: NullnessValue): Unit = { for (i <- findInstr(method, query)) { - val r = analyzer.frameAt(i, method).getValue(index).nullness + val r = analyzer.frameAt(i).getValue(index) assertTrue(s"Expected: $nullness, found: $r. At instr ${textify(i)}", nullness == r) } } // debug / helper for writing tests - def showAllNullnessFrames(analyzer: NullnessAnalyzer, method: MethodNode): String = { + def showAllNullnessFrames(analyzer: AsmAnalyzer[NullnessValue], method: MethodNode): String = { val instrLength = method.instructions.iterator.asScala.map(textify(_).length).max val lines = for (i <- method.instructions.iterator.asScala) yield { - val f = analyzer.frameAt(i, method) + val f = analyzer.frameAt(i) val frameString = { if (f == null) "null" else (0 until (f.getLocals + f.getStackSize)).iterator @@ -71,12 +68,13 @@ class NullnessAnalyzerTest extends ClearAfterClass { // So in the frame for `ALOAD 0`, the stack is still empty. val res = - """ L0: 0: NotNull - | LINENUMBER 1 L0: 0: NotNull - | ALOAD 0: 0: NotNull - |INVOKEVIRTUAL java/lang/Object.toString ()Ljava/lang/String;: 0: NotNull, 1: NotNull - | ARETURN: 0: NotNull, 1: Unknown1 - | L0: null""".stripMargin + """ L0: 0: NotNull + | LINENUMBER 1 L0: 0: NotNull + | ALOAD 0: 0: NotNull + |INVOKEVIRTUAL C.toString ()Ljava/lang/String;: 0: NotNull, 1: NotNull + | ARETURN: 0: NotNull, 1: Unknown1 + | L0: null""".stripMargin +// println(showAllNullnessFrames(newNullnessAnalyzer(m), m)) assertEquals(showAllNullnessFrames(newNullnessAnalyzer(m), m), res) } @@ -84,15 +82,15 @@ class NullnessAnalyzerTest extends ClearAfterClass { def thisNonNull(): Unit = { val List(m) = compileMethods(noOptCompiler)("def f = this.toString") val a = newNullnessAnalyzer(m) - testNullness(a, m, "ALOAD 0", 0, NotNull) + testNullness(a, m, "ALOAD 0", 0, NotNullValue) } @Test def instanceMethodCall(): Unit = { val List(m) = compileMethods(noOptCompiler)("def f(a: String) = a.trim") val a = newNullnessAnalyzer(m) - testNullness(a, m, "INVOKEVIRTUAL java/lang/String.trim", 1, Unknown) - testNullness(a, m, "ARETURN", 1, NotNull) + testNullness(a, m, "INVOKEVIRTUAL java/lang/String.trim", 1, UnknownValue1) + testNullness(a, m, "ARETURN", 1, NotNullValue) } @Test @@ -110,13 +108,13 @@ class NullnessAnalyzerTest extends ClearAfterClass { // ARETURN: 0: NotNull, 1: NotNull, 2: Unknown for ((insn, index, nullness) <- List( - ("+NEW", 2, Unknown), // new value at slot 2 on the stack - ("+DUP", 3, Unknown), - ("+INVOKESPECIAL java/lang/Object", 2, NotNull), // after calling the initializer on 3, the value at 2 becomes NotNull - ("ASTORE 1", 1, Unknown), // before the ASTORE 1, nullness of the value in local 1 is Unknown - ("+ASTORE 1", 1, NotNull), // after storing the value at 2 in local 1, the local 1 is NotNull - ("+ALOAD 1", 2, NotNull), // loading the value 1 puts a NotNull value on the stack (at 2) - ("+INVOKEVIRTUAL java/lang/Object.toString", 2, Unknown) // nullness of value returned by `toString` is Unknown + ("+NEW", 2, UnknownValue1), // new value at slot 2 on the stack + ("+DUP", 3, UnknownValue1), + ("+INVOKESPECIAL java/lang/Object", 2, NotNullValue), // after calling the initializer on 3, the value at 2 becomes NotNull + ("ASTORE 1", 1, UnknownValue1), // before the ASTORE 1, nullness of the value in local 1 is Unknown + ("+ASTORE 1", 1, NotNullValue), // after storing the value at 2 in local 1, the local 1 is NotNull + ("+ALOAD 1", 2, NotNullValue), // loading the value 1 puts a NotNull value on the stack (at 2) + ("+INVOKEVIRTUAL java/lang/Object.toString", 2, UnknownValue1) // nullness of value returned by `toString` is Unknown )) testNullness(a, m, insn, index, nullness) } @@ -125,9 +123,9 @@ class NullnessAnalyzerTest extends ClearAfterClass { val List(m) = compileMethods(noOptCompiler)("def f = { var a: Object = null; a }") val a = newNullnessAnalyzer(m) for ((insn, index, nullness) <- List( - ("+ACONST_NULL", 2, Null), - ("+ASTORE 1", 1, Null), - ("+ALOAD 1", 2, Null) + ("+ACONST_NULL", 2, NullValue), + ("+ASTORE 1", 1, NullValue), + ("+ALOAD 1", 2, NullValue) )) testNullness(a, m, insn, index, nullness) } @@ -135,15 +133,33 @@ class NullnessAnalyzerTest extends ClearAfterClass { def stringLiteralsNotNull(): Unit = { val List(m) = compileMethods(noOptCompiler)("""def f = { val a = "hi"; a.trim }""") val a = newNullnessAnalyzer(m) - testNullness(a, m, "+ASTORE 1", 1, NotNull) + testNullness(a, m, "+ASTORE 1", 1, NotNullValue) } @Test def newArraynotNull() { val List(m) = compileMethods(noOptCompiler)("def f = { val a = new Array[Int](2); a(0) }") val a = newNullnessAnalyzer(m) - testNullness(a, m, "+NEWARRAY T_INT", 2, NotNull) // new array on stack - testNullness(a, m, "+ASTORE 1", 1, NotNull) // local var (a) + testNullness(a, m, "+NEWARRAY T_INT", 2, NotNullValue) // new array on stack + testNullness(a, m, "+ASTORE 1", 1, NotNullValue) // local var (a) + } + + @Test + def mergeNullNotNull(): Unit = { + val code = + """def f(o: Object) = { + | var a: Object = o + | var c: Object = null + | if ("".trim eq "-") { + | c = o + | } + | a.toString + |} + """.stripMargin + val List(m) = compileMethods(noOptCompiler)(code) + val a = newNullnessAnalyzer(m) + val toSt = "+INVOKEVIRTUAL java/lang/Object.toString" + testNullness(a, m, toSt, 3, UnknownValue1) } @Test @@ -173,22 +189,22 @@ class NullnessAnalyzerTest extends ClearAfterClass { val toSt = "INVOKEVIRTUAL java/lang/Object.toString" val end = s"+$toSt" for ((insn, index, nullness) <- List( - (trim, 0, NotNull), // this - (trim, 1, Unknown), // parameter o - (trim, 2, Unknown), // a - (trim, 3, Null), // b - (trim, 4, Null), // c - (trim, 5, Unknown), // d - - (toSt, 2, Unknown), // a, still the same - (toSt, 3, Unknown), // b, was re-assinged in both branches to Unknown - (toSt, 4, Unknown), // c, was re-assigned in one branch to Unknown - (toSt, 5, Null), // d, was assigned to null in both branches - - (end, 2, NotNull), // a, NotNull (alias of b) - (end, 3, NotNull), // b, receiver of toString - (end, 4, Unknown), // c, no change (not an alias of b) - (end, 5, Null) // d, no change + (trim, 0, NotNullValue), // this + (trim, 1, UnknownValue1), // parameter o + (trim, 2, UnknownValue1), // a + (trim, 3, NullValue), // b + (trim, 4, NullValue), // c + (trim, 5, UnknownValue1), // d + + (toSt, 2, UnknownValue1), // a, still the same + (toSt, 3, UnknownValue1), // b, was re-assinged in both branches to Unknown + (toSt, 4, UnknownValue1), // c, was re-assigned in one branch to Unknown + (toSt, 5, NullValue), // d, was assigned to null in both branches + + (end, 2, NotNullValue), // a, NotNull (alias of b) + (end, 3, NotNullValue), // b, receiver of toString + (end, 4, UnknownValue1), // c, no change (not an alias of b) + (end, 5, NullValue) // d, no change )) testNullness(a, m, insn, index, nullness) } @@ -210,11 +226,11 @@ class NullnessAnalyzerTest extends ClearAfterClass { val trim = "INVOKEVIRTUAL java/lang/String.trim" for ((insn, index, nullness) <- List( - (instof, 1, Unknown), // a after INSTANCEOF - (instof, 2, Unknown), // x after INSTANCEOF - (tost, 1, NotNull), - (tost, 2, NotNull), - (trim, 3, NotNull) // receiver at `trim` + (instof, 1, UnknownValue1), // a after INSTANCEOF + (instof, 2, UnknownValue1), // x after INSTANCEOF + (tost, 1, NotNullValue), + (tost, 2, NotNullValue), + (trim, 3, NotNullValue) // receiver at `trim` )) testNullness(a, m, insn, index, nullness) } } diff --git a/test/junit/scala/tools/nsc/backend/jvm/analysis/ProdConsAnalyzerTest.scala b/test/junit/scala/tools/nsc/backend/jvm/analysis/ProdConsAnalyzerTest.scala index 941a167114..d54b8ac563 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/analysis/ProdConsAnalyzerTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/analysis/ProdConsAnalyzerTest.scala @@ -15,7 +15,7 @@ import CodeGenTools._ import AsmUtils._ object ProdConsAnalyzerTest extends ClearAfterClass.Clearable { - var noOptCompiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:l:none") + var noOptCompiler = newCompiler(extraArgs = "-Yopt:l:none") def clear(): Unit = { noOptCompiler = null @@ -26,6 +26,7 @@ object ProdConsAnalyzerTest extends ClearAfterClass.Clearable { class ProdConsAnalyzerTest extends ClearAfterClass { ClearAfterClass.stateToClear = ProdConsAnalyzerTest val noOptCompiler = ProdConsAnalyzerTest.noOptCompiler + import noOptCompiler.genBCode.bTypes.backendUtils._ def prodToString(producer: AbstractInsnNode) = producer match { case p: InitialProducer => p.toString diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/AnalyzerTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/AnalyzerTest.scala new file mode 100644 index 0000000000..11014f5e64 --- /dev/null +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/AnalyzerTest.scala @@ -0,0 +1,63 @@ +package scala.tools.nsc +package backend.jvm +package opt + +import org.junit.runner.RunWith +import org.junit.runners.JUnit4 +import org.junit.Test +import org.junit.Assert._ + +import scala.tools.asm.tree._ +import scala.tools.asm.tree.analysis._ +import scala.tools.nsc.backend.jvm.analysis.{AliasingFrame, AliasingAnalyzer} + +import CodeGenTools._ +import scala.tools.partest.ASMConverters +import ASMConverters._ +import AsmUtils._ +import BackendReporting._ +import BytecodeUtils._ + +import scala.collection.convert.decorateAsScala._ +import scala.tools.testing.ClearAfterClass + +object AnalyzerTest extends ClearAfterClass.Clearable { + var noOptCompiler = newCompiler(extraArgs = "-Yopt:l:none") + def clear(): Unit = { noOptCompiler = null } +} + +@RunWith(classOf[JUnit4]) +class AnalyzerTest extends ClearAfterClass { + ClearAfterClass.stateToClear = AnalyzerTest + val noOptCompiler = AnalyzerTest.noOptCompiler + + @Test + def aliasingOfPrimitives(): Unit = { + val code = + """class C { + | def f(a: Int, b: Long) = { + | val c = a - b // a is converted with i2l + | val d = c + | val e = a + | // locals: 0 this -- 1 a -- 2-3 b -- 4-5 c -- 6-7 d -- 8 e + | e + d // e is converted with i2l + | } + |} + """.stripMargin + + val List(c) = compileClasses(noOptCompiler)(code) + val a = new AliasingAnalyzer(new BasicInterpreter) + val f = findAsmMethod(c, "f") + a.analyze("C", f) + + val List(_, i2l) = findInstr(f, "I2L") + val aliasesAtI2l = a.frameAt(i2l, f).asInstanceOf[AliasingFrame[_]].aliases + assertEquals(aliasesAtI2l(1).iterator.toList, List(1, 8, 9)) // a, e and stack top + assertEquals(aliasesAtI2l(4).iterator.toList, List(4, 6)) + + val List(add) = findInstr(f, "LADD") + val aliasesAtAdd = a.frameAt(add, f).asInstanceOf[AliasingFrame[_]].aliases + assertEquals(aliasesAtAdd(1).iterator.toList, List(1, 8)) // after i2l the value on the stack is no longer an alias + assertEquals(aliasesAtAdd(4).iterator.toList, List(4, 6, 10)) // c, d and stack top + } +} diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/BTypesFromClassfileTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/BTypesFromClassfileTest.scala index 1b6c080234..9e6a148dba 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/BTypesFromClassfileTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/BTypesFromClassfileTest.scala @@ -22,7 +22,7 @@ import scala.collection.convert.decorateAsScala._ @RunWith(classOf[JUnit4]) class BTypesFromClassfileTest { // inliner enabled -> inlineInfos are collected (and compared) in ClassBTypes - val compiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:inline-global") + val compiler = newCompiler(extraArgs = "-Yopt:inline-global") import compiler._ import definitions._ diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/CallGraphTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/CallGraphTest.scala index 9fda034a04..b37b5efa7e 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/CallGraphTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/CallGraphTest.scala @@ -6,6 +6,7 @@ import org.junit.runner.RunWith import org.junit.runners.JUnit4 import org.junit.Test import scala.collection.generic.Clearable +import scala.collection.immutable.IntMap import scala.tools.asm.Opcodes._ import org.junit.Assert._ @@ -21,25 +22,56 @@ import AsmUtils._ import BackendReporting._ import scala.collection.convert.decorateAsScala._ +import scala.tools.testing.ClearAfterClass -@RunWith(classOf[JUnit4]) -class CallGraphTest { - val compiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:inline-global -Yopt-warnings") - import compiler.genBCode.bTypes._ +object CallGraphTest extends ClearAfterClass.Clearable { + var compiler = newCompiler(extraArgs = "-Yopt:inline-global -Yopt-warnings") + def clear(): Unit = { compiler = null } // allows inspecting the caches after a compilation run - val notPerRun: List[Clearable] = List(classBTypeFromInternalName, byteCodeRepository.classes, callGraph.callsites) + val notPerRun: List[Clearable] = List( + compiler.genBCode.bTypes.classBTypeFromInternalName, + compiler.genBCode.bTypes.byteCodeRepository.compilingClasses, + compiler.genBCode.bTypes.byteCodeRepository.parsedClasses, + compiler.genBCode.bTypes.callGraph.callsites) notPerRun foreach compiler.perRunCaches.unrecordCache +} + +@RunWith(classOf[JUnit4]) +class CallGraphTest extends ClearAfterClass { + ClearAfterClass.stateToClear = CallGraphTest + + val compiler = CallGraphTest.compiler + import compiler.genBCode.bTypes._ + import callGraph._ - def compile(code: String, allowMessage: StoreReporter#Info => Boolean): List[ClassNode] = { - notPerRun.foreach(_.clear()) - compileClasses(compiler)(code, allowMessage = allowMessage) + def compile(code: String, allowMessage: StoreReporter#Info => Boolean = _ => false): List[ClassNode] = { + CallGraphTest.notPerRun.foreach(_.clear()) + compileClasses(compiler)(code, allowMessage = allowMessage).map(c => byteCodeRepository.classNode(c.name).get) } def callsInMethod(methodNode: MethodNode): List[MethodInsnNode] = methodNode.instructions.iterator.asScala.collect({ case call: MethodInsnNode => call }).toList + def checkCallsite(call: MethodInsnNode, callsiteMethod: MethodNode, target: MethodNode, calleeDeclClass: ClassBType, + safeToInline: Boolean, atInline: Boolean, atNoInline: Boolean, argInfos: IntMap[ArgInfo] = IntMap.empty) = { + val callsite = callGraph.callsites(callsiteMethod)(call) + try { + assert(callsite.callsiteInstruction == call) + assert(callsite.callsiteMethod == callsiteMethod) + val callee = callsite.callee.get + assert(callee.callee == target) + assert(callee.calleeDeclarationClass == calleeDeclClass) + assert(callee.safeToInline == safeToInline) + assert(callee.annotatedInline == atInline) + assert(callee.annotatedNoInline == atNoInline) + assert(callsite.argInfos == argInfos) + } catch { + case e: Throwable => println(callsite); throw e + } + } + @Test def callGraphStructure(): Unit = { val code = @@ -83,70 +115,107 @@ class CallGraphTest { msgCount += 1 ok exists (m.msg contains _) } - val List(cCls, cMod, dCls, testCls) = compile(code, checkMsg).map(c => byteCodeRepository.classNode(c.name).get) + val List(cCls, cMod, dCls, testCls) = compile(code, checkMsg) assert(msgCount == 6, msgCount) - val List(cf1, cf2, cf3, cf4, cf5, cf6, cf7) = cCls.methods.iterator.asScala.filter(_.name.startsWith("f")).toList.sortBy(_.name) - val List(df1, df3) = dCls.methods.iterator.asScala.filter(_.name.startsWith("f")).toList.sortBy(_.name) - val g1 = cMod.methods.iterator.asScala.find(_.name == "g1").get - val List(t1, t2) = testCls.methods.iterator.asScala.filter(_.name.startsWith("t")).toList.sortBy(_.name) + val List(cf1, cf2, cf3, cf4, cf5, cf6, cf7) = findAsmMethods(cCls, _.startsWith("f")) + val List(df1, df3) = findAsmMethods(dCls, _.startsWith("f")) + val g1 = findAsmMethod(cMod, "g1") + val List(t1, t2) = findAsmMethods(testCls, _.startsWith("t")) val List(cf1Call, cf2Call, cf3Call, cf4Call, cf5Call, cf6Call, cf7Call, cg1Call) = callsInMethod(t1) val List(df1Call, df2Call, df3Call, df4Call, df5Call, df6Call, df7Call, dg1Call) = callsInMethod(t2) - def checkCallsite(callsite: callGraph.Callsite, - call: MethodInsnNode, callsiteMethod: MethodNode, target: MethodNode, calleeDeclClass: ClassBType, - safeToInline: Boolean, atInline: Boolean, atNoInline: Boolean) = try { - assert(callsite.callsiteInstruction == call) - assert(callsite.callsiteMethod == callsiteMethod) - val callee = callsite.callee.get - assert(callee.callee == target) - assert(callee.calleeDeclarationClass == calleeDeclClass) - assert(callee.safeToInline == safeToInline) - assert(callee.annotatedInline == atInline) - assert(callee.annotatedNoInline == atNoInline) - - assert(callsite.argInfos == List()) // not defined yet - } catch { - case e: Throwable => println(callsite); throw e - } - val cClassBType = classBTypeFromClassNode(cCls) val cMClassBType = classBTypeFromClassNode(cMod) val dClassBType = classBTypeFromClassNode(dCls) - checkCallsite(callGraph.callsites(cf1Call), - cf1Call, t1, cf1, cClassBType, false, false, false) - checkCallsite(callGraph.callsites(cf2Call), - cf2Call, t1, cf2, cClassBType, true, false, false) - checkCallsite(callGraph.callsites(cf3Call), - cf3Call, t1, cf3, cClassBType, false, true, false) - checkCallsite(callGraph.callsites(cf4Call), - cf4Call, t1, cf4, cClassBType, true, true, false) - checkCallsite(callGraph.callsites(cf5Call), - cf5Call, t1, cf5, cClassBType, false, false, true) - checkCallsite(callGraph.callsites(cf6Call), - cf6Call, t1, cf6, cClassBType, true, false, true) - checkCallsite(callGraph.callsites(cf7Call), - cf7Call, t1, cf7, cClassBType, false, true, true) - checkCallsite(callGraph.callsites(cg1Call), - cg1Call, t1, g1, cMClassBType, true, false, false) - - checkCallsite(callGraph.callsites(df1Call), - df1Call, t2, df1, dClassBType, false, true, false) - checkCallsite(callGraph.callsites(df2Call), - df2Call, t2, cf2, cClassBType, true, false, false) - checkCallsite(callGraph.callsites(df3Call), - df3Call, t2, df3, dClassBType, true, false, false) - checkCallsite(callGraph.callsites(df4Call), - df4Call, t2, cf4, cClassBType, true, true, false) - checkCallsite(callGraph.callsites(df5Call), - df5Call, t2, cf5, cClassBType, false, false, true) - checkCallsite(callGraph.callsites(df6Call), - df6Call, t2, cf6, cClassBType, true, false, true) - checkCallsite(callGraph.callsites(df7Call), - df7Call, t2, cf7, cClassBType, false, true, true) - checkCallsite(callGraph.callsites(dg1Call), - dg1Call, t2, g1, cMClassBType, true, false, false) + checkCallsite(cf1Call, t1, cf1, cClassBType, false, false, false) + checkCallsite(cf2Call, t1, cf2, cClassBType, true, false, false) + checkCallsite(cf3Call, t1, cf3, cClassBType, false, true, false) + checkCallsite(cf4Call, t1, cf4, cClassBType, true, true, false) + checkCallsite(cf5Call, t1, cf5, cClassBType, false, false, true) + checkCallsite(cf6Call, t1, cf6, cClassBType, true, false, true) + checkCallsite(cf7Call, t1, cf7, cClassBType, false, true, true) + checkCallsite(cg1Call, t1, g1, cMClassBType, true, false, false) + + checkCallsite(df1Call, t2, df1, dClassBType, false, true, false) + checkCallsite(df2Call, t2, cf2, cClassBType, true, false, false) + checkCallsite(df3Call, t2, df3, dClassBType, true, false, false) + checkCallsite(df4Call, t2, cf4, cClassBType, true, true, false) + checkCallsite(df5Call, t2, cf5, cClassBType, false, false, true) + checkCallsite(df6Call, t2, cf6, cClassBType, true, false, true) + checkCallsite(df7Call, t2, cf7, cClassBType, false, true, true) + checkCallsite(dg1Call, t2, g1, cMClassBType, true, false, false) + } + + @Test + def callerSensitiveNotSafeToInline(): Unit = { + val code = + """class C { + | def m = java.lang.Class.forName("C") + |} + """.stripMargin + val List(c) = compile(code) + val m = findAsmMethod(c, "m") + val List(fn) = callsInMethod(m) + val forNameMeth = byteCodeRepository.methodNode("java/lang/Class", "forName", "(Ljava/lang/String;)Ljava/lang/Class;").get._1 + val classTp = classBTypeFromInternalName("java/lang/Class") + val r = callGraph.callsites(m)(fn) + checkCallsite(fn, m, forNameMeth, classTp, safeToInline = false, atInline = false, atNoInline = false) + } + + @Test + def checkArgInfos(): Unit = { + val code = + """abstract class C { + | def h(f: Int => Int): Int = f(1) + | def t1 = h(x => x + 1) + | def t2(i: Int, f: Int => Int, z: Int) = h(f) + i - z + | def t3(f: Int => Int) = h(x => f(x + 1)) + |} + |trait D { + | def iAmASam(x: Int): Int + | def selfSamCall = iAmASam(10) + |} + |""".stripMargin + val List(c, d) = compile(code) + + def callIn(m: String) = callGraph.callsites.find(_._1.name == m).get._2.values.head + val t1h = callIn("t1") + assertEquals(t1h.argInfos.toList, List((1, FunctionLiteral))) + + val t2h = callIn("t2") + assertEquals(t2h.argInfos.toList, List((1, ForwardedParam(2)))) + + val t3h = callIn("t3") + assertEquals(t3h.argInfos.toList, List((1, FunctionLiteral))) + + val selfSamCall = callIn("selfSamCall") + assertEquals(selfSamCall.argInfos.toList, List((0,ForwardedParam(0)))) + } + + @Test + def argInfoAfterInlining(): Unit = { + val code = + """class C { + | def foo(f: Int => Int) = f(1) // not inlined + | @inline final def bar(g: Int => Int) = foo(g) // forwarded param 1 + | @inline final def baz = foo(x => x + 1) // literal + | + | def t1 = bar(x => x + 1) // call to foo should have argInfo literal + | def t2(x: Int, f: Int => Int) = x + bar(f) // call to foo should have argInfo forwarded param 2 + | def t3 = baz // call to foo should have argInfo literal + | def someFun: Int => Int = null + | def t4(x: Int) = x + bar(someFun) // call to foo has empty argInfo + |} + """.stripMargin + + compile(code) + def callIn(m: String) = callGraph.callsites.find(_._1.name == m).get._2.values.head + assertEquals(callIn("t1").argInfos.toList, List((1, FunctionLiteral))) + assertEquals(callIn("t2").argInfos.toList, List((1, ForwardedParam(2)))) + assertEquals(callIn("t3").argInfos.toList, List((1, FunctionLiteral))) + assertEquals(callIn("t4").argInfos.toList, Nil) } } diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/ClosureOptimizerTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/ClosureOptimizerTest.scala new file mode 100644 index 0000000000..a0b9d6b4ed --- /dev/null +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/ClosureOptimizerTest.scala @@ -0,0 +1,108 @@ +package scala.tools.nsc +package backend.jvm +package opt + +import org.junit.runner.RunWith +import org.junit.runners.JUnit4 +import org.junit.Test +import scala.collection.generic.Clearable +import scala.collection.mutable.ListBuffer +import scala.reflect.internal.util.BatchSourceFile +import scala.tools.asm.Opcodes._ +import org.junit.Assert._ + +import scala.tools.asm.tree._ +import scala.tools.asm.tree.analysis._ +import scala.tools.nsc.io._ +import scala.tools.nsc.reporters.StoreReporter +import scala.tools.testing.AssertUtil._ + +import CodeGenTools._ +import scala.tools.partest.ASMConverters +import ASMConverters._ +import AsmUtils._ + +import BackendReporting._ + +import scala.collection.convert.decorateAsScala._ +import scala.tools.testing.ClearAfterClass + +object ClosureOptimizerTest extends ClearAfterClass.Clearable { + var compiler = newCompiler(extraArgs = "-Yopt:l:classpath -Yopt-warnings:_") + def clear(): Unit = { compiler = null } +} + +@RunWith(classOf[JUnit4]) +class ClosureOptimizerTest extends ClearAfterClass { + ClearAfterClass.stateToClear = ClosureOptimizerTest + + val compiler = ClosureOptimizerTest.compiler + + @Test + def nothingTypedClosureBody(): Unit = { + val code = + """abstract class C { + | def isEmpty: Boolean + | @inline final def getOrElse[T >: C](f: => T) = if (isEmpty) f else this + | def t = getOrElse(throw new Error("")) + |} + """.stripMargin + + val List(c) = compileClasses(compiler)(code) + val t = findAsmMethod(c, "t") + val List(bodyCall) = findInstr(t, "INVOKESTATIC C.C$$$anonfun$1 ()Lscala/runtime/Nothing$") + assert(bodyCall.getNext.getOpcode == ATHROW) + } + + @Test + def nullTypedClosureBody(): Unit = { + val code = + """abstract class C { + | def isEmpty: Boolean + | @inline final def getOrElse[T >: C](f: => T) = if (isEmpty) f else this + | def t = getOrElse(null) + |} + """.stripMargin + + val List(c) = compileClasses(compiler)(code) + val t = findAsmMethod(c, "t") + val List(bodyCall) = findInstr(t, "INVOKESTATIC C.C$$$anonfun$1 ()Lscala/runtime/Null$") + assert(bodyCall.getNext.getOpcode == POP) + assert(bodyCall.getNext.getNext.getOpcode == ACONST_NULL) + } + + @Test + def makeLMFCastExplicit(): Unit = { + val code = + """class C { + | def t(l: List[String]) = { + | val fun: String => String = s => s + | fun(l.head) + | } + |} + """.stripMargin + val List(c) = compileClasses(compiler)(code) + assertSameCode(getSingleMethod(c, "t"), + List(VarOp(ALOAD, 1), Invoke(INVOKEVIRTUAL, "scala/collection/immutable/List", "head", "()Ljava/lang/Object;", false), + TypeOp(CHECKCAST, "java/lang/String"), Invoke(INVOKESTATIC, "C", "C$$$anonfun$1", "(Ljava/lang/String;)Ljava/lang/String;", false), + Op(ARETURN))) + } + + @Test + def closureOptWithUnreachableCode(): Unit = { + // this example used to crash the ProdCons analysis in the closure optimizer - ProdCons + // expects no unreachable code. + val code = + """class C { + | @inline final def m = throw new Error("") + | def t = { + | val f = (x: Int) => x + 1 + | m + | f(10) // unreachable after inlining m + | } + |} + """.stripMargin + val List(c) = compileClasses(compiler)(code) + assertSameSummary(getSingleMethod(c, "t"), List(NEW, DUP, LDC, "<init>", ATHROW)) + } +} diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/CompactLocalVariablesTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/CompactLocalVariablesTest.scala index 76492cfa23..ac1b759fe2 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/CompactLocalVariablesTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/CompactLocalVariablesTest.scala @@ -17,8 +17,8 @@ class CompactLocalVariablesTest { // recurse-unreachable-jumps is required for eliminating catch blocks, in the first dce round they // are still live.only after eliminating the empty handler the catch blocks become unreachable. - val methodOptCompiler = newCompiler(extraArgs = "-target:jvm-1.6 -Ybackend:GenBCode -Yopt:unreachable-code,compact-locals") - val noCompactVarsCompiler = newCompiler(extraArgs = "-target:jvm-1.6 -Ybackend:GenBCode -Yopt:unreachable-code") + val methodOptCompiler = newCompiler(extraArgs = "-Yopt:unreachable-code,compact-locals") + val noCompactVarsCompiler = newCompiler(extraArgs = "-Yopt:unreachable-code") @Test def compactUnused(): Unit = { diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/EmptyExceptionHandlersTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/EmptyExceptionHandlersTest.scala index cb01f3d164..22aed4207f 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/EmptyExceptionHandlersTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/EmptyExceptionHandlersTest.scala @@ -14,8 +14,8 @@ import ASMConverters._ import scala.tools.testing.ClearAfterClass object EmptyExceptionHandlersTest extends ClearAfterClass.Clearable { - var noOptCompiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:l:none") - var dceCompiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:unreachable-code") + var noOptCompiler = newCompiler(extraArgs = "-Yopt:l:none") + var dceCompiler = newCompiler(extraArgs = "-Yopt:unreachable-code") def clear(): Unit = { noOptCompiler = null dceCompiler = null diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/InlineInfoTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/InlineInfoTest.scala index 57088bdd2f..261d6beb96 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/InlineInfoTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/InlineInfoTest.scala @@ -19,15 +19,20 @@ import BackendReporting._ import scala.collection.convert.decorateAsScala._ object InlineInfoTest extends ClearAfterClass.Clearable { - var compiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:l:classpath") + var compiler = newCompiler(extraArgs = "-Yopt:l:classpath") def clear(): Unit = { compiler = null } - def notPerRun: List[Clearable] = List(compiler.genBCode.bTypes.classBTypeFromInternalName, compiler.genBCode.bTypes.byteCodeRepository.classes) + def notPerRun: List[Clearable] = List( + compiler.genBCode.bTypes.classBTypeFromInternalName, + compiler.genBCode.bTypes.byteCodeRepository.compilingClasses, + compiler.genBCode.bTypes.byteCodeRepository.parsedClasses) notPerRun foreach compiler.perRunCaches.unrecordCache } @RunWith(classOf[JUnit4]) -class InlineInfoTest { +class InlineInfoTest extends ClearAfterClass { + ClearAfterClass.stateToClear = InlineInfoTest + val compiler = InlineInfoTest.compiler def compile(code: String) = { @@ -55,6 +60,7 @@ class InlineInfoTest { |class C extends T with U """.stripMargin val classes = compile(code) + val fromSyms = classes.map(c => compiler.genBCode.bTypes.classBTypeFromInternalName(c.name).info.get.inlineInfo) val fromAttrs = classes.map(c => { diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/InlineWarningTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/InlineWarningTest.scala index 029caa995c..90236265e6 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/InlineWarningTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/InlineWarningTest.scala @@ -13,7 +13,6 @@ import org.junit.Assert._ import scala.tools.asm.tree._ import scala.tools.asm.tree.analysis._ -import scala.tools.nsc.backend.jvm.opt.BytecodeUtils.AsmAnalyzer import scala.tools.nsc.io._ import scala.tools.nsc.reporters.StoreReporter import scala.tools.testing.AssertUtil._ @@ -29,10 +28,11 @@ import scala.collection.convert.decorateAsScala._ import scala.tools.testing.ClearAfterClass object InlineWarningTest extends ClearAfterClass.Clearable { - val argsNoWarn = "-Ybackend:GenBCode -Yopt:l:classpath" + val argsNoWarn = "-Yopt:l:classpath" val args = argsNoWarn + " -Yopt-warnings" var compiler = newCompiler(extraArgs = args) - def clear(): Unit = { compiler = null } + var compilerWarnAll = newCompiler(extraArgs = argsNoWarn + " -Yopt-warnings:_") + def clear(): Unit = { compiler = null; compilerWarnAll = null } } @RunWith(classOf[JUnit4]) @@ -40,8 +40,9 @@ class InlineWarningTest extends ClearAfterClass { ClearAfterClass.stateToClear = InlineWarningTest val compiler = InlineWarningTest.compiler + val compilerWarnAll = InlineWarningTest.compilerWarnAll - def compile(scalaCode: String, javaCode: List[(String, String)] = Nil, allowMessage: StoreReporter#Info => Boolean = _ => false): List[ClassNode] = { + def compile(scalaCode: String, javaCode: List[(String, String)] = Nil, allowMessage: StoreReporter#Info => Boolean = _ => false, compiler: Global = compiler): List[ClassNode] = { compileClasses(compiler)(scalaCode, javaCode, allowMessage) } @@ -70,29 +71,6 @@ class InlineWarningTest extends ClearAfterClass { } @Test - def traitMissingImplClass(): Unit = { - val codeA = "trait T { @inline final def f = 1 }" - val codeB = "class C { def t1(t: T) = t.f }" - - val removeImpl = (outDir: AbstractFile) => { - val f = outDir.lookupName("T$class.class", directory = false) - if (f != null) f.delete() - } - - val warn = - """T::f()I is annotated @inline but cannot be inlined: the trait method call could not be rewritten to the static implementation method. Possible reason: - |The method f(LT;)I could not be found in the class T$class or any of its parents. - |Note that the following parent classes could not be found on the classpath: T$class""".stripMargin - - var c = 0 - compileSeparately(List(codeA, codeB), extraArgs = InlineWarningTest.args, afterEach = removeImpl, allowMessage = i => {c += 1; i.msg contains warn}) - assert(c == 1, c) - - // only summary here - compileSeparately(List(codeA, codeB), extraArgs = InlineWarningTest.argsNoWarn, afterEach = removeImpl, allowMessage = _.msg contains "there was one inliner warning") - } - - @Test def handlerNonEmptyStack(): Unit = { val code = """class C { @@ -172,6 +150,33 @@ class InlineWarningTest extends ClearAfterClass { } @Test + def dontWarnWhenNotIlnineAnnotated(): Unit = { + val code = + """class M { + | final def f(t: Int => Int) = { + | @noinline def nested = 0 + | nested + t(1) + | } + | def t = f(x => x + 1) + |} + | + |class N { + | def t(a: M) = a.f(x => x + 1) + |} + """.stripMargin + compile(code, allowMessage = _ => false) // no warnings allowed + + val warn = + """M::f(Lscala/Function1;)I could not be inlined: + |The callee M::f(Lscala/Function1;)I contains the instruction INVOKESPECIAL M.nested$1 ()I + |that would cause an IllegalAccessError when inlined into class N""".stripMargin + + var c = 0 + compile(code, compiler = compilerWarnAll, allowMessage = i => { c += 1; i.msg contains warn }) + assert(c == 1, c) + } + + @Test def cannotMixStrictfp(): Unit = { val code = """import annotation.strictfp diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerIllegalAccessTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerIllegalAccessTest.scala index 7ed0e13226..884027cd90 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerIllegalAccessTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerIllegalAccessTest.scala @@ -20,7 +20,7 @@ import scala.collection.convert.decorateAsScala._ import scala.tools.testing.ClearAfterClass object InlinerIllegalAccessTest extends ClearAfterClass.Clearable { - var compiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:l:none") + var compiler = newCompiler(extraArgs = "-Yopt:l:none") def clear(): Unit = { compiler = null } } @@ -67,7 +67,7 @@ class InlinerIllegalAccessTest extends ClearAfterClass { check(dClass, assertEmpty) check(eClass, assertEmpty) // C is public, so accessible in E - byteCodeRepository.classes.clear() + byteCodeRepository.parsedClasses.clear() classBTypeFromInternalName.clear() cClass.access &= ~ACC_PUBLIC // ftw diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerSeparateCompilationTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerSeparateCompilationTest.scala index 5c9bd1c188..6562f81e4c 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerSeparateCompilationTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerSeparateCompilationTest.scala @@ -16,13 +16,12 @@ import AsmUtils._ import scala.collection.convert.decorateAsScala._ object InlinerSeparateCompilationTest { - val args = "-Ybackend:GenBCode -Yopt:l:classpath" + val args = "-Yopt:l:classpath" } @RunWith(classOf[JUnit4]) class InlinerSeparateCompilationTest { import InlinerSeparateCompilationTest._ - import InlinerTest.{listStringLines, assertInvoke, assertNoInvoke} @Test def inlnieMixedinMember(): Unit = { @@ -44,7 +43,7 @@ class InlinerSeparateCompilationTest { """.stripMargin val warn = "T::f()I is annotated @inline but cannot be inlined: the method is not final and may be overridden" - val List(c, o, oMod, t, tCls) = compileClassesSeparately(List(codeA, codeB), args + " -Yopt-warnings", _.msg contains warn) + val List(c, o, oMod, t) = compileClassesSeparately(List(codeA, codeB), args + " -Yopt-warnings", _.msg contains warn) assertInvoke(getSingleMethod(c, "t1"), "T", "f") assertNoInvoke(getSingleMethod(c, "t2")) assertNoInvoke(getSingleMethod(c, "t3")) @@ -64,7 +63,7 @@ class InlinerSeparateCompilationTest { |} """.stripMargin - val List(c, t, tCls) = compileClassesSeparately(List(codeA, codeB), args) + val List(c, t) = compileClassesSeparately(List(codeA, codeB), args) assertNoInvoke(getSingleMethod(c, "t1")) } @@ -87,7 +86,7 @@ class InlinerSeparateCompilationTest { |} """.stripMargin - val List(c, t, tCls, u, uCls) = compileClassesSeparately(List(codeA, codeB), args) + val List(c, t, u) = compileClassesSeparately(List(codeA, codeB), args) for (m <- List("t1", "t2", "t3")) assertNoInvoke(getSingleMethod(c, m)) } @@ -108,8 +107,8 @@ class InlinerSeparateCompilationTest { |$assembly """.stripMargin - val List(a, aCls, t, tCls) = compileClassesSeparately(List(codeA, assembly), args) - assertNoInvoke(getSingleMethod(tCls, "f")) - assertNoInvoke(getSingleMethod(aCls, "n")) + val List(a, t) = compileClassesSeparately(List(codeA, assembly), args) + assertNoInvoke(getSingleMethod(t, "f")) + assertNoInvoke(getSingleMethod(a, "n")) } } diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerTest.scala index 0309bb97cc..15665fca33 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerTest.scala @@ -6,17 +6,11 @@ import org.junit.runner.RunWith import org.junit.runners.JUnit4 import org.junit.Test import scala.collection.generic.Clearable -import scala.collection.mutable.ListBuffer -import scala.reflect.internal.util.BatchSourceFile import scala.tools.asm.Opcodes._ import org.junit.Assert._ import scala.tools.asm.tree._ -import scala.tools.asm.tree.analysis._ -import scala.tools.nsc.backend.jvm.opt.BytecodeUtils.AsmAnalyzer -import scala.tools.nsc.io._ import scala.tools.nsc.reporters.StoreReporter -import scala.tools.testing.AssertUtil._ import CodeGenTools._ import scala.tools.partest.ASMConverters @@ -29,45 +23,39 @@ import scala.collection.convert.decorateAsScala._ import scala.tools.testing.ClearAfterClass object InlinerTest extends ClearAfterClass.Clearable { - val args = "-Ybackend:GenBCode -Yopt:l:classpath -Yopt-warnings" + val args = "-Yopt:l:classpath -Yopt-warnings" var compiler = newCompiler(extraArgs = args) + var inlineOnlyCompiler = newCompiler(extraArgs = "-Yopt:inline-project") // allows inspecting the caches after a compilation run - def notPerRun: List[Clearable] = List(compiler.genBCode.bTypes.classBTypeFromInternalName, compiler.genBCode.bTypes.byteCodeRepository.classes, compiler.genBCode.bTypes.callGraph.callsites) + def notPerRun: List[Clearable] = List( + compiler.genBCode.bTypes.classBTypeFromInternalName, + compiler.genBCode.bTypes.byteCodeRepository.compilingClasses, + compiler.genBCode.bTypes.byteCodeRepository.parsedClasses, + compiler.genBCode.bTypes.callGraph.callsites) notPerRun foreach compiler.perRunCaches.unrecordCache - def clear(): Unit = { compiler = null } - - implicit class listStringLines[T](val l: List[T]) extends AnyVal { - def stringLines = l.mkString("\n") - } - - def assertNoInvoke(m: Method): Unit = assertNoInvoke(m.instructions) - def assertNoInvoke(ins: List[Instruction]): Unit = { - assert(!ins.exists(_.isInstanceOf[Invoke]), ins.stringLines) - } - - def assertInvoke(m: Method, receiver: String, method: String): Unit = assertInvoke(m.instructions, receiver, method) - def assertInvoke(l: List[Instruction], receiver: String, method: String): Unit = { - assert(l.exists { - case Invoke(_, `receiver`, `method`, _, _) => true - case _ => false - }, l.stringLines) - } + def clear(): Unit = { compiler = null; inlineOnlyCompiler = null } } @RunWith(classOf[JUnit4]) class InlinerTest extends ClearAfterClass { ClearAfterClass.stateToClear = InlinerTest - import InlinerTest.{listStringLines, assertInvoke, assertNoInvoke} - val compiler = InlinerTest.compiler import compiler.genBCode.bTypes._ + import compiler.genBCode.bTypes.backendUtils._ + import inlinerHeuristics._ + + val inlineOnlyCompiler = InlinerTest.inlineOnlyCompiler def compile(scalaCode: String, javaCode: List[(String, String)] = Nil, allowMessage: StoreReporter#Info => Boolean = _ => false): List[ClassNode] = { InlinerTest.notPerRun.foreach(_.clear()) compileClasses(compiler)(scalaCode, javaCode, allowMessage) + // Use the class nodes stored in the byteCodeRepository. The ones returned by compileClasses are not the same, + // these are created new from the classfile byte array. They are completely separate instances which cannot + // be used to look up methods / callsites in the callGraph hash maps for example. + byteCodeRepository.compilingClasses.valuesIterator.toList.sortBy(_.name) } def checkCallsite(callsite: callGraph.Callsite, callee: MethodNode) = { @@ -79,27 +67,25 @@ class InlinerTest extends ClearAfterClass { assert(callsite.callee.get.callee == callee, callsite.callee.get.callee.name) } - // inline first invocation of f into g in class C - def inlineTest(code: String, mod: ClassNode => Unit = _ => ()): (MethodNode, Option[CannotInlineWarning]) = { - val List(cls) = compile(code) - mod(cls) - val clsBType = classBTypeFromParsedClassfile(cls.name) + def getCallsite(method: MethodNode, calleeName: String) = callGraph.callsites(method).valuesIterator.find(_.callee.get.callee.name == calleeName).get - val List(f, g) = cls.methods.asScala.filter(m => Set("f", "g")(m.name)).toList.sortBy(_.name) - val fCall = g.instructions.iterator.asScala.collect({ case i: MethodInsnNode if i.name == "f" => i }).next() + def gMethAndFCallsite(code: String, mod: ClassNode => Unit = _ => ()) = { + val List(c) = compile(code) + mod(c) + val gMethod = findAsmMethod(c, "g") + val fCall = getCallsite(gMethod, "f") + (gMethod, fCall) + } - val analyzer = new AsmAnalyzer(g, clsBType.internalName) + def canInlineTest(code: String, mod: ClassNode => Unit = _ => ()): Option[OptimizerWarning] = { + val cs = gMethAndFCallsite(code, mod)._2 + inliner.earlyCanInlineCheck(cs) orElse inliner.canInlineBody(cs) + } - val r = inliner.inline( - fCall, - analyzer.frameAt(fCall).getStackSize, - g, - clsBType, - f, - clsBType, - receiverKnownNotNull = true, - keepLineNumbers = true) - (g, r) + def inlineTest(code: String, mod: ClassNode => Unit = _ => ()): MethodNode = { + val (gMethod, fCall) = gMethAndFCallsite(code, mod) + inliner.inline(InlineRequest(fCall, Nil)) + gMethod } @Test @@ -111,10 +97,10 @@ class InlinerTest extends ClearAfterClass { |} """.stripMargin - val (g, _) = inlineTest(code) + val g = inlineTest(code) val gConv = convertMethod(g) - assertSameCode(gConv.instructions.dropNonOp, + assertSameCode(gConv, List( VarOp(ALOAD, 0), VarOp(ASTORE, 1), // store this Op(ICONST_1), VarOp(ISTORE, 2), Jump(GOTO, Label(10)), // store return value @@ -145,16 +131,23 @@ class InlinerTest extends ClearAfterClass { // See also discussion around ATHROW in BCodeBodyBuilder - val (g, _) = inlineTest(code) - val expectedInlined = List( - VarOp(ALOAD, 0), VarOp(ASTORE, 1), // store this - Field(GETSTATIC, "scala/Predef$", "MODULE$", "Lscala/Predef$;"), Invoke(INVOKEVIRTUAL, "scala/Predef$", "$qmark$qmark$qmark", "()Lscala/runtime/Nothing$;", false)) // inlined call to ??? + val g = inlineTest(code) - assertSameCode(convertMethod(g).instructions.dropNonOp.take(4), expectedInlined) + val invokeQQQ = List( + Field(GETSTATIC, "scala/Predef$", "MODULE$", "Lscala/Predef$;"), + Invoke(INVOKEVIRTUAL, "scala/Predef$", "$qmark$qmark$qmark", "()Lscala/runtime/Nothing$;", false)) + + val gBeforeLocalOpt = VarOp(ALOAD, 0) :: VarOp(ASTORE, 1) :: invokeQQQ ::: List( + VarOp(ASTORE, 2), + Jump(GOTO, Label(11)), + Label(11), + VarOp(ALOAD, 2), + Op(ATHROW)) + + assertSameCode(convertMethod(g), gBeforeLocalOpt) compiler.genBCode.bTypes.localOpt.methodOptimizations(g, "C") - assertSameCode(convertMethod(g).instructions.dropNonOp, - expectedInlined ++ List(VarOp(ASTORE, 2), VarOp(ALOAD, 2), Op(ATHROW))) + assertSameCode(convertMethod(g), invokeQQQ :+ Op(ATHROW)) } @Test @@ -166,11 +159,11 @@ class InlinerTest extends ClearAfterClass { |} """.stripMargin - val (_, can) = inlineTest(code, cls => { + val can = canInlineTest(code, cls => { val f = cls.methods.asScala.find(_.name == "f").get f.access |= ACC_SYNCHRONIZED }) - assert(can.get.isInstanceOf[SynchronizedMethod], can) + assert(can.nonEmpty && can.get.isInstanceOf[SynchronizedMethod], can) } @Test @@ -181,7 +174,7 @@ class InlinerTest extends ClearAfterClass { | def g = f + 1 |} """.stripMargin - val (_, r) = inlineTest(code) + val r = canInlineTest(code) assert(r.isEmpty, r) } @@ -195,8 +188,8 @@ class InlinerTest extends ClearAfterClass { | def g = println(f) |} """.stripMargin - val (_, r) = inlineTest(code) - assert(r.get.isInstanceOf[MethodWithHandlerCalledOnNonEmptyStack], r) + val r = canInlineTest(code) + assert(r.nonEmpty && r.get.isInstanceOf[MethodWithHandlerCalledOnNonEmptyStack], r) } @Test @@ -216,29 +209,10 @@ class InlinerTest extends ClearAfterClass { """.stripMargin val List(c, d) = compile(code) - - val cTp = classBTypeFromParsedClassfile(c.name) - val dTp = classBTypeFromParsedClassfile(d.name) - - val g = c.methods.asScala.find(_.name == "g").get - val h = d.methods.asScala.find(_.name == "h").get - val gCall = h.instructions.iterator.asScala.collect({ - case m: MethodInsnNode if m.name == "g" => m - }).next() - - val analyzer = new AsmAnalyzer(h, dTp.internalName) - - val r = inliner.inline( - gCall, - analyzer.frameAt(gCall).getStackSize, - h, - dTp, - g, - cTp, - receiverKnownNotNull = true, - keepLineNumbers = true) - - assert(r.get.isInstanceOf[IllegalAccessInstruction], r) + val hMeth = findAsmMethod(d, "h") + val gCall = getCallsite(hMeth, "g") + val r = inliner.canInlineBody(gCall) + assert(r.nonEmpty && r.get.isInstanceOf[IllegalAccessInstruction], r) } @Test @@ -273,7 +247,7 @@ class InlinerTest extends ClearAfterClass { assert(gIns contains invokeG, gIns) // f is inlined into g, g invokes itself recursively assert(callGraph.callsites.size == 3, callGraph.callsites) - for (callsite <- callGraph.callsites.values if methods.contains(callsite.callsiteMethod)) { + for (callsite <- callGraph.callsites.valuesIterator.flatMap(_.valuesIterator) if methods.contains(callsite.callsiteMethod)) { checkCallsite(callsite, g) } } @@ -295,8 +269,8 @@ class InlinerTest extends ClearAfterClass { assert(gIns.count(_ == invokeG) == 2, gIns) assert(hIns.count(_ == invokeG) == 2, hIns) - assert(callGraph.callsites.size == 7, callGraph.callsites) - for (callsite <- callGraph.callsites.values if methods.contains(callsite.callsiteMethod)) { + assert(callGraph.callsites.valuesIterator.flatMap(_.valuesIterator).size == 7, callGraph.callsites) + for (callsite <- callGraph.callsites.valuesIterator.flatMap(_.valuesIterator) if methods.contains(callsite.callsiteMethod)) { checkCallsite(callsite, g) } } @@ -336,7 +310,7 @@ class InlinerTest extends ClearAfterClass { |} """.stripMargin val List(c) = compile(code) - assert(callGraph.callsites.values exists (_.callsiteInstruction.name == "clone")) + assert(callGraph.callsites.valuesIterator.flatMap(_.valuesIterator) exists (_.callsiteInstruction.name == "clone")) } @Test @@ -349,7 +323,7 @@ class InlinerTest extends ClearAfterClass { | def g(t: T) = t.f |} """.stripMargin - val List(c, t, tClass) = compile(code) + val List(c, t) = compile(code) assertNoInvoke(getSingleMethod(c, "g")) } @@ -375,26 +349,14 @@ class InlinerTest extends ClearAfterClass { """.stripMargin val List(c) = compile(code) - val f = c.methods.asScala.find(_.name == "f").get - val callsiteIns = f.instructions.iterator().asScala.collect({ case c: MethodInsnNode => c }).next() - val clsBType = classBTypeFromParsedClassfile(c.name) - val analyzer = new AsmAnalyzer(f, clsBType.internalName) - - val integerClassBType = classBTypeFromInternalName("java/lang/Integer") - val lowestOneBitMethod = byteCodeRepository.methodNode(integerClassBType.internalName, "lowestOneBit", "(I)I").get._1 - - val r = inliner.inline( - callsiteIns, - analyzer.frameAt(callsiteIns).getStackSize, - f, - clsBType, - lowestOneBitMethod, - integerClassBType, - receiverKnownNotNull = false, - keepLineNumbers = false) + val fMeth = findAsmMethod(c, "f") + val call = getCallsite(fMeth, "lowestOneBit") - assert(r.isEmpty, r) - val ins = instructionsFromMethod(f) + val warning = inliner.canInlineBody(call) + assert(warning.isEmpty, warning) + + inliner.inline(InlineRequest(call, Nil)) + val ins = instructionsFromMethod(fMeth) // no invocations, lowestOneBit is inlined assertNoInvoke(ins) @@ -425,7 +387,8 @@ class InlinerTest extends ClearAfterClass { |} """.stripMargin - val List(c) = compile(code) + // use a compiler without local optimizations (cleanups) + val List(c) = compileClasses(inlineOnlyCompiler)(code) val ms @ List(f1, f2, g1, g2) = c.methods.asScala.filter(_.name.length == 2).toList // stack height at callsite of f1 is 1, so max of g1 after inlining is max of f1 + 1 @@ -488,26 +451,13 @@ class InlinerTest extends ClearAfterClass { | def t2(c: C) = c.f |} """.stripMargin - val List(c, t, tClass) = compile(code) + val List(c, t) = compile(code) // both are just `return 1`, no more calls assertNoInvoke(getSingleMethod(c, "t1")) assertNoInvoke(getSingleMethod(c, "t2")) } @Test - def inlineMixinMethods(): Unit = { - val code = - """trait T { - | @inline final def f = 1 - |} - |class C extends T - """.stripMargin - val List(c, t, tClass) = compile(code) - // the static implementation method is inlined into the mixin, so there's no invocation in the mixin - assertNoInvoke(getSingleMethod(c, "f")) - } - - @Test def inlineTraitInherited(): Unit = { val code = """trait T { @@ -521,7 +471,7 @@ class InlinerTest extends ClearAfterClass { | def t2 = g |} """.stripMargin - val List(c, t, tClass, u, uClass) = compile(code) + val List(c, t, u) = compile(code) assertNoInvoke(getSingleMethod(c, "t1")) assertNoInvoke(getSingleMethod(c, "t2")) } @@ -541,7 +491,7 @@ class InlinerTest extends ClearAfterClass { "C::f()I is annotated @inline but cannot be inlined: the method is not final and may be overridden", "T::f()I is annotated @inline but cannot be inlined: the method is not final and may be overridden") var count = 0 - val List(c, t, tClass) = compile(code, allowMessage = i => {count += 1; warns.exists(i.msg contains _)}) + val List(c, t) = compile(code, allowMessage = i => {count += 1; warns.exists(i.msg contains _)}) assert(count == 2, count) assertInvoke(getSingleMethod(c, "t1"), "T", "f") assertInvoke(getSingleMethod(c, "t2"), "C", "f") @@ -557,7 +507,7 @@ class InlinerTest extends ClearAfterClass { | def t1(t: T) = t.f |} """.stripMargin - val List(c, t, tClass) = compile(code) + val List(c, t) = compile(code) assertNoInvoke(getSingleMethod(c, "t1")) } @@ -569,7 +519,7 @@ class InlinerTest extends ClearAfterClass { |} |object O extends T { | @inline def g = 1 - | // mixin generates `def f = T$class.f(this)`, which is inlined here (we get ICONST_0) + | // mixin generates `def f = super[T].f`, which is inlined here (we get ICONST_0) |} |class C { | def t1 = O.f // the mixin method of O is inlined, so we directly get the ICONST_0 @@ -579,10 +529,10 @@ class InlinerTest extends ClearAfterClass { """.stripMargin val warn = "T::f()I is annotated @inline but cannot be inlined: the method is not final and may be overridden" var count = 0 - val List(c, oMirror, oModule, t, tClass) = compile(code, allowMessage = i => {count += 1; i.msg contains warn}) + val List(c, oMirror, oModule, t) = compile(code, allowMessage = i => {count += 1; i.msg contains warn}) assert(count == 1, count) - assertNoInvoke(getSingleMethod(oModule, "f")) + assertNoInvoke(getSingleMethod(t, "f")) assertNoInvoke(getSingleMethod(c, "t1")) assertNoInvoke(getSingleMethod(c, "t2")) @@ -598,21 +548,19 @@ class InlinerTest extends ClearAfterClass { |} |trait Assembly extends T { | @inline final def g = 1 - | @inline final def n = m // inlined. (*) - | // (*) the declaration class of m is T. the signature of T$class.m is m(LAssembly;)I. so we need the self type to build the - | // signature. then we can look up the MethodNode of T$class.m and then rewrite the INVOKEINTERFACE to INVOKESTATIC. + | @inline final def n = m // inlined (m is final) |} |class C { - | def t1(a: Assembly) = a.f // like above, decl class is T, need self-type of T to rewrite the interface call to static. + | def t1(a: Assembly) = a.f // inlined (f is final) | def t2(a: Assembly) = a.n |} """.stripMargin - val List(assembly, assemblyClass, c, t, tClass) = compile(code) + val List(assembly, c, t) = compile(code) - assertNoInvoke(getSingleMethod(tClass, "f")) + assertNoInvoke(getSingleMethod(t, "f")) - assertNoInvoke(getSingleMethod(assemblyClass, "n")) + assertNoInvoke(getSingleMethod(assembly, "n")) assertNoInvoke(getSingleMethod(c, "t1")) assertNoInvoke(getSingleMethod(c, "t2")) @@ -647,30 +595,30 @@ class InlinerTest extends ClearAfterClass { val code = """trait T1 { | @inline def f: Int = 0 - | @inline def g1 = f // not inlined: f not final, so T1$class.g1 has an interface call T1.f + | @inline def g1 = f // not inlined: f not final |} | - |// erased self-type (used in impl class for `self` parameter): T1 + |// erased self-type: T1 |trait T2a { self: T1 with T2a => | @inline override final def f = 1 - | @inline def g2a = f // inlined: resolved as T2a.f, which is re-written to T2a$class.f, so T2a$class.g2a has ICONST_1 + | @inline def g2a = f // inlined: resolved as T2a.f |} | |final class Ca extends T1 with T2a { - | // mixin generates accessors like `def g1 = T1$class.g1`, the impl class method call is inlined into the accessor. + | // mixin generates accessors like `def g1 = super[T1].g1`, the impl super call is inlined into the accessor. | | def m1a = g1 // call to accessor, inlined, we get the interface call T1.f | def m2a = g2a // call to accessor, inlined, we get ICONST_1 | def m3a = f // call to accessor, inlined, we get ICONST_1 | - | def m4a(t: T1) = t.f // T1.f is not final, so not inlined, interface call to T1.f - | def m5a(t: T2a) = t.f // re-written to T2a$class.f, inlined, ICONST_1 + | def m4a(t: T1) = t.f // T1.f is not final, so not inlined, we get an interface call T1.f + | def m5a(t: T2a) = t.f // inlined, we get ICONST_1 |} | |// erased self-type: T2b |trait T2b { self: T2b with T1 => | @inline override final def f = 1 - | @inline def g2b = f // not inlined: resolved as T1.f, so T2b$class.g2b has an interface call T1.f + | @inline def g2b = f // not inlined: resolved as T1.f, we get an interface call T1.f |} | |final class Cb extends T1 with T2b { @@ -679,23 +627,17 @@ class InlinerTest extends ClearAfterClass { | def m3b = f // inlined, we get ICONST_1 | | def m4b(t: T1) = t.f // T1.f is not final, so not inlined, interface call to T1.f - | def m5b(t: T2b) = t.f // re-written to T2b$class.f, inlined, ICONST_1 + | def m5b(t: T2b) = t.f // inlined, ICONST_1 |} """.stripMargin val warning = "T1::f()I is annotated @inline but cannot be inlined: the method is not final and may be overridden" var count = 0 - val List(ca, cb, t1, t1C, t2a, t2aC, t2b, t2bC) = compile(code, allowMessage = i => {count += 1; i.msg contains warning}) + val List(ca, cb, t1, t2a, t2b) = compile(code, allowMessage = i => {count += 1; i.msg contains warning}) assert(count == 4, count) // see comments, f is not inlined 4 times - val t2aCfDesc = t2aC.methods.asScala.find(_.name == "f").get.desc - assert(t2aCfDesc == "(LT1;)I", t2aCfDesc) // self-type of T2a is T1 - - val t2bCfDesc = t2bC.methods.asScala.find(_.name == "f").get.desc - assert(t2bCfDesc == "(LT2b;)I", t2bCfDesc) // self-type of T2b is T2b - - assertNoInvoke(getSingleMethod(t2aC, "g2a")) - assertInvoke(getSingleMethod(t2bC, "g2b"), "T1", "f") + assertNoInvoke(getSingleMethod(t2a, "g2a")) + assertInvoke(getSingleMethod(t2b, "g2b"), "T1", "f") assertInvoke(getSingleMethod(ca, "m1a"), "T1", "f") assertNoInvoke(getSingleMethod(ca, "m2a")) // no invoke, see comment on def g2a @@ -732,14 +674,13 @@ class InlinerTest extends ClearAfterClass { val code = """class C { | trait T { @inline final def f = 1 } - | class D extends T{ + | class D extends T { | def m(t: T) = t.f | } - | | def m(d: D) = d.f |} """.stripMargin - val List(c, d, t, tC) = compile(code) + val List(c, d, t) = compile(code) assertNoInvoke(getSingleMethod(d, "m")) assertNoInvoke(getSingleMethod(c, "m")) } @@ -754,9 +695,9 @@ class InlinerTest extends ClearAfterClass { | def t2(t: T) = t.f(2) |} """.stripMargin - val List(c, t, tc) = compile(code) - val t1 = getSingleMethod(tc, "t1") - val t2 = getSingleMethod(tc, "t2") + val List(c, t) = compile(code) + val t1 = getSingleMethod(t, "t1") + val t2 = getSingleMethod(t, "t2") val cast = TypeOp(CHECKCAST, "C") Set(t1, t2).foreach(m => assert(m.instructions.contains(cast), m.instructions)) } @@ -803,8 +744,8 @@ class InlinerTest extends ClearAfterClass { | final val d = 3 | final val d1: Int = 3 | - | @noinline def f = 5 // re-written to T$class - | @noinline final def g = 6 // re-written + | @noinline def f = 5 + | @noinline final def g = 6 | | @noinline def h: Int | @inline def i: Int @@ -817,8 +758,8 @@ class InlinerTest extends ClearAfterClass { | final val d = 3 | final val d1: Int = 3 | - | @noinline def f = 5 // not re-written (not final) - | @noinline final def g = 6 // re-written + | @noinline def f = 5 + | @noinline final def g = 6 | | @noinline def h: Int | @inline def i: Int @@ -835,7 +776,7 @@ class InlinerTest extends ClearAfterClass { |} """.stripMargin - val List(c, t, tClass, u, uClass) = compile(code, allowMessage = _.msg contains "i()I is annotated @inline but cannot be inlined") + val List(c, t, u) = compile(code, allowMessage = _.msg contains "i()I is annotated @inline but cannot be inlined") val m1 = getSingleMethod(c, "m1") assertInvoke(m1, "T", "a") assertInvoke(m1, "T", "b") @@ -844,8 +785,8 @@ class InlinerTest extends ClearAfterClass { assertNoInvoke(getSingleMethod(c, "m2")) val m3 = getSingleMethod(c, "m3") - assertInvoke(m3, "T$class", "f") - assertInvoke(m3, "T$class", "g") + assertInvoke(m3, "T", "f") + assertInvoke(m3, "T", "g") assertInvoke(m3, "T", "h") assertInvoke(m3, "T", "i") @@ -858,7 +799,7 @@ class InlinerTest extends ClearAfterClass { val m6 = getSingleMethod(c, "m6") assertInvoke(m6, "U", "f") - assertInvoke(m6, "U$class", "g") + assertInvoke(m6, "U", "g") assertInvoke(m6, "U", "h") assertInvoke(m6, "U", "i") } @@ -988,7 +929,567 @@ class InlinerTest extends ClearAfterClass { val List(c) = compile(code) val t = getSingleMethod(c, "t").instructions assertNoInvoke(t) - assert(2 == t.collect({case Ldc(_, "hai!") => }).size) // twice the body of f + assert(1 == t.collect({case Ldc(_, "hai!") => }).size) // push-pop eliminates the first LDC("hai!") assert(1 == t.collect({case Jump(IFNONNULL, _) => }).size) // one single null check } + + @Test + def inlineIndyLambda(): Unit = { + val code = + """object M { + | @inline def m(s: String) = { + | val f = (x: String) => x.trim + | f(s) + | } + |} + |class C { + | @inline final def m(s: String) = { + | val f = (x: String) => x.trim + | f(s) + | } + | def t1 = m("foo") + | def t2 = M.m("bar") + |} + """.stripMargin + + val List(c, _, _) = compile(code) + + val t1 = getSingleMethod(c, "t1") + assert(t1.instructions forall { // indy is eliminated by push-pop + case _: InvokeDynamic => false + case _ => true + }) + // the indy call is inlined into t, and the closure elimination rewrites the closure invocation to the body method + assertInvoke(t1, "C", "C$$$anonfun$2") + + val t2 = getSingleMethod(c, "t2") + assert(t2.instructions forall { // indy is eliminated by push-pop + case _: InvokeDynamic => false + case _ => true + }) + assertInvoke(t2, "M$", "M$$$anonfun$1") + } + + @Test + def inlinePostRequests(): Unit = { + val code = + """class C { + | final def f = 10 + | final def g = f + 19 + | final def h = g + 29 + | final def i = h + 39 + |} + """.stripMargin + + val List(c) = compile(code) + val hMeth = findAsmMethod(c, "h") + val gMeth = findAsmMethod(c, "g") + val iMeth = findAsmMethod(c, "i") + val fCall = getCallsite(gMeth, "f") + val gCall = getCallsite(hMeth, "g") + val hCall = getCallsite(iMeth, "h") + + val warning = inliner.canInlineBody(gCall) + assert(warning.isEmpty, warning) + + inliner.inline(InlineRequest(hCall, + post = List(InlineRequest(gCall, + post = List(InlineRequest(fCall, Nil)))))) + assertNoInvoke(convertMethod(iMeth)) // no invoke in i: first h is inlined, then the inlined call to g is also inlined, etc for f + assertInvoke(convertMethod(gMeth), "C", "f") // g itself still has the call to f + } + + @Test + def postRequestSkipAlreadyInlined(): Unit = { + val code = + """class C { + | final def a = 10 + | final def b = a + 20 + | final def c = b + 30 + | final def d = c + 40 + |} + """.stripMargin + + val List(cl) = compile(code) + val List(b, c, d) = List("b", "c", "d").map(findAsmMethod(cl, _)) + val aCall = getCallsite(b, "a") + val bCall = getCallsite(c, "b") + val cCall = getCallsite(d, "c") + + inliner.inline(InlineRequest(bCall, Nil)) + + val req = InlineRequest(cCall, + List(InlineRequest(bCall, + List(InlineRequest(aCall, Nil))))) + inliner.inline(req) + + assertNoInvoke(convertMethod(d)) + } + + @Test + def inlineAnnotatedCallsite(): Unit = { + val code = + """class C { + | final def a(x: Int, f: Int => Int): Int = f(x) + | final def b(x: Int) = x + | final def c = 1 + | final def d[T] = 2 + | final def e[T](x: T) = c + | final def f[T](x: T) = println(x) + | final def g(x: Int)(y: Int) = x + | + | def t1 = a(10, _ + 1) + | def t2 = a(10, _ + 1): @noinline + | def t3 = b(3) + | def t4 = b(3): @inline + | def t5 = c: @inline + | def t6 = d[Int]: @inline + | def t7 = e[Int](2): @inline + | def t8 = f[Int](2): @inline + | def t9 = g(1)(2): @inline + |} + """.stripMargin + + val List(c) = compile(code) + assertInvoke(getSingleMethod(c, "t1"), "C", "C$$$anonfun$1") + assertInvoke(getSingleMethod(c, "t2"), "C", "a") + assertInvoke(getSingleMethod(c, "t3"), "C", "b") + assertNoInvoke(getSingleMethod(c, "t4")) + assertNoInvoke(getSingleMethod(c, "t5")) + assertNoInvoke(getSingleMethod(c, "t6")) + assertInvoke(getSingleMethod(c, "t7"), "C", "c") + assertInvoke(getSingleMethod(c, "t8"), "scala/Predef$", "println") + assertNoInvoke(getSingleMethod(c, "t9")) + } + + @Test + def inlineNoInlineOverride(): Unit = { + val code = + """class C { + | @inline final def f1(x: Int) = x + | @noinline final def f2(x: Int) = x + | final def f3(x: Int) = x + | + | def t1 = f1(1) // inlined + | def t2 = f2(1) // not inlined + | def t3 = f1(1): @noinline // not inlined + | def t4 = f2(1): @inline // not inlined (cannot override the def-site @noinline) + | def t5 = f3(1): @inline // inlined + | def t6 = f3(1): @noinline // not inlined + | + | def t7 = f1(1) + (f3(1): @inline) // without parenthesis, the ascription encloses the entire expression.. + | def t8 = f1(1) + (f1(1): @noinline) + | def t9 = f1(1) + f1(1) : @noinline // the ascription goes on the entire expression, so on the + invocation.. both f1 are inlined + |} + """.stripMargin + + val List(c) = compile(code) + assertNoInvoke(getSingleMethod(c, "t1")) + assertInvoke(getSingleMethod(c, "t2"), "C", "f2") + assertInvoke(getSingleMethod(c, "t3"), "C", "f1") + assertInvoke(getSingleMethod(c, "t4"), "C", "f2") + assertNoInvoke(getSingleMethod(c, "t5")) + assertInvoke(getSingleMethod(c, "t6"), "C", "f3") + assertNoInvoke(getSingleMethod(c, "t7")) + assertInvoke(getSingleMethod(c, "t8"), "C", "f1") + assertNoInvoke(getSingleMethod(c, "t9")) + } + + @Test + def inlineHigherOrder(): Unit = { + val code = + """class C { + | final def h(f: Int => Int): Int = f(0) + | def t1 = h(x => x + 1) + | def t2 = { + | val fun = (x: Int) => x + 1 + | h(fun) + | } + | def t3(f: Int => Int) = h(f) + | def t4(f: Int => Int) = { + | val fun = f + | h(fun) + | } + | def t5 = h(Map(0 -> 10)) // not currently inlined + |} + """.stripMargin + + val List(c) = compile(code) + assertInvoke(getSingleMethod(c, "t1"), "C", "C$$$anonfun$1") + assertInvoke(getSingleMethod(c, "t2"), "C", "C$$$anonfun$2") + assertInvoke(getSingleMethod(c, "t3"), "scala/Function1", "apply$mcII$sp") + assertInvoke(getSingleMethod(c, "t4"), "scala/Function1", "apply$mcII$sp") + assertInvoke(getSingleMethod(c, "t5"), "C", "h") + } + + @Test + def twoStepNoInlineHandler(): Unit = { + val code = + """class C { + | @inline final def f = try 1 catch { case _: Throwable => 2 } + | @inline final def g = f + | def t = println(g) // cannot inline g onto non-empty stack once that f was inlined into g + |} + """.stripMargin + + val warn = + """C::g()I is annotated @inline but could not be inlined: + |The operand stack at the callsite in C::t()V contains more values than the + |arguments expected by the callee C::g()I. These values would be discarded + |when entering an exception handler declared in the inlined method.""".stripMargin + + val List(c) = compile(code, allowMessage = _.msg contains warn) + assertInvoke(getSingleMethod(c, "t"), "C", "g") + } + + @Test + def twoStepNoInlinePrivate(): Unit = { + val code = + """class C { + | @inline final def g = { + | @noinline def f = 0 + | f + | } + | @inline final def h = g // after inlining g, h has an invocate of private method f$1 + |} + |class D { + | def t(c: C) = c.h // cannot inline + |} + """.stripMargin + + val warn = + """C::h()I is annotated @inline but could not be inlined: + |The callee C::h()I contains the instruction INVOKESPECIAL C.f$1 ()I + |that would cause an IllegalAccessError when inlined into class D.""".stripMargin + + val List(c, d) = compile(code, allowMessage = _.msg contains warn) + assertInvoke(getSingleMethod(c, "h"), "C", "f$1") + assertInvoke(getSingleMethod(d, "t"), "C", "h") + } + + @Test + def twoStepInlinePrivate(): Unit = { + val code = + """class C { + | @inline final def g = { // initially, g invokes the private method f$1, but then f$1 is inlined + | @inline def f = 0 + | f + | } + |} + |class D { + | def t(c: C) = c.g // can inline + |} + """.stripMargin + + val List(c, d) = compile(code) + assertNoInvoke(getSingleMethod(c, "g")) + assertNoInvoke(getSingleMethod(d, "t")) + } + + @Test + def optimizeSpecializedClosures(): Unit = { + val code = + """class ValKl(val x: Int) extends AnyVal + | + |class C { + | def t1 = { + | // IndyLambda: SAM type is JFunction1$mcII$sp, SAM is apply$mcII$sp(I)I, body method is $anonfun(I)I + | val f = (x: Int) => x + 1 + | // invocation of apply$mcII$sp(I)I, matches the SAM in IndyLambda. no boxing / unboxing needed. + | f(10) + | // opt: re-write the invocation to the body method + | } + | + | @inline final def m1a(f: Long => Int) = f(1l) + | def t1a = m1a(l => l.toInt) // after inlining m1a, we have the same situation as in t1 + | + | def t2 = { + | // there is no specialized variant of Function2 for this combination of types, so the IndyLambda has to create a generic Function2. + | // IndyLambda: SAM type is JFunction2, SAM is apply(ObjectObject)Object, body method is $anonfun$adapted(ObjectObject)Object + | val f = (b: Byte, i: Int) => i + b + | // invocation of apply(ObjectOjbect)Object, matches SAM in IndyLambda. arguments are boxed, result unboxed. + | f(1, 2) + | // opt: re-wrtie to $anonfun$adapted + | // inline that call, then we get box-unbox pairs (can be eliminated) and a call to $anonfun(BI)I + | } + | + | def t3 = { + | // similar to t2: for functions with value class parameters, IndyLambda always uses the generic Function version. + | // IndyLambda: SAM type is JFunction1, SAM is apply(Object)Object, body method is $anonfun$adapted(Object)Object + | val f = (a: ValKl) => a + | // invocation of apply(Object)Object, ValKl instance is created, result extracted + | f(new ValKl(1)) + | // opt: re-write to $anonfun$adapted. + | // inline that call, then we get value class instantiation-extraction pairs and a call to $anonfun(I)I + | } + | + | def t4 = { + | // IndyLambda: SAM type is JFunction1$mcII$sp, SAM is apply$mcII$sp(I)I, body method is $anonfun(I)I + | val f: Int => Any = (x: Int) => 1 + | // invocation of apply(Object)Object, argument is boxed. method name and type doesn't match IndyLambda. + | f(10) + | // opt: rewriting to the body method requires inserting an unbox operation for the argument, and a box operation for the result + | // that produces a box-unbox pair and a call to $anonfun(I)I + | } + | + | + | @inline final def m4a[T, U, V](f: (T, U) => V, x: T, y: U) = f(x, y) // invocation to generic apply(ObjectObject)Object + | def t4a = m4a((x: Int, y: Double) => 1l + x + y.toLong, 1, 2d) // IndyLambda uses specilized JFunction2$mcJID$sp. after inlining m4a, similar to t4. + | + | def t5 = { + | // no specialization for the comibnation of primitives + | // IndyLambda: SAM type is JFunction2, SAM is generic apply, body method is $anonfun$adapted + | val f: (Int, Byte) => Any = (x: Int, b: Byte) => 1 + | // invocation of generic apply. + | f(10, 3) + | // opt: re-write to $anonfun$adapted, inline that method. generates box-unbox pairs and a call to $anonfun(IB)I + | } + | + | def t5a = m4a((x: Int, y: Byte) => 1, 12, 31.toByte) // similar to t5 after inlining m4a + | + | // m6$mIVc$sp invokes apply$mcVI$sp + | @inline final def m6[@specialized(Int) T, @specialized(Unit) U](f: T => U, x: T): Unit = f(x) + | // IndyLambda: JFunction1$mcVI$sp, SAM is apply$mcVI$sp, body method $anonfun(I)V + | // invokes m6$mIVc$sp (Lscala/Function1;I)V + | def t6 = m6((x: Int) => (), 10) + | // opt: after inlining m6, the closure method invocation (apply$mcVI$sp) matches the IndyLambda, the call can be rewritten, no boxing + | + | // m7 invokes apply + | @inline final def m7[@specialized(Boolean) T, @specialized(Int) U](f: T => U, x: T): Unit = f(x) + | // IndyLambda: JFunction1, SAM is apply(Object)Object, body method is $anonfun$adapted(Obj)Obj + | // `true` is boxed before passing to m7 + | def t7 = m7((x: Boolean) => (), true) + | // opt: after inlining m7, the apply call is re-written to $anonfun$adapted, which is then inlined. + | // we get a box-unbox pair and a call to $anonfun(Z)V + | + | + | // invokes the generic apply(ObjObj)Obj + | @inline final def m8[T, U, V](f: (T, U) => V, x: T, y: U) = f(x, y) + | // IndyLambda: JFunction2$mcJID$sp, SAM is apply$mcJID$sp, body method $anonfun(ID)J + | // boxes the int and double arguments and calls m8, unboxToLong the result + | def t8 = m8((x: Int, y: Double) => 1l + x + y.toLong, 1, 2d) + | // opt: after inlining m8, rewrite to the body method $anonfun(ID)J, which requires inserting unbox operations for the params, box for the result + | // the box-unbox pairs can then be optimized away + | + | // m9$mVc$sp invokes apply$mcVI$sp + | @inline final def m9[@specialized(Unit) U](f: Int => U): Unit = f(1) + | // IndyLambda: JFunction1, SAM is apply(Obj)Obj, body method $anonfun$adapted(Ojb)Obj + | // invocation of m9$mVc$sp + | def t9 = m9(println) + | // opt: after inlining m9, rewrite to $anonfun$adapted(Ojb)Obj, which requires inserting a box operation for the parameter. + | // then we inline $adapted, which has signature (Obj)V. the `BoxedUnit.UNIT` from the body of $anonfun$adapted is eliminated by push-pop + | + | def t9a = (1 to 10) foreach println // similar to t9 + | + | def intCons(i: Int): Unit = () + | // IndyLambda: JFunction1$mcVI$sp, SAM is apply$mcVI$sp, body method $anonfun(I)V + | def t10 = m9(intCons) + | // after inlining m9, rewrite the apply$mcVI$sp call to the body method, no adaptations required + | + | def t10a = (1 to 10) foreach intCons // similar to t10 + |} + """.stripMargin + val List(c, _, _) = compile(code) + + assertSameSummary(getSingleMethod(c, "t1"), List(BIPUSH, "C$$$anonfun$1", IRETURN)) + assertSameSummary(getSingleMethod(c, "t1a"), List(LCONST_1, "C$$$anonfun$2", IRETURN)) + assertSameSummary(getSingleMethod(c, "t2"), List(ICONST_1, ICONST_2, "C$$$anonfun$3",IRETURN)) + + // val a = new ValKl(n); new ValKl(anonfun(a.x)).x + // value class instantiation-extraction should be optimized by boxing elim + assertSameSummary(getSingleMethod(c, "t3"), List( + NEW, DUP, ICONST_1, "<init>", ASTORE, + NEW, DUP, ALOAD, "x", + "C$$$anonfun$4", + "<init>", + "x", IRETURN)) + + assertSameSummary(getSingleMethod(c, "t4"), List(BIPUSH, "C$$$anonfun$5", "boxToInteger", ARETURN)) + assertSameSummary(getSingleMethod(c, "t4a"), List(ICONST_1, LDC, "C$$$anonfun$6", LRETURN)) + assertSameSummary(getSingleMethod(c, "t5"), List(BIPUSH, ICONST_3, "C$$$anonfun$7", "boxToInteger", ARETURN)) + assertSameSummary(getSingleMethod(c, "t5a"), List(BIPUSH, BIPUSH, I2B, "C$$$anonfun$8", IRETURN)) + assertSameSummary(getSingleMethod(c, "t6"), List(BIPUSH, "C$$$anonfun$9", RETURN)) + assertSameSummary(getSingleMethod(c, "t7"), List(ICONST_1, "C$$$anonfun$10", RETURN)) + assertSameSummary(getSingleMethod(c, "t8"), List(ICONST_1, LDC, "C$$$anonfun$11", LRETURN)) + assertSameSummary(getSingleMethod(c, "t9"), List(ICONST_1, "boxToInteger", "C$$$anonfun$12", RETURN)) + + // t9a inlines Range.foreach, which is quite a bit of code, so just testing the core + assertInvoke(getSingleMethod(c, "t9a"), "C", "C$$$anonfun$13") + assertInvoke(getSingleMethod(c, "t9a"), "scala/runtime/BoxesRunTime", "boxToInteger") + + assertSameSummary(getSingleMethod(c, "t10"), List( + ICONST_1, ISTORE, + ALOAD, ILOAD, + "C$$$anonfun$14", RETURN)) + + // t10a inlines Range.foreach + assertInvoke(getSingleMethod(c, "t10a"), "C", "C$$$anonfun$15") + assertDoesNotInvoke(getSingleMethod(c, "t10a"), "boxToInteger") + } + + @Test + def refElimination(): Unit = { + val code = + """class C { + | def t1 = { + | var i = 0 + | @inline def inner() = i += 1 + | inner() + | i + | } + | + | final def m(f: Int => Unit) = f(10) + | def t2 = { + | var x = -1 // IntRef not yet eliminated: closure elimination does not + | m(i => if (i == 10) x = 1) // yet inline the anonfun method, need to improve the heuristsics + | x + | } + |} + """.stripMargin + val List(c) = compile(code) + assertSameCode(getSingleMethod(c, "t1"), List(Op(ICONST_0), Op(ICONST_1), Op(IADD), Op(IRETURN))) + assertEquals(getSingleMethod(c, "t2").instructions collect { case i: Invoke => i.owner +"."+ i.name }, List( + "scala/runtime/IntRef.create", "C.C$$$anonfun$1")) + } + + @Test + def tupleElimination(): Unit = { + val code = + """class C { + | @inline final def tpl[A, B](a: A, b: B) = (a, b) + | @inline final def t_1[A, B](t: (A, B)) = t._1 + | @inline final def t_2[A, B](t: (A, B)) = t._2 + | + | def t1 = { + | val t = (3, 4) // specialized tuple + | t_1(t) + t_2(t) // invocations to generic _1 / _2, box operation inserted when eliminated + | } + | + | def t2 = { + | val t = tpl(1, 2) // generic Tuple2[Integer, Integer] created + | t._1 + t._2 // invokes the specialized _1$mcI$sp, eliminating requires adding an unbox operation + | } + | + | @inline final def m = (1, 3) + | def t3 = { + | val (a, b) = m + | a - b + | } + | + | def t4 = { + | val ((a, b), (c, d)) = (m, m) + | a + b + c + d + | } + | + | def t5 = m match { + | case (1, y) => y + | case (x, y) => x * y + | } + |} + """.stripMargin + val List(c) = compile(code) + assertSameCode(getSingleMethod(c, "t1"), List(Op(ICONST_3), Op(ICONST_4), Op(IADD), Op(IRETURN))) + assertSameCode(getSingleMethod(c, "t2"), List(Op(ICONST_1), Op(ICONST_2), Op(IADD), Op(IRETURN))) + assertSameCode(getSingleMethod(c, "t3"), List(Op(ICONST_1), Op(ICONST_3), Op(ISUB), Op(IRETURN))) + assertNoInvoke(getSingleMethod(c, "t4")) + assertNoInvoke(getSingleMethod(c, "t5")) + } + + @Test + def redundantCasts(): Unit = { + + // we go through the hoop of inlining the casts because erasure eliminates `asInstanceOf` calls + // that are statically known to succeed. For example the following cast is removed by erasure: + // `(if (b) c else d).asInstanceOf[C]` + + val code = + """class C { + | @inline final def asO(a: Any) = a.asInstanceOf[Object] + | @inline final def asC(a: Any) = a.asInstanceOf[C] + | @inline final def asD(a: Any) = a.asInstanceOf[D] + | + | def t1(c: C) = asC(c) // eliminated + | def t2(c: C) = asO(c) // eliminated + | def t3(c: Object) = asC(c) // not elimianted + | def t4(c: C, d: D, b: Boolean) = asC(if (b) c else d) // not eliminated: lub of two non-equal reference types approximated with Object + | def t5(c: C, d: D, b: Boolean) = asO(if (b) c else d) + | def t6(c: C, cs: Array[C], b: Boolean) = asO(if (b) c else cs) + |} + |class D extends C + """.stripMargin + val List(c, _) = compile(code) + def casts(m: String) = getSingleMethod(c, m).instructions collect { case TypeOp(CHECKCAST, tp) => tp } + assertSameCode(getSingleMethod(c, "t1"), List(VarOp(ALOAD, 1), Op(ARETURN))) + assertSameCode(getSingleMethod(c, "t2"), List(VarOp(ALOAD, 1), Op(ARETURN))) + assertSameCode(getSingleMethod(c, "t3"), List(VarOp(ALOAD, 1), TypeOp(CHECKCAST, "C"), Op(ARETURN))) + assertEquals(casts("t4"), List("C")) + assertEquals(casts("t5"), Nil) + assertEquals(casts("t6"), Nil) + } + + @Test + def inlineFromSealed(): Unit = { + val code = + """sealed abstract class Foo { + | @inline def bar(x: Int) = x + 1 + |} + |object Foo { + | def mkFoo(): Foo = new Baz2 + |} + | + |object Baz1 extends Foo + |final class Baz2 extends Foo + | + |object Test { + | def f = Foo.mkFoo() bar 10 + |} + """.stripMargin + + val cls = compile(code) + val test = cls.find(_.name == "Test$").get + assertSameSummary(getSingleMethod(test, "f"), List( + GETSTATIC, "mkFoo", + BIPUSH, ISTORE, + IFNONNULL, ACONST_NULL, ATHROW, -1 /*label*/, + ILOAD, ICONST_1, IADD, IRETURN)) + } + + @Test // a test taken from the test suite for the 2.11 inliner + def oldInlineHigherOrderTest(): Unit = { + val code = + """class C { + | private var debug = false + | @inline private def ifelse[T](cond: => Boolean, ifPart: => T, elsePart: => T): T = if (cond) ifPart else elsePart + | final def t = ifelse(debug, 1, 2) + |} + """.stripMargin + val List(c) = compile(code) + + // box-unbox will clean it up + assertSameSummary(getSingleMethod(c, "t"), List( + ALOAD, "C$$$anonfun$1", IFEQ /*A*/, + "C$$$anonfun$2", IRETURN, + -1 /*A*/, "C$$$anonfun$3", IRETURN)) + } + + @Test + def inlineProject(): Unit = { + val codeA = "final class A { @inline def f = 1 }" + val codeB = "class B { def t(a: A) = a.f }" + // tests that no warning is emitted + val List(a, b) = compileClassesSeparately(List(codeA, codeB), extraArgs = "-Yopt:l:project -Yopt-warnings") + assertInvoke(getSingleMethod(b, "t"), "A", "f") + } + + @Test + def sd86(): Unit = { + val code = + """trait T1 { @inline def f = 999 } + |trait T2 { self: T1 => @inline override def f = 1 } // note that f is not final + |class C extends T1 with T2 + """.stripMargin + val List(c, t1, t2) = compile(code, allowMessage = _ => true) + // the forwarder C.f is inlined, so there's no invocation + assertSameSummary(getSingleMethod(c, "f"), List(ICONST_1, IRETURN)) + } } diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOpts.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOpts.scala deleted file mode 100644 index 5ef2458c0a..0000000000 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOpts.scala +++ /dev/null @@ -1,92 +0,0 @@ -package scala.tools.nsc -package backend.jvm -package opt - -import org.junit.runner.RunWith -import org.junit.runners.JUnit4 -import org.junit.Test -import scala.tools.asm.Opcodes._ -import org.junit.Assert._ - -import scala.tools.testing.AssertUtil._ - -import CodeGenTools._ -import scala.tools.partest.ASMConverters -import ASMConverters._ -import scala.tools.testing.ClearAfterClass - -object MethodLevelOpts extends ClearAfterClass.Clearable { - var methodOptCompiler = newCompiler(extraArgs = "-target:jvm-1.6 -Ybackend:GenBCode -Yopt:l:method") - def clear(): Unit = { methodOptCompiler = null } -} - -@RunWith(classOf[JUnit4]) -class MethodLevelOpts extends ClearAfterClass { - ClearAfterClass.stateToClear = MethodLevelOpts - - val methodOptCompiler = MethodLevelOpts.methodOptCompiler - - def wrapInDefault(code: Instruction*) = List(Label(0), LineNumber(1, Label(0))) ::: code.toList ::: List(Label(1)) - - @Test - def eliminateEmptyTry(): Unit = { - val code = "def f = { try {} catch { case _: Throwable => 0; () }; 1 }" - val warn = "a pure expression does nothing in statement position" - assertSameCode(singleMethodInstructions(methodOptCompiler)(code, allowMessage = _.msg contains warn), wrapInDefault(Op(ICONST_1), Op(IRETURN))) - } - - @Test - def cannotEliminateLoadBoxedUnit(): Unit = { - // the compiler inserts a boxed into the try block. it's therefore non-empty (and live) and not eliminated. - val code = "def f = { try {} catch { case _: Throwable => 0 }; 1 }" - val m = singleMethod(methodOptCompiler)(code) - assertTrue(m.handlers.length == 1) - assertSameCode(m.instructions.take(3), List(Label(0), LineNumber(1, Label(0)), Field(GETSTATIC, "scala/runtime/BoxedUnit", "UNIT", "Lscala/runtime/BoxedUnit;"))) - } - - @Test - def inlineThrowInCatchNotTry(): Unit = { - // the try block does not contain the `ATHROW` instruction, but in the catch block, `ATHROW` is inlined - val code = "def f(e: Exception) = throw { try e catch { case _: Throwable => e } }" - val m = singleMethod(methodOptCompiler)(code) - assertHandlerLabelPostions(m.handlers.head, m.instructions, 0, 3, 5) - assertSameCode(m.instructions, - wrapInDefault(VarOp(ALOAD, 1), Label(3), Op(ATHROW), Label(5), FrameEntry(4, List(), List("java/lang/Throwable")), Op(POP), VarOp(ALOAD, 1), Op(ATHROW)) - ) - } - - @Test - def inlineReturnInCatchNotTry(): Unit = { - val code = "def f: Int = return { try 1 catch { case _: Throwable => 2 } }" - // cannot inline the IRETURN into the try block (because RETURN may throw IllegalMonitorState) - val m = singleMethod(methodOptCompiler)(code) - assertHandlerLabelPostions(m.handlers.head, m.instructions, 0, 3, 5) - assertSameCode(m.instructions, - wrapInDefault(Op(ICONST_1), Label(3), Op(IRETURN), Label(5), FrameEntry(4, List(), List("java/lang/Throwable")), Op(POP), Op(ICONST_2), Op(IRETURN))) - } - - @Test - def simplifyJumpsInTryCatchFinally(): Unit = { - val code = - """def f: Int = - | try { - | return 1 - | } catch { - | case _: Throwable => - | return 2 - | } finally { - | return 2 - | // dead - | val x = try 10 catch { case _: Throwable => 11 } - | println(x) - | } - """.stripMargin - val m = singleMethod(methodOptCompiler)(code) - assertTrue(m.handlers.length == 2) - assertSameCode(m.instructions.dropNonOp, // drop line numbers and labels that are only used by line numbers - - // one single label left :-) - List(Op(ICONST_1), VarOp(ISTORE, 2), Jump(GOTO, Label(20)), Op(POP), Op(ICONST_2), VarOp(ISTORE, 2), Jump(GOTO, Label(20)), VarOp(ASTORE, 3), Op(ICONST_2), Op(IRETURN), Label(20), Op(ICONST_2), Op(IRETURN)) - ) - } -} diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOptsTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOptsTest.scala new file mode 100644 index 0000000000..0a9a26cda7 --- /dev/null +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOptsTest.scala @@ -0,0 +1,762 @@ +package scala.tools.nsc +package backend.jvm +package opt + +import org.junit.runner.RunWith +import org.junit.runners.JUnit4 +import org.junit.Test +import scala.tools.asm.Opcodes._ +import org.junit.Assert._ + +import scala.tools.asm.tree.ClassNode +import scala.tools.nsc.backend.jvm.AsmUtils._ +import scala.tools.testing.AssertUtil._ + +import CodeGenTools._ +import scala.tools.partest.ASMConverters +import ASMConverters._ +import scala.tools.testing.ClearAfterClass +import scala.collection.convert.decorateAsScala._ + +object MethodLevelOptsTest extends ClearAfterClass.Clearable { + var methodOptCompiler = newCompiler(extraArgs = "-Yopt:l:method") + def clear(): Unit = { methodOptCompiler = null } +} + +@RunWith(classOf[JUnit4]) +class MethodLevelOptsTest extends ClearAfterClass { + ClearAfterClass.stateToClear = MethodLevelOptsTest + + val methodOptCompiler = MethodLevelOptsTest.methodOptCompiler + + def wrapInDefault(code: Instruction*) = List(Label(0), LineNumber(1, Label(0))) ::: code.toList ::: List(Label(1)) + + def locals(c: ClassNode, m: String) = findAsmMethod(c, m).localVariables.asScala.toList.map(l => (l.name, l.index)).sortBy(_._2) + + @Test + def eliminateEmptyTry(): Unit = { + val code = "def f = { try {} catch { case _: Throwable => 0; () }; 1 }" + val warn = "a pure expression does nothing in statement position" + assertSameCode(singleMethodInstructions(methodOptCompiler)(code, allowMessage = _.msg contains warn), wrapInDefault(Op(ICONST_1), Op(IRETURN))) + } + + @Test + def eliminateLoadBoxedUnit(): Unit = { + // the compiler inserts a boxed into the try block. it's therefore non-empty (and live) and not eliminated. + val code = "def f = { try {} catch { case _: Throwable => 0 }; 1 }" + val m = singleMethod(methodOptCompiler)(code) + assertTrue(m.handlers.length == 0) + assertSameCode(m, List(Op(ICONST_1), Op(IRETURN))) + } + + @Test + def inlineThrowInCatchNotTry(): Unit = { + // the try block does not contain the `ATHROW` instruction, but in the catch block, `ATHROW` is inlined + val code = "def f(e: Exception) = throw { try e catch { case _: Throwable => e } }" + val m = singleMethod(methodOptCompiler)(code) + assertHandlerLabelPostions(m.handlers.head, m.instructions, 0, 3, 5) + assertSameCode(m.instructions, + wrapInDefault(VarOp(ALOAD, 1), Label(3), Op(ATHROW), Label(5), FrameEntry(4, List(), List("java/lang/Throwable")), Op(POP), VarOp(ALOAD, 1), Op(ATHROW)) + ) + } + + @Test + def inlineReturnInCatchNotTry(): Unit = { + val code = "def f: Int = return { try 1 catch { case _: Throwable => 2 } }" + // cannot inline the IRETURN into the try block (because RETURN may throw IllegalMonitorState) + val m = singleMethod(methodOptCompiler)(code) + assertHandlerLabelPostions(m.handlers.head, m.instructions, 0, 3, 5) + assertSameCode(m.instructions, + wrapInDefault(Op(ICONST_1), Label(3), Op(IRETURN), Label(5), FrameEntry(4, List(), List("java/lang/Throwable")), Op(POP), Op(ICONST_2), Op(IRETURN))) + } + + @Test + def simplifyJumpsInTryCatchFinally(): Unit = { + val code = + """def f: Int = + | try { + | return 1 + | } catch { + | case _: Throwable => + | return 2 + | } finally { + | return 3 + | // dead + | val x = try 10 catch { case _: Throwable => 11 } + | println(x) + | } + """.stripMargin + val m = singleMethod(methodOptCompiler)(code) + assertTrue(m.handlers.isEmpty) + assertSameCode(m, List(Op(ICONST_3), Op(IRETURN))) + } + + @Test + def nullStoreLoadElim(): Unit = { + // point of this test: we have two cleanups + // - remove `ACONST_NULL; ASTORE x` if x is otherwise not live + // - remove `ASTORE x; ALOAD x` if x is otherwise not live + // in the example below, we have `ACONST_NULL; ASTORE x; ALOAD x`. in this case the store-load + // should be removed (even though it looks like a null-store at first). + val code = + """class C { + | def t = { + | val x = null + | x.toString + | } + |} + """.stripMargin + val List(c) = compileClasses(methodOptCompiler)(code) + assertSameCode(getSingleMethod(c, "t"), List( + Op(ACONST_NULL), Invoke(INVOKEVIRTUAL, "java/lang/Object", "toString", "()Ljava/lang/String;", false), Op(ARETURN))) + } + + @Test + def deadStoreReferenceElim(): Unit = { + val code = + """class C { + | def t = { + | var a = "a" // assign to non-initialized, directly removed by dead store + | a = "b" // assign to initialized, replaced by null-store, which is then removed: the var is not live, the uses are null-store or store-load + | a = "c" + | a // store-load pair will be eliminated + | } + |} + """.stripMargin + val List(c) = compileClasses(methodOptCompiler)(code) + assertSameCode( + getSingleMethod(c, "t"), List(Ldc(LDC, "c"), Op(ARETURN))) + } + + @Test + def deadStoreReferenceKeepNull(): Unit = { + val code = + """class C { + | def t = { + | var a = "el" // this store is live, used in the println. + | println(a) + | a = "met" // since it's an ASTORE to a live variable, cannot elim the store (SI-5313), but store null instead. + | // so we get `LDC met; POP; ACONST_NULL; ASTORE 1`. the `LDC met; POP` is eliminated by push-pop. + | a = "zit" // this store is live, so we get `LDC zit; ASOTRE 1; ALOAD 1; ARETURN`. + | // we cannot eliminated the store-load sequence, because the local is live (again SI-5313). + | a + | } + |} + """.stripMargin + val List(c) = compileClasses(methodOptCompiler)(code) + + assertSameCode(getSingleMethod(c, "t"), List( + Ldc(LDC, "el"), VarOp(ASTORE, 1), + Field(GETSTATIC, "scala/Predef$", "MODULE$", "Lscala/Predef$;"), VarOp(ALOAD, 1), Invoke(INVOKEVIRTUAL, "scala/Predef$", "println", "(Ljava/lang/Object;)V", false), + Op(ACONST_NULL), VarOp(ASTORE, 1), + Ldc(LDC, "zit"), VarOp(ASTORE, 1), VarOp(ALOAD, 1), Op(ARETURN))) + } + + @Test + def elimUnusedTupleObjectStringBox(): Unit = { + val code = + """class C { + | def t(x: Int, y: Int): Int = { + | val a = (x, y) // Tuple2$mcII$sp + | val b = (a, y) // Tuple2 + | val c = (new Object, "krik", new String) // unused java/lang/Object, java/lang/String allocation and string constant is also eliminated + | val d = new java.lang.Integer(x) + | val e = new String(new Array[Char](23)) // array allocation not eliminated, as it may throw (negative size, SI-8601) + | val f = new scala.runtime.IntRef(11) + | x + y + | } + |} + """.stripMargin + val List(c) = compileClasses(methodOptCompiler)(code) + assertSameCode(getSingleMethod(c, "t"), List( + IntOp(BIPUSH, 23), IntOp(NEWARRAY, 5), Op(POP), VarOp(ILOAD, 1), VarOp(ILOAD, 2), Op(IADD), Op(IRETURN))) + } + + @Test + def noElimImpureConstructor(): Unit = { + val code = + """class C { + | def t(x: Int, y: Int): Int = { + | val a = new java.lang.Integer("nono") + | x + y + | } + |} + """.stripMargin + val List(c) = compileClasses(methodOptCompiler)(code) + assertSameCode(getSingleMethod(c, "t"), List( + TypeOp(NEW, "java/lang/Integer"), Ldc(LDC, "nono"), Invoke(INVOKESPECIAL, "java/lang/Integer", "<init>", "(Ljava/lang/String;)V", false), + VarOp(ILOAD, 1), VarOp(ILOAD, 2), Op(IADD), Op(IRETURN))) + } + + @Test + def elimUnusedBoxUnbox(): Unit = { + val code = + """class C { + | def t(a: Long): Int = { + | val t = 3 + a + | val u = a + t + | val v: Any = u // scala/runtime/BoxesRunTime.boxToLong + | + | val w = (v, a) // a Tuple2 (not specialized because first value is Any) + | // so calls scala/runtime/BoxesRunTime.boxToLong on the second value + | + | val x = v.asInstanceOf[Long] // scala/runtime/BoxesRunTime.unboxToLong + | + | val z = (java.lang.Long.valueOf(a), t) // java box call on the left, scala/runtime/BoxesRunTime.boxToLong on the right + | + | 0 + | } + |} + """.stripMargin + val List(c) = compileClasses(methodOptCompiler)(code) + assertSameCode(getSingleMethod(c, "t"), List(Op(ICONST_0), Op(IRETURN))) + } + + @Test + def elimUnusedClosure(): Unit = { + val code = + """class C { + | def t(x: Int, y: Int): Int = { + | val f = (a: Int) => a + x + y + | val g = (b: Int) => b - x + | val h = (s: String) => println(s) + | f(30) + | } + |} + """.stripMargin + val List(c) = compileClasses(methodOptCompiler)(code) + assertSameCode(getSingleMethod(c, "t"), List( + IntOp(BIPUSH, 30), VarOp(ISTORE, 3), // no constant propagation, so we keep the store (and load below) of a const + VarOp(ILOAD, 1), + VarOp(ILOAD, 2), + VarOp(ILOAD, 3), + Invoke(INVOKESTATIC, "C", "C$$$anonfun$1", "(III)I", false), Op(IRETURN))) + } + + @Test + def rewriteSpecializedClosureCall(): Unit = { + val code = + """class C { + | def t = { + | val f1 = (x: Int) => println(x) // int-unit specialization + | val f2 = (x: Int, y: Long) => x == y // int-long-boolean + | f1(1) + | f2(3, 4) + | } + |} + """.stripMargin + val List(c) = compileClasses(methodOptCompiler)(code) + val t = getSingleMethod(c, "t") + assert(!t.instructions.exists(_.opcode == INVOKEDYNAMIC), t) + } + + @Test + def boxUnboxPrimitive(): Unit = { + val code = + """class C { + | def t1 = { + | val a: Any = runtime.BoxesRunTime.boxToInteger(1) + | runtime.BoxesRunTime.unboxToInt(a) + 1 + | } + | + | // two box and two unbox operations + | def t2(b: Boolean) = { + | val a = if (b) (3l: Any) else 2l + | a.asInstanceOf[Long] + 1 + a.asInstanceOf[Long] + | } + | + | def t3(i: Integer): Int = i.asInstanceOf[Int] + | + | def t4(l: Long): Any = l + | + | def t5(i: Int): Int = { + | val b = Integer.valueOf(i) + | val c: Integer = i + | b.asInstanceOf[Int] + c.intValue + | } + | + | def t6: Long = { + | val y = new java.lang.Boolean(true) + | val i: Integer = if (y) new Integer(10) else 13 + | val j: java.lang.Long = 3l + | j + i + | } + | + | def t7: Int = { + | val a: Any = 3 + | a.asInstanceOf[Int] + a.asInstanceOf[Int] + | } + | + | def t8 = null.asInstanceOf[Int] + | + | def t9: Int = { + | val a = Integer.valueOf(10) + | val b = runtime.BoxesRunTime.unboxToInt(a) + | a + b + | } + | + | @noinline def escape(a: Any) = () + | + | // example E4 in BoxUnbox doc comment + | def t10: Int = { + | val a = Integer.valueOf(10) // int 10 is stored into local + | escape(a) + | a // no unbox, 10 is read from local + | } + | + | // the boxes here cannot be eliminated. see doc comment in BoxUnbox, example E1. + | def t11(b: Boolean): Int = { + | val i = Integer.valueOf(10) + | val j = Integer.valueOf(41) + | escape(i) // force rewrite method M1 (see doc in BoxUnbox) + | val res: Integer = if (b) i else j + | res.toInt // cannot be re-written to a local variable read - we don't know which local to read + | } + | + | // both boxes have a single unboxing consumer, and the escape. note that the escape does + | // NOT put the two boxes into the same set of rewrite operations: we can rewrite both + | // boxes with their unbox individually. in both cases the box also escapes, so method + | // M1 will keep the box around. + | def t12(b: Boolean): Int = { + | val i = Integer.valueOf(10) + | val j = Integer.valueOf(32) + | escape(if (b) i else j) // force method M1. the escape here is a consumer for both boxes + | if (b) i.toInt else j.toInt // both boxes (i, j) have their own unboxing consumer + | } + |} + """.stripMargin + + val List(c) = compileClasses(methodOptCompiler)(code) + + assertNoInvoke(getSingleMethod(c, "t1")) + assertNoInvoke(getSingleMethod(c, "t2")) + assertInvoke(getSingleMethod(c, "t3"), "scala/runtime/BoxesRunTime", "unboxToInt") + assertInvoke(getSingleMethod(c, "t4"), "scala/runtime/BoxesRunTime", "boxToLong") + assertNoInvoke(getSingleMethod(c, "t5")) + assertNoInvoke(getSingleMethod(c, "t6")) + assertNoInvoke(getSingleMethod(c, "t7")) + assertSameSummary(getSingleMethod(c, "t8"), List(ICONST_0, IRETURN)) + assertNoInvoke(getSingleMethod(c, "t9")) + // t10: no invocation of unbox + assertEquals(getSingleMethod(c, "t10").instructions collect { case Invoke(_, owner, name, _, _) => (owner, name) }, List( + ("java/lang/Integer", "valueOf"), + ("C", "escape"))) + + assertSameSummary(getSingleMethod(c, "t11"), List( + BIPUSH, "valueOf", ASTORE /*2*/, + BIPUSH, "valueOf", ASTORE /*3*/, + ALOAD /*0*/, ALOAD /*2*/, "escape", + ILOAD /*1*/, IFEQ /*L1*/, ALOAD /*2*/, GOTO /*L2*/, /*Label L1*/ -1, ALOAD /*3*/, /*Label L2*/ -1, + ASTORE /*4*/, GETSTATIC /*Predef*/, ALOAD /*4*/, "Integer2int", IRETURN)) + + // no unbox invocations + assertEquals(getSingleMethod(c, "t12").instructions collect { case Invoke(_, owner, name, _, _) => (owner, name) }, List( + ("java/lang/Integer", "valueOf"), + ("java/lang/Integer", "valueOf"), + ("C", "escape"))) + } + + @Test + def refEliminiation(): Unit = { + val code = + """class C { + | import runtime._ + | @noinline def escape(a: Any) = () + | + | def t1 = { // box eliminated + | val r = new IntRef(0) + | r.elem + | } + | + | def t2(b: Boolean) = { + | val r1 = IntRef.zero() // both eliminated + | val r2 = IntRef.create(1) + | val res: IntRef = if (b) r1 else r2 + | res.elem + | } + | + | def t3 = { + | val r = LongRef.create(10l) // eliminated + | r.elem += 3 + | r.elem + | } + | + | def t4(b: Boolean) = { + | val x = BooleanRef.create(false) // eliminated + | if (b) x.elem = true + | if (x.elem) "a" else "b" + | } + | + | def t5 = { + | val r = IntRef.create(10) // not eliminated: the box might be modified in the escape + | escape(r) + | r.elem + | } + | + | def t6(b: Boolean) = { + | val r1 = IntRef.zero() + | val r2 = IntRef.create(1) + | r1.elem = 39 + | val res: IntRef = if (b) r1 else r2 + | res.elem // boxes remain: can't rewrite this read, don't know which local + | } + |} + """.stripMargin + val List(c) = compileClasses(methodOptCompiler)(code) + assertSameSummary(getSingleMethod(c, "t1"), List(ICONST_0, IRETURN)) + assertNoInvoke(getSingleMethod(c, "t2")) + assertSameSummary(getSingleMethod(c, "t3"), List(LDC, LDC, LADD, LRETURN)) + assertNoInvoke(getSingleMethod(c, "t4")) + assertEquals(getSingleMethod(c, "t5").instructions collect { case Field(_, owner, name, _) => s"$owner.$name" }, + List("scala/runtime/IntRef.elem")) + assertEquals(getSingleMethod(c, "t6").instructions collect { case Field(op, owner, name, _) => s"$op $owner.$name" }, + List(s"$PUTFIELD scala/runtime/IntRef.elem", s"$GETFIELD scala/runtime/IntRef.elem")) + } + + @Test + def tupleElimination(): Unit = { + val code = + """class C { + | def t1(b: Boolean) = { + | val t = ("hi", "fish") + | if (b) t._1 else t._2 + | } + | + | def t2 = { + | val t = (1, 3) // specialized tuple + | t._1 + t._2 // specialized accessors (_1$mcII$sp) + | } + | + | def t3 = { + | // boxed before tuple creation, a non-specialized tuple is created + | val t = (new Integer(3), Integer.valueOf(4)) + | t._1 + t._2 // invokes the generic `_1` / `_2` getters, both values unboxed by Integer2int + | } + | + | def t4: Any = { + | val t = (3, 3) // specialized tuple is created, ints are not boxed + | (t: Tuple2[Any, Any])._1 // when eliminating the _1 call, need to insert a boxing operation + | } + | + | // the inverse of t4 also happens: an Tuple[Integer] where _1$mcI$sp is invoked. In this + | // case, an unbox operation needs to be added when eliminating the extraction. The only + | // way I found to test this is with an inlined generic method, see InlinerTest.tupleElimination. + | def tpl[A, B](a: A, b: B) = (a, b) + | def t5: Int = tpl(1, 2)._1 // invokes _1$mcI$sp + | + | def t6 = { + | val (a, b) = (1, 2) + | a - b + | } + | + | def t7 = { + | // this example is more tricky to handle than it looks, see doc comment in BoxUnbox. + | val ((a, b), c) = ((1, 2), 3) + | a + b + c + | } + | + | def t8 = { + | val ((a, b), (c, d)) = ((1, 2), (3, Integer.valueOf(10))) + | a + b + c + d + | } + | + | def t9(a: Int, b: Int) = (a, b) match { // tuple is optimized away + | case (x, y) if x == y => 0 + | case (x, y) => x + y + | } + |} + """.stripMargin + val List(c) = compileClasses(methodOptCompiler)(code) + assertNoInvoke(getSingleMethod(c, "t1")) + assertSameSummary(getSingleMethod(c, "t2"), List(ICONST_1, ICONST_3, IADD, IRETURN)) + assertSameSummary(getSingleMethod(c, "t3"), List(ICONST_3, ICONST_4, IADD, IRETURN)) + assertSameSummary(getSingleMethod(c, "t4"), List(ICONST_3, "boxToInteger", ARETURN)) + assertEquals(getSingleMethod(c, "t5").instructions collect { case Invoke(_, owner, name, _, _) => (owner, name) }, List( + ("scala/runtime/BoxesRunTime", "boxToInteger"), + ("scala/runtime/BoxesRunTime", "boxToInteger"), + ("C", "tpl"), + ("scala/Tuple2", "_1$mcI$sp"))) + assertSameSummary(getSingleMethod(c, "t6"), List(ICONST_1, ICONST_2, ISUB, IRETURN)) + assertSameSummary(getSingleMethod(c, "t7"), List( + ICONST_1, ICONST_2, ISTORE, ISTORE, + ICONST_3, ISTORE, + ILOAD, ILOAD, IADD, ILOAD, IADD, IRETURN)) + assertNoInvoke(getSingleMethod(c, "t8")) + assertNoInvoke(getSingleMethod(c, "t9")) + } + + @Test + def nullnessOpts(): Unit = { + val code = + """class C { + | def t1 = { + | val a = new C + | if (a == null) + | println() // eliminated + | a + | } + | + | def t2 = null.asInstanceOf[Long] // replaced by zero value + | + | def t3 = { + | val t = (1, 3) + | val a = null + | if (t ne a) t._1 + | else throw new Error() + | } + | + | def t4 = { + | val i = Integer.valueOf(1) + | val a = null + | if (i eq a) throw new Error() + | else i.toInt + | } + | + | def t5 = { + | val i = runtime.DoubleRef.zero() + | if (i == null) throw new Error() + | else i.elem + | } + | + | def t6 = { + | var a = null + | var i = null + | a = i // eliminated (store of null to variable that is already null) + | a // replaced by ACONST_NULL (load of variable that is known null) + | } + | + | def t7 = { + | val a = null + | a.isInstanceOf[String] // eliminated, replaced by 0 (null.isInstanceOf is always false) + | } + |} + """.stripMargin + val List(c) = compileClasses(methodOptCompiler)(code) + assertSameSummary(getSingleMethod(c, "t1"), List(NEW, DUP, "<init>", ARETURN)) + assertSameCode(getSingleMethod(c, "t2"), List(Op(LCONST_0), Op(LRETURN))) + assertSameCode(getSingleMethod(c, "t3"), List(Op(ICONST_1), Op(IRETURN))) + assertSameCode(getSingleMethod(c, "t4"), List(Op(ICONST_1), Op(IRETURN))) + assertSameCode(getSingleMethod(c, "t5"), List(Op(DCONST_0), Op(DRETURN))) + assertSameCode(getSingleMethod(c, "t6"), List(Op(ACONST_NULL), Op(ARETURN))) + assertSameCode(getSingleMethod(c, "t7"), List(Op(ICONST_0), Op(IRETURN))) + } + + @Test + def elimRedundantNullCheck(): Unit = { + val code = + """class C { + | def t(x: Object) = { + | val bool = x == null + | if (x != null) 1 else 0 + | } + |} + """.stripMargin + val List(c) = compileClasses(methodOptCompiler)(code) + assertSameCode( + getSingleMethod(c, "t"), List( + VarOp(ALOAD, 1), Jump(IFNULL, Label(6)), Op(ICONST_1), Op(IRETURN), Label(6), Op(ICONST_0), Op(IRETURN))) + } + + @Test + def t5313(): Unit = { + val code = + """class C { + | def randomBoolean = scala.util.Random.nextInt % 2 == 0 + | + | // 3 stores to kept1 (slot 1), 1 store to result (slot 2) + | def t1 = { + | var kept1 = new Object + | val result = new java.lang.ref.WeakReference(kept1) + | kept1 = null // we can't eliminate this assignment because result can observe + | // when the object has no more references. See SI-5313 + | kept1 = new Object // could eliminate this one with a more elaborate analysis (we know it contains null) + | // however, such is not implemented: if a var is live, then stores are kept. + | result + | } + | + | // only two variables are live: kept2 and kept3. they end up on slots 1 and 2. + | // kept2 has 2 stores, kept3 has 1 store. + | def t2 = { + | var erased2 = null // we can eliminate this store because it's never used + | val erased3 = erased2 // and this + | var erased4 = erased2 // and this + | val erased5 = erased4 // and this + | var kept2: Object = new Object // ultimately can't be eliminated + | while(randomBoolean) { + | val kept3 = kept2 + | kept2 = null // this can't, because it clobbers kept2, which is used + | erased4 = null // safe to eliminate + | println(kept3) + | } + | 0 + | } + | + | def t3 = { + | var kept4 = new Object // have to keep, it's used + | try + | println(kept4) + | catch { + | case _ : Throwable => kept4 = null // have to keep, it clobbers kept4 which is used + | } + | 0 + | } + | + | def t4 = { + | var kept5 = new Object + | print(kept5) + | kept5 = null // can't eliminate it's a clobber and it's used + | print(kept5) + | kept5 = null // eliminated by nullness analysis (store null to a local that is known to be null) + | 0 + | } + | + | def t5 = { + | while(randomBoolean) { + | var kept6: AnyRef = null // not used, but have to keep because it clobbers the next used store + | // on the back edge of the loop + | kept6 = new Object // used + | println(kept6) + | } + | 0 + | } + |} + """.stripMargin + + val List(c) = compileClasses(methodOptCompiler)(code) + def stores(m: String) = getSingleMethod(c, m).instructions.filter(_.opcode == ASTORE) + + assertEquals(locals(c, "t1"), List(("this",0), ("kept1",1), ("result",2))) + assert(stores("t1") == List(VarOp(ASTORE, 1), VarOp(ASTORE, 2), VarOp(ASTORE, 1), VarOp(ASTORE, 1)), + textify(findAsmMethod(c, "t1"))) + + assertEquals(locals(c, "t2"), List(("this",0), ("kept2",1), ("kept3",2))) + assert(stores("t2") == List(VarOp(ASTORE, 1), VarOp(ASTORE, 2), VarOp(ASTORE, 1)), + textify(findAsmMethod(c, "t2"))) + + assertEquals(locals(c, "t3"), List(("this",0), ("kept4",1))) + assert(stores("t3") == List(VarOp(ASTORE, 1), VarOp(ASTORE, 1)), + textify(findAsmMethod(c, "t3"))) + + assertEquals(locals(c, "t4"), List(("this",0), ("kept5",1))) + assert(stores("t4") == List(VarOp(ASTORE, 1), VarOp(ASTORE, 1)), + textify(findAsmMethod(c, "t4"))) + + assertEquals(locals(c, "t5"), List(("this",0), ("kept6",1))) + assert(stores("t5") == List(VarOp(ASTORE, 1), VarOp(ASTORE, 1)), + textify(findAsmMethod(c, "t5"))) + } + + @Test + def testCpp(): Unit = { + // copied from an old test (run/test-cpp.scala) + val code = + """class C { + | import scala.util.Random._ + | + | def t1(x: Int) = { + | val y = x + | println(y) + | } + | + | def t2 = { + | val x = 2 + | val y = x + | println(y) + | } + | + | def t3 = { + | val x = this + | val y = x + | println(y) + | } + | + | def f = nextInt + | + | def t4 = { + | val x = f + | val y = x + | println(y) + | } + | + | def t5 = { + | var x = nextInt + | var y = x + | println(y) + | + | y = nextInt + | x = y + | println(x) + | } + |} + """.stripMargin + + val List(c) = compileClasses(methodOptCompiler)(code) + assertEquals(locals(c, "t1"), List(("this", 0), ("x", 1))) + + assertEquals(locals(c, "t2"), List(("this", 0), ("x", 1))) + // we don't have constant propagation (yet). + // the local var can't be optimized as a store;laod sequence, there's a GETSTATIC between the two + assertSameSummary(getSingleMethod(c, "t2"), List( + ICONST_2, ISTORE, GETSTATIC, ILOAD, "boxToInteger", "println", RETURN)) + + assertEquals(locals(c, "t3"), List(("this", 0))) + assertEquals(locals(c, "t4"), List(("this", 0), ("x", 1))) + assertEquals(locals(c, "t5"), List(("this", 0), ("x", 1))) + } + + @Test + def t7006(): Unit = { + val code = + """class C { + | def t: Unit = { + | try { + | val x = 3 + | } finally { + | print("hello") + | } + | while(true) { } + | } + |} + """.stripMargin + val List(c) = compileClasses(methodOptCompiler)(code) + val t = getSingleMethod(c, "t") + assertEquals(t.handlers, Nil) + assertEquals(locals(c, "t"), List(("this", 0))) + assertSameSummary(t, List(GETSTATIC, LDC, "print", -1, GOTO)) + } + + @Test + def booleanOrderingCompare(): Unit = { + val code = + """class C { + | def compare(x: Boolean, y: Boolean) = (x, y) match { + | case (false, true) => -1 + | case (true, false) => 1 + | case _ => 0 + | } + |} + """.stripMargin + val List(c) = compileClasses(methodOptCompiler)(code) + assertNoInvoke(getSingleMethod(c, "compare")) + } + + @Test + def t8790(): Unit = { + val code = + """class C { + | def t(x: Int, y: Int): String = (x, y) match { + | case (7, 8) => "a" + | case _ => "b" + | } + |} + """.stripMargin + val List(c) = compileClasses(methodOptCompiler)(code) + + assertSameSummary(getSingleMethod(c, "t"), List( + BIPUSH, ILOAD, IF_ICMPNE, + BIPUSH, ILOAD, IF_ICMPNE, + LDC, ASTORE, GOTO, + -1, LDC, ASTORE, + -1, ALOAD, ARETURN)) + } +} diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/ScalaInlineInfoTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/ScalaInlineInfoTest.scala index f8e887426b..e2d03d8c62 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/ScalaInlineInfoTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/ScalaInlineInfoTest.scala @@ -9,26 +9,43 @@ import scala.tools.asm.Opcodes._ import org.junit.Assert._ import CodeGenTools._ +import scala.tools.asm.tree.ClassNode import scala.tools.nsc.backend.jvm.BTypes.{MethodInlineInfo, InlineInfo} import scala.tools.partest.ASMConverters import ASMConverters._ import scala.collection.convert.decorateAsScala._ +import scala.tools.testing.ClearAfterClass -object ScalaInlineInfoTest { - var compiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:l:none") +object ScalaInlineInfoTest extends ClearAfterClass.Clearable { + var compiler = newCompiler(extraArgs = "-Yopt:l:none") def clear(): Unit = { compiler = null } } @RunWith(classOf[JUnit4]) -class ScalaInlineInfoTest { - val compiler = newCompiler() +class ScalaInlineInfoTest extends ClearAfterClass { + ClearAfterClass.stateToClear = ScalaInlineInfoTest + val compiler = ScalaInlineInfoTest.compiler + + def inlineInfo(c: ClassNode): InlineInfo = c.attrs.asScala.collect({ case a: InlineInfoAttribute => a.inlineInfo }).head + + def mapDiff[A, B](a: Map[A, B], b: Map[A, B]) = { + val r = new StringBuilder + for ((a, av) <- a) { + if (!b.contains(a)) r.append(s"missing in b: $a\n") + else if (av != b(a)) r.append(s"different for $a: $av != ${b(a)}\n") + } + for (b <- b.keys.toList diff a.keys.toList) { + r.append(s"missing in a: $b\n") + } + r.toString + } @Test def traitMembersInlineInfo(): Unit = { val code = """trait T { | def f1 = 1 // concrete method - | private def f2 = 1 // implOnly method (does not end up in the interface) + | private def f2 = 1 // default method only (not in subclass) | def f3 = { | def nest = 0 // nested method (does not end up in the interface) | nest @@ -38,13 +55,13 @@ class ScalaInlineInfoTest { | def f4 = super.toString // super accessor | | object O // module accessor (method is generated) - | def f5 = { + | final def f5 = { | object L { val x = 0 } // nested module (just flattened out) | L.x | } | | @noinline - | def f6: Int // abstract method (not in impl class) + | def f6: Int // abstract method | | // fields | @@ -55,31 +72,111 @@ class ScalaInlineInfoTest { | | final val x5 = 0 |} + |class C extends T { + | def f6 = 0 + | var x3 = 0 + |} """.stripMargin - val cs @ List(t, tl, to, tCls) = compileClasses(compiler)(code) - val List(info) = t.attrs.asScala.collect({ case a: InlineInfoAttribute => a.inlineInfo }).toList - val expect = InlineInfo( - None, // self type + val cs @ List(c, t, tl, to) = compileClasses(compiler)(code) + val infoT = inlineInfo(t) + val expectT = InlineInfo ( false, // final class + None, // not a sam Map( - ("O()LT$O$;", MethodInlineInfo(true, false,false,false)), - ("T$$super$toString()Ljava/lang/String;",MethodInlineInfo(false,false,false,false)), - ("T$_setter_$x1_$eq(I)V", MethodInlineInfo(false,false,false,false)), - ("f1()I", MethodInlineInfo(false,true, false,false)), - ("f3()I", MethodInlineInfo(false,true, false,false)), - ("f4()Ljava/lang/String;", MethodInlineInfo(false,true, true, false)), - ("f5()I", MethodInlineInfo(false,true, false,false)), - ("f6()I", MethodInlineInfo(false,false,false,true )), - ("x1()I", MethodInlineInfo(false,false,false,false)), - ("x3()I", MethodInlineInfo(false,false,false,false)), - ("x3_$eq(I)V", MethodInlineInfo(false,false,false,false)), - ("x4()I", MethodInlineInfo(false,false,false,false)), - ("x5()I", MethodInlineInfo(true, false,false,false)), - ("y2()I", MethodInlineInfo(false,false,false,false)), - ("y2_$eq(I)V", MethodInlineInfo(false,false,false,false))), + ("O()LT$O$;", MethodInlineInfo(true ,false,false)), // the accessor is abstract in bytecode, but still effectivelyFinal because there's no (late)DEFERRED flag, https://github.com/scala/scala-dev/issues/126 + ("T$$super$toString()Ljava/lang/String;", MethodInlineInfo(true ,false,false)), + ("T$_setter_$x1_$eq(I)V", MethodInlineInfo(false,false,false)), + ("f1()I", MethodInlineInfo(false,false,false)), + ("f2()I", MethodInlineInfo(true, false,false)), + ("f3()I", MethodInlineInfo(false,false,false)), + ("f4()Ljava/lang/String;", MethodInlineInfo(false,true, false)), + ("f5()I", MethodInlineInfo(true ,false,false)), + ("f6()I", MethodInlineInfo(false,false,true )), + ("x1()I", MethodInlineInfo(false,false,false)), + ("y2()I", MethodInlineInfo(false,false,false)), + ("y2_$eq(I)V", MethodInlineInfo(false,false,false)), + ("x3()I", MethodInlineInfo(false,false,false)), + ("x3_$eq(I)V", MethodInlineInfo(false,false,false)), + ("x4()I", MethodInlineInfo(false,false,false)), + ("x5()I", MethodInlineInfo(true, false,false)), + ("L$lzycompute$1(Lscala/runtime/VolatileObjectRef;)LT$L$2$;", MethodInlineInfo(true, false,false)), + ("L$1(Lscala/runtime/VolatileObjectRef;)LT$L$2$;", MethodInlineInfo(true ,false,false)), + ("nest$1()I", MethodInlineInfo(true, false,false)), + ("$init$()V", MethodInlineInfo(false,false,false))), None // warning ) - assert(info == expect, info) + + assert(infoT == expectT, mapDiff(expectT.methodInfos, infoT.methodInfos) + infoT) + + val infoC = inlineInfo(c) + val expectC = InlineInfo(false, None, Map( + "O()LT$O$;" -> MethodInlineInfo(true ,false,false), + "O$lzycompute()LT$O$;" -> MethodInlineInfo(true, false,false), + "f6()I" -> MethodInlineInfo(false,false,false), + "x1()I" -> MethodInlineInfo(false,false,false), + "T$_setter_$x1_$eq(I)V" -> MethodInlineInfo(false,false,false), + "y2()I" -> MethodInlineInfo(false,false,false), + "y2_$eq(I)V" -> MethodInlineInfo(false,false,false), + "x3()I" -> MethodInlineInfo(false,false,false), + "x3_$eq(I)V" -> MethodInlineInfo(false,false,false), + "x4$lzycompute()I" -> MethodInlineInfo(true ,false,false), + "x4()I" -> MethodInlineInfo(false,false,false), + "x5()I" -> MethodInlineInfo(true ,false,false), + "T$$super$toString()Ljava/lang/String;" -> MethodInlineInfo(true ,false,false), + "<init>()V" -> MethodInlineInfo(false,false,false)), + None) + + assert(infoC == expectC, mapDiff(expectC.methodInfos, infoC.methodInfos) + infoC) + } + + @Test + def inlineInfoSam(): Unit = { + val code = + """trait C { // expected to be seen as sam: g(I)I + | def f = 0 + | def g(x: Int): Int + | val foo = "hi" + |} + |abstract class D { + | val biz: Int + |} + |trait T { // expected to be seen as sam: h(Ljava/lang/String;)I + | def h(a: String): Int + |} + |trait E extends T { // expected to be seen as sam: h(Ljava/lang/String;)I + | def hihi(x: Int) = x + |} + |class F extends T { + | def h(a: String) = 0 + |} + |trait U { + | def conc() = 10 + | def nullary: Int + |} + """.stripMargin + val cs = compileClasses(compiler)(code) + val sams = cs.map(c => (c.name, inlineInfo(c).sam)) + assertEquals(sams, + List( + ("C",Some("g(I)I")), + ("D",None), + ("E",Some("h(Ljava/lang/String;)I")), + ("F",None), + ("T",Some("h(Ljava/lang/String;)I")), + ("U",None))) + + } + + @Test + def lzyComputeInlineInfo(): Unit = { + val code = "class C { object O }" + val List(c, om) = compileClasses(compiler)(code) + val infoC = inlineInfo(c) + val expected = Map( + "<init>()V" -> MethodInlineInfo(false,false,false), + "O$lzycompute()LC$O$;" -> MethodInlineInfo(true,false,false), + "O()LC$O$;" -> MethodInlineInfo(true,false,false)) + assert(infoC.methodInfos == expected, mapDiff(infoC.methodInfos, expected)) } } diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/SimplifyJumpsTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/SimplifyJumpsTest.scala index a685ae7dd5..99acb318de 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/SimplifyJumpsTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/SimplifyJumpsTest.scala @@ -96,10 +96,22 @@ class SimplifyJumpsTest { instructionsFromMethod(method), List(VarOp(ILOAD, 1), Jump(IFLT, Label(3))) ::: rest.tail ) - // no label allowed between begin and rest. if there's another label, then there could be a - // branch that label. eliminating the GOTO would change the behavior. - val nonOptMethod = genMethod()(begin ::: Label(22) :: rest: _*) - assertFalse(LocalOptImpls.simplifyJumps(nonOptMethod)) + // branch over goto is OK even if there's a label in between, if that label is not a jump target + val withNonJumpTargetLabel = genMethod()(begin ::: Label(22) :: rest: _*) + assertTrue(LocalOptImpls.simplifyJumps(withNonJumpTargetLabel)) + assertSameCode( + instructionsFromMethod(withNonJumpTargetLabel), + List(VarOp(ILOAD, 1), Jump(IFLT, Label(3)), Label(22)) ::: rest.tail ) + + // if the Label(22) between IFGE and GOTO is the target of some jump, we cannot rewrite the IFGE + // and remove the GOTO: removing the GOTO would change semantics. However, the jump that targets + // Label(22) will be re-written (jump-chain collapsing), so in a second round, the IFGE is still + // rewritten to IFLT + val twoRounds = genMethod()(List(VarOp(ILOAD, 1), Jump(IFLE, Label(22))) ::: begin ::: Label(22) :: rest: _*) + assertTrue(LocalOptImpls.simplifyJumps(twoRounds)) + assertSameCode( + instructionsFromMethod(twoRounds), + List(VarOp(ILOAD, 1), Jump(IFLE, Label(3)), VarOp(ILOAD, 1), Jump(IFLT, Label(3)), Label(22)) ::: rest.tail ) } @Test @@ -167,6 +179,9 @@ class SimplifyJumpsTest { VarOp(ILOAD, 1), Jump(IFGE, Label(target)), + VarOp(ILOAD, 1), // some code to prevent rewriting the conditional jump + Op(IRETURN), + Label(4), Jump(GOTO, Label(3)), diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/UnreachableCodeTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/UnreachableCodeTest.scala index 902af7b7fa..0021a1784d 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/UnreachableCodeTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/UnreachableCodeTest.scala @@ -18,18 +18,14 @@ import scala.tools.testing.ClearAfterClass object UnreachableCodeTest extends ClearAfterClass.Clearable { // jvm-1.6 enables emitting stack map frames, which impacts the code generation wrt dead basic blocks, // see comment in BCodeBodyBuilder - var methodOptCompiler = newCompiler(extraArgs = "-target:jvm-1.6 -Ybackend:GenBCode -Yopt:l:method") - var dceCompiler = newCompiler(extraArgs = "-target:jvm-1.6 -Ybackend:GenBCode -Yopt:unreachable-code") - var noOptCompiler = newCompiler(extraArgs = "-target:jvm-1.6 -Ybackend:GenBCode -Yopt:l:none") - - // jvm-1.5 disables computing stack map frames, and it emits dead code as-is. note that this flag triggers a deprecation warning - var noOptNoFramesCompiler = newCompiler(extraArgs = "-target:jvm-1.5 -Ybackend:GenBCode -Yopt:l:none -deprecation") + var methodOptCompiler = newCompiler(extraArgs = "-Yopt:l:method") + var dceCompiler = newCompiler(extraArgs = "-Yopt:unreachable-code") + var noOptCompiler = newCompiler(extraArgs = "-Yopt:l:none") def clear(): Unit = { methodOptCompiler = null dceCompiler = null noOptCompiler = null - noOptNoFramesCompiler = null } } @@ -40,11 +36,10 @@ class UnreachableCodeTest extends ClearAfterClass { val methodOptCompiler = UnreachableCodeTest.methodOptCompiler val dceCompiler = UnreachableCodeTest.dceCompiler val noOptCompiler = UnreachableCodeTest.noOptCompiler - val noOptNoFramesCompiler = UnreachableCodeTest.noOptNoFramesCompiler def assertEliminateDead(code: (Instruction, Boolean)*): Unit = { val method = genMethod()(code.map(_._1): _*) - LocalOptImpls.removeUnreachableCodeImpl(method, "C") + dceCompiler.genBCode.bTypes.localOpt.removeUnreachableCodeImpl(method, "C") val nonEliminated = instructionsFromMethod(method) val expectedLive = code.filter(_._2).map(_._1).toList assertSameCode(nonEliminated, expectedLive) @@ -152,11 +147,6 @@ class UnreachableCodeTest extends ClearAfterClass { // Finally, instructions in the dead basic blocks are replaced by ATHROW, as explained in // a comment in BCodeBodyBuilder. assertSameCode(noDce.dropNonOp, List(Op(ICONST_1), Op(IRETURN), Op(ATHROW), Op(ATHROW))) - - // when NOT computing stack map frames, ASM's ClassWriter does not replace dead code by NOP/ATHROW - val warn = "target:jvm-1.5 is deprecated" - val noDceNoFrames = singleMethodInstructions(noOptNoFramesCompiler)(code, allowMessage = _.msg contains warn) - assertSameCode(noDceNoFrames.dropNonOp, List(Op(ICONST_1), Op(IRETURN), Op(ICONST_2), Op(IRETURN))) } @Test @@ -225,4 +215,50 @@ class UnreachableCodeTest extends ClearAfterClass { assertTrue(List(FrameEntry(F_FULL, List(INTEGER, DOUBLE, Label(3)), List("java/lang/Object", Label(4))), Label(3), Label(4)) === List(FrameEntry(F_FULL, List(INTEGER, DOUBLE, Label(1)), List("java/lang/Object", Label(3))), Label(1), Label(3))) } + + @Test + def loadNullNothingBytecode(): Unit = { + val code = + """class C { + | def nl: Null = null + | def nt: Nothing = throw new Error("") + | def cons(a: Any) = () + | + | def t1 = cons(null) + | def t2 = cons(nl) + | def t3 = cons(throw new Error("")) + | def t4 = cons(nt) + |} + """.stripMargin + val List(c) = compileClasses(noOptCompiler)(code) + + assertSameSummary(getSingleMethod(c, "nl"), List(ACONST_NULL, ARETURN)) + + assertSameSummary(getSingleMethod(c, "nt"), List( + NEW, DUP, LDC, "<init>", ATHROW)) + + assertSameSummary(getSingleMethod(c, "t1"), List( + ALOAD, ACONST_NULL, "cons", RETURN)) + + // GenBCode introduces POP; ACONST_NULL after loading an expression of type scala.runtime.Null$, + // see comment in BCodeBodyBuilder.adapt + assertSameSummary(getSingleMethod(c, "t2"), List( + ALOAD, ALOAD, "nl", POP, ACONST_NULL, "cons", RETURN)) + + // the bytecode generated by GenBCode is ... ATHROW; INVOKEVIRTUAL C.cons; RETURN + // the ASM classfile writer creates a new basic block (creates a label) right after the ATHROW + // and replaces all instructions by NOP*; ATHROW, see comment in BCodeBodyBuilder.adapt + // NOTE: DCE is enabled by default and gets rid of the redundant code (tested below) + assertSameSummary(getSingleMethod(c, "t3"), List( + ALOAD, NEW, DUP, LDC, "<init>", ATHROW, NOP, NOP, NOP, ATHROW)) + + // GenBCode introduces an ATHROW after the invocation of C.nt, see BCodeBodyBuilder.adapt + // NOTE: DCE is enabled by default and gets rid of the redundant code (tested below) + assertSameSummary(getSingleMethod(c, "t4"), List( + ALOAD, ALOAD, "nt", ATHROW, NOP, NOP, NOP, ATHROW)) + + val List(cDCE) = compileClasses(dceCompiler)(code) + assertSameSummary(getSingleMethod(cDCE, "t3"), List(ALOAD, NEW, DUP, LDC, "<init>", ATHROW)) + assertSameSummary(getSingleMethod(cDCE, "t4"), List(ALOAD, ALOAD, "nt", ATHROW)) + } } diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/UnusedLocalVariablesTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/UnusedLocalVariablesTest.scala index 769736669b..4f71df1822 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/UnusedLocalVariablesTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/UnusedLocalVariablesTest.scala @@ -15,7 +15,7 @@ import ASMConverters._ import scala.tools.testing.ClearAfterClass object UnusedLocalVariablesTest extends ClearAfterClass.Clearable { - var dceCompiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:unreachable-code") + var dceCompiler = newCompiler(extraArgs = "-Yopt:unreachable-code") def clear(): Unit = { dceCompiler = null } } diff --git a/test/junit/scala/tools/nsc/settings/ScalaVersionTest.scala b/test/junit/scala/tools/nsc/settings/ScalaVersionTest.scala index 77a2da828e..3717f80362 100644 --- a/test/junit/scala/tools/nsc/settings/ScalaVersionTest.scala +++ b/test/junit/scala/tools/nsc/settings/ScalaVersionTest.scala @@ -13,6 +13,57 @@ class ScalaVersionTest { @Test def versionUnparse() { val v = "2.11.3" - assertEquals(ScalaVersion(v).unparse, v) + assertEquals(v, ScalaVersion(v).unparse) + assertEquals("2.11.3-RC4", ScalaVersion("2.11.3-rc4").unparse) + } + + // SI-9167 + @Test def `version parses with rigor`() { + import settings.{ SpecificScalaVersion => V } + import ScalaVersion._ + + // no-brainers + assertEquals(V(2,11,7,Final), ScalaVersion("2.11.7")) + assertEquals(V(2,11,7,Final), ScalaVersion("2.11.7-FINAL")) + assertEquals(V(2,11,7,Milestone(3)), ScalaVersion("2.11.7-M3")) + assertEquals(V(2,11,7,RC(3)), ScalaVersion("2.11.7-RC3")) + assertEquals(V(2,11,7,Development("devbuild")), ScalaVersion("2.11.7-devbuild")) + + // partial-brainers + assertEquals(V(2,11,7,Milestone(3)), ScalaVersion("2.11.7-m3")) + assertEquals(V(2,11,7,RC(3)), ScalaVersion("2.11.7-rc3")) + assertEquals(V(2,11,7,Development("maybegood")), ScalaVersion("2.11.7-maybegood")) + assertEquals(V(2,11,7,Development("RCCola")), ScalaVersion("2.11.7-RCCola")) + assertEquals(V(2,11,7,Development("RC1.5")), ScalaVersion("2.11.7-RC1.5")) + assertEquals(V(2,11,7,Development("")), ScalaVersion("2.11.7-")) + assertEquals(V(2,11,7,Development("0.5")), ScalaVersion("2.11.7-0.5")) + assertEquals(V(2,11,7,Development("devbuild\nSI-9167")), ScalaVersion("2.11.7-devbuild\nSI-9167")) + assertEquals(V(2,11,7,Development("final")), ScalaVersion("2.11.7-final")) + + // oh really + assertEquals(NoScalaVersion, ScalaVersion("none")) + assertEquals(AnyScalaVersion, ScalaVersion("any")) + + assertThrows[NumberFormatException] { ScalaVersion("2.11.7.2") } + assertThrows[NumberFormatException] { ScalaVersion("2.11.7.beta") } + assertThrows[NumberFormatException] { ScalaVersion("2.x.7") } + assertThrows[NumberFormatException] { ScalaVersion("2.-11.7") } + assertThrows[NumberFormatException] { ScalaVersion("2. ") } + assertThrows[NumberFormatException] { ScalaVersion("2.1 .7") } + assertThrows[NumberFormatException] { ScalaVersion("2.") } + assertThrows[NumberFormatException] { ScalaVersion("2..") } + assertThrows[NumberFormatException] { ScalaVersion("2...") } + assertThrows[NumberFormatException] { ScalaVersion("2-") } + assertThrows[NumberFormatException] { ScalaVersion("2-.") } // scalacheck territory + assertThrows[NumberFormatException] { ScalaVersion("any.7") } + + assertThrows[NumberFormatException] ( ScalaVersion("2.11-ok"), _ == + "Bad version (2.11-ok) not major[.minor[.revision[-suffix]]]" ) + + } + + // SI-9377 + @Test def `missing version is as good as none`() { + assertEquals(NoScalaVersion, ScalaVersion("")) } } diff --git a/test/junit/scala/tools/nsc/settings/SettingsTest.scala b/test/junit/scala/tools/nsc/settings/SettingsTest.scala index 96f83c4c2f..01a2351011 100644 --- a/test/junit/scala/tools/nsc/settings/SettingsTest.scala +++ b/test/junit/scala/tools/nsc/settings/SettingsTest.scala @@ -26,16 +26,16 @@ class SettingsTest { assertThrows[IllegalArgumentException](check("-Ytest-setting:rubbish")) } - @Test def userSettingsHavePrecedenceOverOptimize() { + @Test def userSettingsHavePrecedenceOverExperimental() { def check(args: String*): MutableSettings#BooleanSetting = { val s = new MutableSettings(msg => throw new IllegalArgumentException(msg)) val (ok, residual) = s.processArguments(args.toList, processAll = true) assert(residual.isEmpty) - s.inline // among -optimize + s.YmethodInfer // among -Xexperimental } - assertTrue(check("-optimise").value) - assertFalse(check("-optimise", "-Yinline:false").value) - assertFalse(check("-Yinline:false", "-optimise").value) + assertTrue(check("-Xexperimental").value) + assertFalse(check("-Xexperimental", "-Yinfer-argument-types:false").value) + assertFalse(check("-Yinfer-argument-types:false", "-Xexperimental").value) } // for the given args, select the desired setting @@ -172,12 +172,12 @@ class SettingsTest { assert(residual.isEmpty) assertTrue(s.source.value == ScalaVersion(expected)) } - check(expected = "2.11.0") // default + check(expected = "2.12.0") // default check(expected = "2.11.0", "-Xsource:2.11") check(expected = "2.10", "-Xsource:2.10.0") check(expected = "2.12", "-Xsource:2.12") assertThrows[IllegalArgumentException](check(expected = "2.11", "-Xsource"), _ == "-Xsource requires an argument, the syntax is -Xsource:<version>") assertThrows[IllegalArgumentException](check(expected = "2.11", "-Xsource", "2.11"), _ == "-Xsource requires an argument, the syntax is -Xsource:<version>") - assertThrows[IllegalArgumentException](check(expected = "2.11", "-Xsource:2.invalid"), _ contains "There was a problem parsing 2.invalid") + assertThrows[IllegalArgumentException](check(expected = "2.11", "-Xsource:2.invalid"), _ contains "Bad version (2.invalid)") } } diff --git a/test/junit/scala/tools/nsc/symtab/FlagsTest.scala b/test/junit/scala/tools/nsc/symtab/FlagsTest.scala index fc0e8b0f6b..96eae38011 100644 --- a/test/junit/scala/tools/nsc/symtab/FlagsTest.scala +++ b/test/junit/scala/tools/nsc/symtab/FlagsTest.scala @@ -33,7 +33,6 @@ class FlagsTest { def testTimedFlags(): Unit = { testLate(lateDEFERRED, _.isDeferred) testLate(lateFINAL, _.isFinal) - testLate(lateINTERFACE, _.isInterface) testLate(lateMETHOD, _.isMethod) testLate(lateMODULE, _.isModule) testNot(PROTECTED | notPROTECTED, _.isProtected) @@ -86,4 +85,11 @@ class FlagsTest { assertEquals(withFlagMask(AllFlags)(sym.setFlag(lateFlags).flags), lateFlags | lateable) } + + @Test + def javaClassMirrorAnnotationFlag(): Unit = { + import scala.reflect.runtime.universe._ + val dep = typeOf[java.lang.Deprecated].typeSymbol + assertTrue(dep.isJavaAnnotation && dep.isJava) + } } diff --git a/test/junit/scala/tools/nsc/symtab/SymbolTableForUnitTesting.scala b/test/junit/scala/tools/nsc/symtab/SymbolTableForUnitTesting.scala index f0f20acf07..812c298c48 100644 --- a/test/junit/scala/tools/nsc/symtab/SymbolTableForUnitTesting.scala +++ b/test/junit/scala/tools/nsc/symtab/SymbolTableForUnitTesting.scala @@ -2,12 +2,12 @@ package scala.tools.nsc package symtab import scala.reflect.ClassTag -import scala.reflect.internal.{Phase, NoPhase, SomePhase} +import scala.reflect.internal.{NoPhase, Phase, SomePhase} import scala.tools.nsc.classpath.FlatClassPath import scala.tools.nsc.settings.ClassPathRepresentationType import scala.tools.util.FlatClassPathResolver import scala.tools.util.PathResolver -import util.ClassPath +import util.{ClassFileLookup, ClassPath} import io.AbstractFile /** @@ -54,7 +54,7 @@ class SymbolTableForUnitTesting extends SymbolTable { def isMaybeBoxed(sym: Symbol): Boolean = ??? def needCompile(bin: AbstractFile, src: AbstractFile): Boolean = ??? def externalEquals: Symbol = ??? - def updateClassPath(subst: Map[ClassPath[AbstractFile], ClassPath[AbstractFile]]): Unit = ??? + def updateClassPath(subst: Map[ClassFileLookup[AbstractFile], ClassFileLookup[AbstractFile]]): Unit = ??? } object loaders extends symtab.SymbolLoaders { @@ -119,7 +119,9 @@ class SymbolTableForUnitTesting extends SymbolTable { } phasesArray } - lazy val treeInfo: scala.reflect.internal.TreeInfo{val global: SymbolTableForUnitTesting.this.type} = ??? + lazy val treeInfo = new scala.reflect.internal.TreeInfo { + val global: SymbolTableForUnitTesting.this.type = SymbolTableForUnitTesting.this + } val currentFreshNameCreator = new reflect.internal.util.FreshNameCreator diff --git a/test/junit/scala/tools/nsc/transform/delambdafy/DelambdafyTest.scala b/test/junit/scala/tools/nsc/transform/delambdafy/DelambdafyTest.scala index 010078e28a..e4bf038f32 100644 --- a/test/junit/scala/tools/nsc/transform/delambdafy/DelambdafyTest.scala +++ b/test/junit/scala/tools/nsc/transform/delambdafy/DelambdafyTest.scala @@ -52,7 +52,7 @@ object Delambdafy { val srcFile = makeSourceFile(codeForMultiOutput, "delambdafyTest.scala") val outDir = AbstractFile.getDirectory(TempDir.createTempDir()) val outDirPath = outDir.canonicalPath - val extraArgs = "-Ybackend:GenBCode -Ydelambdafy:method" + val extraArgs = "-Ydelambdafy:method" val argsWithOutDir = extraArgs + s" -d $outDirPath -cp $outDirPath" val compiler = newCompilerWithoutVirtualOutdir(extraArgs = argsWithOutDir) compiler.settings.outputDirs.add(srcFile.file, outDir) @@ -63,7 +63,7 @@ object Delambdafy { outDir.delete() classfiles } - + @Test def shouldFindOutputFoldersForAllPromotedLambdasAsMethod(): Unit = { val actual = compileToMultipleOutputWithDelamdbafyMethod() diff --git a/test/junit/scala/tools/nsc/transform/patmat/PatmatBytecodeTest.scala b/test/junit/scala/tools/nsc/transform/patmat/PatmatBytecodeTest.scala new file mode 100644 index 0000000000..ac558e2e21 --- /dev/null +++ b/test/junit/scala/tools/nsc/transform/patmat/PatmatBytecodeTest.scala @@ -0,0 +1,195 @@ +package scala.tools.nsc +package transform.patmat + +import org.junit.runner.RunWith +import org.junit.runners.JUnit4 +import org.junit.Test +import scala.tools.asm.Opcodes._ +import org.junit.Assert._ + +import scala.tools.nsc.backend.jvm.AsmUtils._ +import scala.tools.nsc.backend.jvm.CodeGenTools +import scala.tools.testing.AssertUtil._ + +import CodeGenTools._ +import scala.tools.partest.ASMConverters +import ASMConverters._ +import scala.tools.testing.ClearAfterClass + +object PatmatBytecodeTest extends ClearAfterClass.Clearable { + var compiler = newCompiler() + var optCompiler = newCompiler(extraArgs = "-Yopt:l:project") + def clear(): Unit = { compiler = null; optCompiler = null } +} + +@RunWith(classOf[JUnit4]) +class PatmatBytecodeTest extends ClearAfterClass { + ClearAfterClass.stateToClear = PatmatBytecodeTest + + val compiler = PatmatBytecodeTest.compiler + val optCompiler = PatmatBytecodeTest.optCompiler + + @Test + def t6956(): Unit = { + val code = + """class C { + | private[this] final val ONE = 1 + | + | def s1(i: Byte): Int = i match { + | case ONE => 1 + | case 2 => 2 + | case 3 => 3 + | case _ => 0 + | } + | + | def s2(i: Byte): Int = i match { + | case 1 => 1 + | case 2 => 2 + | case 3 => 3 + | case _ => 0 + | } + |} + """.stripMargin + + val List(c) = compileClasses(compiler)(code) + assert(getSingleMethod(c, "s1").instructions.count(_.opcode == TABLESWITCH) == 1, textify(c)) + assert(getSingleMethod(c, "s2").instructions.count(_.opcode == TABLESWITCH) == 1, textify(c)) + } + + @Test + def t6955(): Unit = { + val code = + """class C { + | type Tag = Byte + | + | def s1(i: Tag): Int = i match { // notice type of i is Tag = Byte + | case 1 => 1 + | case 2 => 2 + | case 3 => 3 + | case _ => 0 + | } + | + | // this worked before, should keep working + | def s2(i: Byte): Int = i match { + | case 1 => 1 + | case 2 => 2 + | case 3 => 3 + | case _ => 0 + | } + |} + """.stripMargin + + val List(c) = compileClasses(compiler)(code) + assert(getSingleMethod(c, "s1").instructions.count(_.opcode == TABLESWITCH) == 1, textify(c)) + assert(getSingleMethod(c, "s2").instructions.count(_.opcode == TABLESWITCH) == 1, textify(c)) + } + + @Test + def optNoPrimitiveTypetest(): Unit = { + val code = + """case class Foo(x: Int, y: String) + |class C { + | def a = Foo(1, "a") match { + | case Foo(_: Int, y) => y + | } + |} + """.stripMargin + val c = compileClasses(optCompiler)(code).head + + assertSameSummary(getSingleMethod(c, "a"), List( + NEW, DUP, ICONST_1, LDC, "<init>", + "y", ARETURN)) + } + + @Test + def optNoNullCheck(): Unit = { + val code = + """case class Foo(x: Any) + |class C { + | def a = (Foo(1): Any) match { + | case Foo(_: String) => + | } + |} + """.stripMargin + val c = compileClasses(optCompiler)(code).head + assert(!getSingleMethod(c, "a").instructions.exists(i => i.opcode == IFNULL || i.opcode == IFNONNULL), textify(findAsmMethod(c, "a"))) + } + + @Test + def optNoLoacalForUnderscore(): Unit = { + val code = + """case class Foo(x: Any, y: String) + |class C { + | def a = (Foo(1, "a"): @unchecked) match { + | case Foo(_: String, y) => y + | } + |} + """.stripMargin + val c = compileClasses(optCompiler)(code).head + assertSameSummary(getSingleMethod(c, "a"), List( + NEW, DUP, ICONST_1, "boxToInteger", LDC, "<init>", ASTORE /*1*/, + ALOAD /*1*/, "y", ASTORE /*2*/, + ALOAD /*1*/, "x", INSTANCEOF, IFNE /*R*/, + NEW, DUP, ALOAD /*1*/, "<init>", ATHROW, + /*R*/ -1, ALOAD /*2*/, ARETURN)) + } + + @Test + def t6941(): Unit = { + val code = + """class C { + | def a(xs: List[Int]) = xs match { + | case x :: _ => x + | } + | def b(xs: List[Int]) = xs match { + | case xs: ::[Int] => xs.head + | } + |} + """.stripMargin + val c = compileClasses(optCompiler)(code, allowMessage = _.msg.contains("may not be exhaustive")).head + + val expected = List( + ALOAD /*1*/ , INSTANCEOF /*::*/ , IFEQ /*A*/ , + ALOAD, CHECKCAST /*::*/ , "head", "unboxToInt", + ISTORE, GOTO /*B*/ , + -1 /*A*/ , NEW /*MatchError*/ , DUP, ALOAD /*1*/ , "<init>", ATHROW, + -1 /*B*/ , ILOAD, IRETURN) + + assertSameSummary(getSingleMethod(c, "a"), expected) + assertSameSummary(getSingleMethod(c, "b"), expected) + } + + @Test + def valPatterns(): Unit = { + val code = + """case class C(a: Any, b: Int) { + | def tplCall = ("hi", 3) + | @inline final def tplInline = (true, 'z') + | + | def t1 = { val (a, b) = (1, 2); a + b } + | def t2 = { val (a, _) = (1, 3); a } + | def t3 = { val (s, i) = tplCall; s.length + i } + | def t4 = { val (_, i) = tplCall; i } + | def t5 = { val (b, c) = tplInline; b || c == 'e' } + | def t6 = { val (_, c) = tplInline; c } + | + | def t7 = { val C(s: String, b) = this; s.length + b } + | def t8 = { val C(_, b) = this; b } + | def t9 = { val C(a, _) = C("hi", 23); a.toString } + |} + """.stripMargin + val List(c, cMod) = compileClasses(optCompiler)(code) + assertSameSummary(getSingleMethod(c, "t1"), List(ICONST_1, ICONST_2, IADD, IRETURN)) + assertSameSummary(getSingleMethod(c, "t2"), List(ICONST_1, IRETURN)) + assertInvokedMethods(getSingleMethod(c, "t3"), List("C.tplCall", "scala/Tuple2._1", "scala/Tuple2._2$mcI$sp", "scala/MatchError.<init>", "java/lang/String.length")) + assertInvokedMethods(getSingleMethod(c, "t4"), List("C.tplCall", "scala/Tuple2._2$mcI$sp", "scala/MatchError.<init>")) + assertNoInvoke(getSingleMethod(c, "t5")) + assertSameSummary(getSingleMethod(c, "t6"), List(BIPUSH, IRETURN)) + + // MatchError reachable because of the type pattern `s: String` + assertInvokedMethods(getSingleMethod(c, "t7"), List("C.a", "C.b", "scala/MatchError.<init>", "java/lang/String.length")) + assertSameSummary(getSingleMethod(c, "t8"), List(ALOAD, "b", IRETURN)) + // C allocation not eliminated - constructor may have side-effects. + assertSameSummary(getSingleMethod(c, "t9"), List(NEW, DUP, LDC, BIPUSH, "<init>", "a", "toString", ARETURN)) + } +} diff --git a/test/junit/scala/util/SystemPropertiesTest.scala b/test/junit/scala/util/SystemPropertiesTest.scala new file mode 100644 index 0000000000..38e830eb88 --- /dev/null +++ b/test/junit/scala/util/SystemPropertiesTest.scala @@ -0,0 +1,27 @@ +package scala.util + +import org.junit.runner.RunWith +import org.junit.runners.JUnit4 +import org.junit.Test +import org.junit.Assert._ + +@RunWith(classOf[JUnit4]) +class SystemPropertiesTest { + @Test + def filterAll(): Unit = { + val isEmpty = sys.props.filter(_ => false).size == 0 + assertTrue("A filter matching nothing should produce an empty result", isEmpty) + } + + @Test + def filterNone(): Unit = { + val isUnchanged = sys.props.filter(_ => true) == sys.props + assertTrue("A filter matching everything should not change the result", isUnchanged) + } + + @Test + def empty(): Unit = { + val hasSize0 = sys.props.empty.size == 0 + assertTrue("SystemProperties.empty should have size of 0", hasSize0) + } +} diff --git a/test/junit/scala/util/control/ExceptionTest.scala b/test/junit/scala/util/control/ExceptionTest.scala new file mode 100644 index 0000000000..5211d31839 --- /dev/null +++ b/test/junit/scala/util/control/ExceptionTest.scala @@ -0,0 +1,42 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2016-2016, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + +package scala.util + +import org.junit.runner.RunWith +import org.junit.runners.JUnit4 +import org.junit.Test +import org.junit.Assert._ + +import scala.collection.mutable.ListBuffer + +import scala.util.control.Exception._ + +@RunWith(classOf[JUnit4]) +class ExceptionTest { + + @Test + def andFinally(): Unit = { + + locally { + val audit = ListBuffer[Int]() + val katch = nonFatalCatch[Unit].andFinally(audit append 1) + val result = katch(10) + assertEquals(result, 10) + assertEquals(audit.toList, 1 :: Nil) + } + + locally { + val audit = ListBuffer[Int]() + val katch = nonFatalCatch[Unit].andFinally(audit append 1).andFinally(audit append 2) + val result = katch(20) + assertEquals(result, 20) + assertEquals(audit.toList, 1 :: 2 :: Nil) + } + } +}
\ No newline at end of file diff --git a/test/long-running/jvm/memleak2_actor.scala b/test/long-running/jvm/memleak2_actor.scala deleted file mode 100644 index 1673b12dac..0000000000 --- a/test/long-running/jvm/memleak2_actor.scala +++ /dev/null @@ -1,39 +0,0 @@ -import scala.actors._ -import Actor._ - -case object Start -case object EndMe - -class A extends Actor { - def act = loop { - react { - case Start => - case EndMe => - exit() - } - } -} - -object Test { - - def z(in: Long) = if (in / 1024L == 0L) in - else if (in / (1024L * 1024L) == 0L) (in / 1024L).toString + "K" - else (in / (1024L * 1024L)).toString + "M" - - def main(args: Array[String]) { - val rt = Runtime.getRuntime() - for (o <- 1 to 300000) { - println("Outer [2AN] "+o) - var a: List[A] = Nil - for (i <- 1 to 10000) { - var t = new A - a = t :: a - t.start - t ! Start - } - for (act <- a) act ! EndMe - //rt.gc() - println("Free "+z(rt.freeMemory())+" total "+z(rt.totalMemory())) - } - } -} diff --git a/test/partest b/test/partest index cb07c00e04..07a5de12af 100755 --- a/test/partest +++ b/test/partest @@ -124,8 +124,7 @@ fi # last arg wins, so if JAVA_OPTS already contains -Xmx or -Xms the # supplied argument will be used. -# At this writing it is reported test/partest --all requires 108m permgen. -JAVA_OPTS="-Xmx1024M -Xms64M -XX:MaxPermSize=128M $JAVA_OPTS" +JAVA_OPTS="-Xmx1024M -Xms64M $JAVA_OPTS" # the ant task doesn't supply any options by default, # so don't do that here either -- note that you may want to pass -optimise diff --git a/test/pending/jvm/actor-executor4.check b/test/pending/jvm/actor-executor4.check deleted file mode 100644 index da78f45836..0000000000 --- a/test/pending/jvm/actor-executor4.check +++ /dev/null @@ -1,21 +0,0 @@ -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -Two: OK -One: OK -One exited diff --git a/test/pending/jvm/actor-executor4.scala b/test/pending/jvm/actor-executor4.scala deleted file mode 100644 index a912d76094..0000000000 --- a/test/pending/jvm/actor-executor4.scala +++ /dev/null @@ -1,64 +0,0 @@ -import scala.actors.{Actor, Exit} -import scala.actors.scheduler.ExecutorScheduler -import java.util.concurrent.Executors - -object One extends AdaptedActor { - def act() { - Two.start() - var i = 0 - loopWhile (i < Test.NUM_MSG) { - i += 1 - Two ! 'MsgForTwo - react { - case 'MsgForOne => - if (i % (Test.NUM_MSG/10) == 0) - println("One: OK") - } - } - } -} - -object Two extends AdaptedActor { - def act() { - var i = 0 - loopWhile (i < Test.NUM_MSG) { - i += 1 - react { - case 'MsgForTwo => - if (i % (Test.NUM_MSG/10) == 0) - println("Two: OK") - One ! 'MsgForOne - } - } - } -} - -trait AdaptedActor extends Actor { - override def scheduler = - Test.scheduler -} - -object Test { - val NUM_MSG = 100000 - - val scheduler = - ExecutorScheduler( - Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors()), - false) - - def main(args: Array[String]) { - (new AdaptedActor { - def act() { - trapExit = true - link(One) - One.start() - - receive { - case Exit(from, reason) => - println("One exited") - Test.scheduler.shutdown() - } - } - }).start() - } -} diff --git a/test/pending/jvm/actor-receive-sender.check b/test/pending/jvm/actor-receive-sender.check deleted file mode 100644 index 2c94e48371..0000000000 --- a/test/pending/jvm/actor-receive-sender.check +++ /dev/null @@ -1,2 +0,0 @@ -OK -OK diff --git a/test/pending/jvm/actor-receive-sender.scala b/test/pending/jvm/actor-receive-sender.scala deleted file mode 100644 index ea7c40cced..0000000000 --- a/test/pending/jvm/actor-receive-sender.scala +++ /dev/null @@ -1,51 +0,0 @@ -import scala.actors.{Actor, TIMEOUT, Exit} -import scala.actors.Actor._ - -object Test { - - val NUM = 2000 - - def main(args: Array[String]) { - var b: Actor = null - var c: Actor = null - - val a = actor { - for (_ <- 0 until NUM) - receive { - case 'hello if sender == b => // do nothing - } - b ! 'ok - for (_ <- 0 until NUM) - receiveWithin (1000) { - case 'bye if sender == b => // do nothing - case TIMEOUT => b ! 'fail - } - b ! 'ok - } - - b = actor { - self.trapExit = true - link(a) - - for (_ <- 0 until NUM) - a ! 'hello - - val proceed = receive { - case Exit(from, reason) => println("FAIL"); false - case 'ok => println("OK"); true - case other => println(other); false - } - - if (proceed) { - for (_ <- 0 until NUM) - a ! 'bye - receive { - case Exit(from, reason) => println("FAIL") - case 'ok => println("OK") - case other => println(other) - } - } - } - } - -} diff --git a/test/pending/jvm/actorgc_leak.check b/test/pending/jvm/actorgc_leak.check deleted file mode 100644 index a965a70ed4..0000000000 --- a/test/pending/jvm/actorgc_leak.check +++ /dev/null @@ -1 +0,0 @@ -Done diff --git a/test/pending/jvm/actorgc_leak.scala b/test/pending/jvm/actorgc_leak.scala deleted file mode 100644 index de3e04f1e8..0000000000 --- a/test/pending/jvm/actorgc_leak.scala +++ /dev/null @@ -1,63 +0,0 @@ - -import scala.actors.Actor - -object Test { - class FatActorFactory extends Actor { - def act() { - var cnt = 0 - Actor.loopWhile(cnt < fatActors) { - //if ((cnt % 5) == 0) println(cnt) - val fa = new FatActor() - fa.start() - cnt += 1 - if (cnt == fatActors) Monitor ! 'done - } - } - } - - class FatActor extends Actor { - def act() { - fat = new Array[Int](fatness) - react { - case 'hi => exit() - } - } - private var fat: Array[Int] = _ - } - - object Monitor extends Actor { - private var cnt = 0 - def act() { - Actor.loop { - react { - case 'done => { - cnt += 1 - if (cnt == factories) System.exit(0) // once GC pressure stops FatActors stop being collected, and as - } // a result ActorGC never finds out that they are defunct - } - } - } - } - - val factories = 4 // the number of factories to start - val fatActors = 50 // the number of FatActors for each factory to produce - val fatness = 1024*1024*10 - - def main(args: Array[String]) { - scala.actors.Scheduler.impl.shutdown() - val sched = { - val s = new scala.actors.FJTaskScheduler2 - s.start() - s - } - scala.actors.Scheduler.impl = sched - - Monitor.start() - for(i <- 1 to factories) { - //if ((i % 50) == 0) println(i) - val fa = new FatActorFactory() - fa.start() - } - println("Done") - } -} diff --git a/test/pending/jvm/constant-optimization/Foo_1.flags b/test/pending/jvm/constant-optimization/Foo_1.flags new file mode 100644 index 0000000000..9691c0985d --- /dev/null +++ b/test/pending/jvm/constant-optimization/Foo_1.flags @@ -0,0 +1 @@ +// constant otimization not there yet, -Yopt:nullness-tracking not enough. diff --git a/test/files/jvm/constant-optimization/Foo_1.scala b/test/pending/jvm/constant-optimization/Foo_1.scala index cb67ad4e90..6f408044d7 100644 --- a/test/files/jvm/constant-optimization/Foo_1.scala +++ b/test/pending/jvm/constant-optimization/Foo_1.scala @@ -1,6 +1,6 @@ class Foo_1 { def foo() { - // constant optimization should eliminate all branches + // constant optimization should eliminate all branches val i = 1 val x = if (i != 1) null else "good" val y = if (x == null) "good" else x + "" diff --git a/test/files/jvm/constant-optimization/Test.scala b/test/pending/jvm/constant-optimization/Test.scala index dc0f8f6103..dc0f8f6103 100644 --- a/test/files/jvm/constant-optimization/Test.scala +++ b/test/pending/jvm/constant-optimization/Test.scala diff --git a/test/pending/jvm/reactWithinZero.check b/test/pending/jvm/reactWithinZero.check deleted file mode 100644 index cf2a2facf9..0000000000 --- a/test/pending/jvm/reactWithinZero.check +++ /dev/null @@ -1,2 +0,0 @@ -TIMEOUT -'ack diff --git a/test/pending/jvm/reactWithinZero.scala b/test/pending/jvm/reactWithinZero.scala deleted file mode 100644 index 0786ce271d..0000000000 --- a/test/pending/jvm/reactWithinZero.scala +++ /dev/null @@ -1,18 +0,0 @@ -import scala.actors.{Actor, TIMEOUT} - -class A extends Actor { - def act() = reactWithin(0) { - case TIMEOUT => - println("TIMEOUT") - reply('ack) - act() - case x => println(x) - } -} - -object Test { - def main(args: Array[String]): Unit = { - val a = new A - a.start() - } -} diff --git a/test/pending/jvm/receiveWithinZero.check b/test/pending/jvm/receiveWithinZero.check deleted file mode 100644 index cf2a2facf9..0000000000 --- a/test/pending/jvm/receiveWithinZero.check +++ /dev/null @@ -1,2 +0,0 @@ -TIMEOUT -'ack diff --git a/test/pending/jvm/receiveWithinZero.scala b/test/pending/jvm/receiveWithinZero.scala deleted file mode 100644 index 315dd9c86a..0000000000 --- a/test/pending/jvm/receiveWithinZero.scala +++ /dev/null @@ -1,18 +0,0 @@ -import scala.actors.{Actor, TIMEOUT} - -class A extends Actor { - def act() = receiveWithin(0) { - case TIMEOUT => - println("TIMEOUT") - reply('ack) - act() - case x => println(x) - } -} - -object Test { - def main(args: Array[String]): Unit = { - val a = new A - a.start() - } -} diff --git a/test/pending/jvm/t1801.check b/test/pending/jvm/t1801.check deleted file mode 100644 index bf78a99db9..0000000000 --- a/test/pending/jvm/t1801.check +++ /dev/null @@ -1,6 +0,0 @@ -0 -100 -200 -300 -400 -done! diff --git a/test/pending/jvm/t1801.scala b/test/pending/jvm/t1801.scala deleted file mode 100644 index 6ed7c56336..0000000000 --- a/test/pending/jvm/t1801.scala +++ /dev/null @@ -1,31 +0,0 @@ -import scala.actors.Actor._ - -object Test { - val rt = Runtime.getRuntime() - val sender = actor { - var cnt = 0 - while(cnt < 500) { - if ((cnt % 100) == 0) println(cnt) - receiver ! new Array[Int] (148576) - cnt += 1 - //println ("Used Mem: " + (((rt.totalMemory() - rt.freeMemory()) / 1048576.) formatted "%.2f") + " Mb") - } - receiver ! 'exit - } - - val receiver = actor { - loop { - react { - case x: Array[Int] => ()//println ("received " + x.length) - case 'exit => { - println("done!") - exit() - } - } - } - } - - def main (args: Array[String]) { - sender - } -} diff --git a/test/pending/jvm/t2515.check b/test/pending/jvm/t2515.check deleted file mode 100644 index 8cb8bde11e..0000000000 --- a/test/pending/jvm/t2515.check +++ /dev/null @@ -1,10 +0,0 @@ -Iteration 1 succeeded -Iteration 2 succeeded -Iteration 3 succeeded -Iteration 4 succeeded -Iteration 5 succeeded -Iteration 6 succeeded -Iteration 7 succeeded -Iteration 8 succeeded -Iteration 9 succeeded -Iteration 10 succeeded diff --git a/test/pending/jvm/t2515.scala b/test/pending/jvm/t2515.scala deleted file mode 100644 index ee655967f3..0000000000 --- a/test/pending/jvm/t2515.scala +++ /dev/null @@ -1,43 +0,0 @@ -import scala.actors.{Futures, TIMEOUT} -import scala.actors.Actor._ - -object Test { - - def compute(): Option[Boolean] = { - val fts = for (j <- 0 until 5) yield Futures.future { - receiveWithin (100) { - case TIMEOUT => true - case other => false - } - } - val done = Futures.awaitAll(2000, fts.toArray: _*) // list to array, as varargs - if (done.contains(None)) - None - else - Some(true) - } - - def main(args:Array[String]) : Unit = { - val ft = Futures.future { - val format = new java.text.DecimalFormat("000.00'ms'") - var iter = 1 - val done = 11 - while (iter < done) { - val start = System.nanoTime() - val result = compute() - val time = System.nanoTime() - start - result match { - case Some(result) => - //printf("Iteration %2d succeeded after %s %n", iter, format.format(time / 1e6)) - printf("Iteration %2d succeeded%n", iter) - iter += 1 - case None => - printf(">>>> Iteration %2d failed after %s <<<<< %n", iter, format.format(time / 1e6)) - iter = done - } - } - } - ft() - } - -} diff --git a/test/pending/jvm/terminateLinked.check b/test/pending/jvm/terminateLinked.check deleted file mode 100644 index a965a70ed4..0000000000 --- a/test/pending/jvm/terminateLinked.check +++ /dev/null @@ -1 +0,0 @@ -Done diff --git a/test/pending/jvm/terminateLinked.scala b/test/pending/jvm/terminateLinked.scala deleted file mode 100644 index 2a3b7fb49e..0000000000 --- a/test/pending/jvm/terminateLinked.scala +++ /dev/null @@ -1,24 +0,0 @@ -import scala.actors.Actor -import Actor._ - -object Test { - def main(args: Array[String]) { - val a = actor { - for (_ <- 1 to 10) - receive { - case b: Actor => link(b) - } - throw new Exception - } - - for (_ <- 1 to 10) - actor { - a ! self - react { - case _ => - } - } - - println("Done") - } -} diff --git a/test/pending/jvm/timeout.check b/test/pending/jvm/timeout.check deleted file mode 100644 index d86bac9de5..0000000000 --- a/test/pending/jvm/timeout.check +++ /dev/null @@ -1 +0,0 @@ -OK diff --git a/test/pending/jvm/timeout.scala b/test/pending/jvm/timeout.scala deleted file mode 100644 index 8f29f8ddbe..0000000000 --- a/test/pending/jvm/timeout.scala +++ /dev/null @@ -1,38 +0,0 @@ -// Test is in pending because although it succeeds locally, -// it takes too long on the machine which runs nightly tests. -// -// [partest] EXPECTED: 100 < x < 900 -// [partest] ACTUAL: 1519 - -import scala.actors.Actor._ -import scala.actors.TIMEOUT - -object Test extends Application { - case class Timing(time: Long) - - actor { - val a = actor { - react { - case 'doTiming => - val s = sender - reactWithin(500) { - case TIMEOUT => - s ! Timing(System.currentTimeMillis) - } - } - } - - val start = System.currentTimeMillis - (a !? 'doTiming) match { - case Timing(end) => - val delay = end - start - - if (delay > 100 && delay < 900) - println("OK") - else { - println("EXPECTED: 100 < x < 900") - println("ACTUAL: "+delay) - } - } - } -} diff --git a/test/files/run/inline-ex-handlers.check b/test/pending/run/inline-ex-handlers.check index 7c885d2cc9..fce32771b4 100644 --- a/test/files/run/inline-ex-handlers.check +++ b/test/pending/run/inline-ex-handlers.check @@ -7,7 +7,7 @@ startBlock: 1 - blocks: [1,2,3,4] + blocks: [1,3,4] - + @@ -186,2 +186,4 @@ 92 LOAD_LOCAL(value x$1) + 92 STORE_LOCAL(variable boxed1) @@ -16,50 +16,50 @@ @@ -194,5 +196,2 @@ 92 CALL_METHOD MyException.message (dynamic) - 92 JUMP 2 -- -- 2: +- +- 2: 92 RETURN(REF(class Object)) @@ -246,3 +245,3 @@ startBlock: 1 - blocks: [1,2,3,4,5,6,7,8,11,12,13,14,15,16,17,18] + blocks: [1,2,3,4,5,6,8,11,12,13,14,15,16,17,18] - + @@ -257,5 +256,2 @@ 92 SCOPE_ENTER value x1 - 92 JUMP 7 -- -- 7: +- +- 7: 92 LOAD_LOCAL(value x1) -@@ -390,5 +386,5 @@ +@@ -408,5 +404,5 @@ def main(args: Array[String] (ARRAY[REF(class String)])): Unit { - locals: value args, variable result, value ex6, value x4, value x5, value message, value x + locals: value args, variable result, value ex6, value x4, value x5, value x startBlock: 1 - blocks: [1,2,3,4,5,8,10,11,13] + blocks: [1,2,3,5,8,10,11,13,14] - -@@ -416,4 +412,13 @@ + +@@ -434,4 +430,13 @@ 103 CALL_METHOD MyException.<init> (static-instance) - 103 THROW(MyException) + ? STORE_LOCAL(value ex6) + ? JUMP 14 - -+ 14: + ++ 14: + 101 LOAD_LOCAL(value ex6) + 101 STORE_LOCAL(value x4) + 101 SCOPE_ENTER value x4 + 106 LOAD_LOCAL(value x4) + 106 IS_INSTANCE REF(class MyException) + 106 CZJUMP (BOOL)NE ? 5 : 8 -+ - 13: -@@ -429,5 +434,2 @@ ++ + 13: +@@ -447,5 +452,2 @@ 101 SCOPE_ENTER value x4 - 101 JUMP 4 -- -- 4: +- +- 4: 106 LOAD_LOCAL(value x4) -@@ -441,8 +443,5 @@ +@@ -459,8 +461,5 @@ 106 SCOPE_ENTER value x5 - 106 LOAD_LOCAL(value x5) - 106 CALL_METHOD MyException.message (dynamic) @@ -70,47 +70,47 @@ + ? LOAD_LOCAL(value x5) + 106 CALL_METHOD MyException.message (dynamic) 106 CALL_METHOD scala.Predef.println (dynamic) -@@ -518,3 +517,3 @@ +@@ -536,3 +535,3 @@ startBlock: 1 - blocks: [1,2,3,4,6,7,9,10] + blocks: [1,3,4,6,7,9,10,11,12,13] - -@@ -547,4 +546,9 @@ + +@@ -565,4 +564,9 @@ 306 CALL_METHOD MyException.<init> (static-instance) - 306 THROW(MyException) + ? JUMP 11 - -+ 11: + ++ 11: + ? LOAD_LOCAL(variable monitor4) + 305 MONITOR_EXIT + ? JUMP 12 -+ - 9: -@@ -553,3 +557,3 @@ ++ + 9: +@@ -571,3 +575,3 @@ 305 MONITOR_EXIT - ? THROW(Throwable) + ? JUMP 12 - -@@ -559,4 +563,11 @@ + +@@ -577,4 +581,11 @@ 304 MONITOR_EXIT - ? THROW(Throwable) + ? STORE_LOCAL(value t) + ? JUMP 13 - -+ 12: + ++ 12: + ? LOAD_LOCAL(variable monitor3) + 304 MONITOR_EXIT + ? STORE_LOCAL(value t) + ? JUMP 13 -+ - 3: -@@ -573,5 +584,14 @@ ++ + 3: +@@ -591,5 +602,14 @@ 310 CALL_METHOD scala.Predef.println (dynamic) - 310 JUMP 2 + 300 RETURN(UNIT) - -- 2: -+ 13: + +- 2: ++ 13: + 310 LOAD_MODULE object Predef + 310 CALL_PRIMITIVE(StartConcat) + 310 CONSTANT("Caught crash: ") @@ -121,41 +121,41 @@ + 310 CALL_PRIMITIVE(EndConcat) + 310 CALL_METHOD scala.Predef.println (dynamic) 300 RETURN(UNIT) -@@ -583,6 +603,6 @@ +@@ -601,6 +621,6 @@ with finalizer: null -- catch (Throwable) in ArrayBuffer(7, 9, 10) starting at: 6 -+ catch (Throwable) in ArrayBuffer(7, 9, 10, 11) starting at: 6 +- catch (Throwable) in Vector(7, 9, 10) starting at: 6 ++ catch (Throwable) in Vector(7, 9, 10, 11) starting at: 6 consisting of blocks: List(6) with finalizer: null -- catch (Throwable) in ArrayBuffer(4, 6, 7, 9, 10) starting at: 3 -+ catch (Throwable) in ArrayBuffer(4, 6, 7, 9, 10, 11, 12) starting at: 3 +- catch (Throwable) in Vector(4, 6, 7, 9, 10) starting at: 3 ++ catch (Throwable) in Vector(4, 6, 7, 9, 10, 11, 12) starting at: 3 consisting of blocks: List(3) -@@ -618,3 +638,3 @@ +@@ -636,3 +656,3 @@ startBlock: 1 - blocks: [1,3,4,5,6,8,9] + blocks: [1,3,4,5,6,8,9,10,11] - -@@ -642,4 +662,10 @@ + +@@ -660,4 +680,10 @@ 78 CALL_METHOD java.lang.IllegalArgumentException.<init> (static-instance) - 78 THROW(IllegalArgumentException) + ? STORE_LOCAL(value e) + ? JUMP 10 - -+ 10: + ++ 10: + 81 LOAD_LOCAL(value e) + ? STORE_LOCAL(variable exc1) + ? JUMP 11 -+ - 8: -@@ -668,3 +694,4 @@ ++ + 8: +@@ -686,3 +712,4 @@ 81 LOAD_LOCAL(value e) - 81 THROW(Exception) + ? STORE_LOCAL(variable exc1) + ? JUMP 11 - -@@ -685,2 +712,15 @@ - -+ 11: + +@@ -703,2 +730,15 @@ + ++ 11: + 83 LOAD_MODULE object Predef + 83 CONSTANT("finally") + 83 CALL_METHOD scala.Predef.println (dynamic) @@ -167,35 +167,35 @@ + 84 STORE_LOCAL(variable result) + 84 LOAD_LOCAL(variable exc1) + 84 THROW(Throwable) -+ ++ } -@@ -690,3 +730,3 @@ +@@ -708,3 +748,3 @@ with finalizer: null -- catch (<none>) in ArrayBuffer(4, 5, 6, 8) starting at: 3 -+ catch (<none>) in ArrayBuffer(4, 5, 6, 8, 10) starting at: 3 +- catch (<none>) in Vector(4, 5, 6, 8) starting at: 3 ++ catch (<none>) in Vector(4, 5, 6, 8, 10) starting at: 3 consisting of blocks: List(3) -@@ -714,5 +754,5 @@ +@@ -732,5 +772,5 @@ def main(args: Array[String] (ARRAY[REF(class String)])): Unit { - locals: value args, variable result, value ex6, variable exc2, value x4, value x5, value message, value x, value ex6, value x4, value x5, value message, value x + locals: value args, variable result, value ex6, variable exc2, value x4, value x5, value x, value ex6, value x4, value x5, value x startBlock: 1 - blocks: [1,3,4,5,6,9,13,14,15,18,20,21,23,24] + blocks: [1,3,4,5,6,9,13,14,15,18,20,21,23,24,25,26,27] - -@@ -740,4 +780,11 @@ + +@@ -758,4 +798,11 @@ 172 CALL_METHOD MyException.<init> (static-instance) - 172 THROW(MyException) + ? STORE_LOCAL(value ex6) + ? JUMP 25 - -+ 25: + ++ 25: + 170 LOAD_LOCAL(value ex6) + 170 STORE_LOCAL(value x4) + 170 SCOPE_ENTER value x4 + 170 JUMP 14 -+ - 23: -@@ -780,8 +827,5 @@ ++ + 23: +@@ -798,8 +845,5 @@ 175 SCOPE_ENTER value x5 - 175 LOAD_LOCAL(value x5) - 175 CALL_METHOD MyException.message (dynamic) @@ -206,7 +206,7 @@ + ? LOAD_LOCAL(value x5) + 176 CALL_METHOD MyException.message (dynamic) 176 CALL_METHOD scala.Predef.println (dynamic) -@@ -789,5 +833,7 @@ +@@ -807,5 +851,7 @@ 177 DUP(REF(class MyException)) - 177 LOAD_LOCAL(value message) + ? LOAD_LOCAL(value x5) @@ -215,23 +215,23 @@ - 177 THROW(MyException) + ? STORE_LOCAL(value ex6) + ? JUMP 26 - -@@ -795,3 +841,4 @@ + +@@ -813,3 +859,4 @@ 170 LOAD_LOCAL(value ex6) - 170 THROW(Throwable) + ? STORE_LOCAL(value ex6) + ? JUMP 26 - -@@ -805,2 +852,8 @@ - -+ 26: + +@@ -823,2 +870,8 @@ + ++ 26: + 169 LOAD_LOCAL(value ex6) + 169 STORE_LOCAL(value x4) + 169 SCOPE_ENTER value x4 + 169 JUMP 5 -+ - 5: -@@ -815,8 +868,5 @@ ++ + 5: +@@ -833,8 +886,5 @@ 180 SCOPE_ENTER value x5 - 180 LOAD_LOCAL(value x5) - 180 CALL_METHOD MyException.message (dynamic) @@ -242,7 +242,7 @@ + ? LOAD_LOCAL(value x5) + 181 CALL_METHOD MyException.message (dynamic) 181 CALL_METHOD scala.Predef.println (dynamic) -@@ -824,5 +874,7 @@ +@@ -842,5 +892,7 @@ 182 DUP(REF(class MyException)) - 182 LOAD_LOCAL(value message) + ? LOAD_LOCAL(value x5) @@ -251,16 +251,16 @@ - 182 THROW(MyException) + ? STORE_LOCAL(variable exc2) + ? JUMP 27 - -@@ -830,3 +882,4 @@ + +@@ -848,3 +900,4 @@ 169 LOAD_LOCAL(value ex6) - 169 THROW(Throwable) + ? STORE_LOCAL(variable exc2) + ? JUMP 27 - -@@ -847,2 +900,15 @@ - -+ 27: + +@@ -865,2 +918,15 @@ + ++ 27: + 184 LOAD_MODULE object Predef + 184 CONSTANT("finally") + 184 CALL_METHOD scala.Predef.println (dynamic) @@ -272,39 +272,39 @@ + 185 STORE_LOCAL(variable result) + 185 LOAD_LOCAL(variable exc2) + 185 THROW(Throwable) -+ ++ } -@@ -852,6 +918,6 @@ +@@ -870,6 +936,6 @@ with finalizer: null -- catch (Throwable) in ArrayBuffer(13, 14, 15, 18, 20, 21, 23) starting at: 4 -+ catch (Throwable) in ArrayBuffer(13, 14, 15, 18, 20, 21, 23, 25) starting at: 4 +- catch (Throwable) in Vector(13, 14, 15, 18, 20, 21, 23) starting at: 4 ++ catch (Throwable) in Vector(13, 14, 15, 18, 20, 21, 23, 25) starting at: 4 consisting of blocks: List(9, 8, 6, 5, 4) with finalizer: null -- catch (<none>) in ArrayBuffer(4, 5, 6, 9, 13, 14, 15, 18, 20, 21, 23) starting at: 3 -+ catch (<none>) in ArrayBuffer(4, 5, 6, 9, 13, 14, 15, 18, 20, 21, 23, 25, 26) starting at: 3 +- catch (<none>) in Vector(4, 5, 6, 9, 13, 14, 15, 18, 20, 21, 23) starting at: 3 ++ catch (<none>) in Vector(4, 5, 6, 9, 13, 14, 15, 18, 20, 21, 23, 25, 26) starting at: 3 consisting of blocks: List(3) -@@ -879,5 +945,5 @@ +@@ -897,5 +963,5 @@ def main(args: Array[String] (ARRAY[REF(class String)])): Unit { - locals: value args, variable result, value e, value ex6, value x4, value x5, value message, value x + locals: value args, variable result, value e, value ex6, value x4, value x5, value x startBlock: 1 - blocks: [1,2,3,6,7,8,11,13,14,16] + blocks: [1,2,3,6,7,8,11,13,14,16,17] - -@@ -905,4 +971,11 @@ + +@@ -923,4 +989,11 @@ 124 CALL_METHOD MyException.<init> (static-instance) - 124 THROW(MyException) + ? STORE_LOCAL(value ex6) + ? JUMP 17 - -+ 17: + ++ 17: + 122 LOAD_LOCAL(value ex6) + 122 STORE_LOCAL(value x4) + 122 SCOPE_ENTER value x4 + 122 JUMP 7 -+ - 16: -@@ -930,8 +1003,5 @@ ++ + 16: +@@ -948,8 +1021,5 @@ 127 SCOPE_ENTER value x5 - 127 LOAD_LOCAL(value x5) - 127 CALL_METHOD MyException.message (dynamic) @@ -315,41 +315,41 @@ + ? LOAD_LOCAL(value x5) + 127 CALL_METHOD MyException.message (dynamic) 127 CALL_METHOD scala.Predef.println (dynamic) -@@ -964,3 +1034,3 @@ +@@ -982,3 +1052,3 @@ with finalizer: null -- catch (IllegalArgumentException) in ArrayBuffer(6, 7, 8, 11, 13, 14, 16) starting at: 3 -+ catch (IllegalArgumentException) in ArrayBuffer(6, 7, 8, 11, 13, 14, 16, 17) starting at: 3 +- catch (IllegalArgumentException) in Vector(6, 7, 8, 11, 13, 14, 16) starting at: 3 ++ catch (IllegalArgumentException) in Vector(6, 7, 8, 11, 13, 14, 16, 17) starting at: 3 consisting of blocks: List(3) -@@ -988,5 +1058,5 @@ +@@ -1006,5 +1076,5 @@ def main(args: Array[String] (ARRAY[REF(class String)])): Unit { - locals: value args, variable result, value ex6, value x4, value x5, value message, value x, value e + locals: value args, variable result, value ex6, value x4, value x5, value x, value e startBlock: 1 - blocks: [1,2,3,4,5,8,12,13,14,16] + blocks: [1,2,3,5,8,12,13,14,16,17] - -@@ -1014,4 +1084,13 @@ + +@@ -1032,4 +1102,13 @@ 148 CALL_METHOD MyException.<init> (static-instance) - 148 THROW(MyException) + ? STORE_LOCAL(value ex6) + ? JUMP 17 - -+ 17: + ++ 17: + 145 LOAD_LOCAL(value ex6) + 145 STORE_LOCAL(value x4) + 145 SCOPE_ENTER value x4 + 154 LOAD_LOCAL(value x4) + 154 IS_INSTANCE REF(class MyException) + 154 CZJUMP (BOOL)NE ? 5 : 8 -+ - 16: -@@ -1035,5 +1114,2 @@ ++ + 16: +@@ -1053,5 +1132,2 @@ 145 SCOPE_ENTER value x4 - 145 JUMP 4 -- -- 4: +- +- 4: 154 LOAD_LOCAL(value x4) -@@ -1047,8 +1123,5 @@ +@@ -1065,8 +1141,5 @@ 154 SCOPE_ENTER value x5 - 154 LOAD_LOCAL(value x5) - 154 CALL_METHOD MyException.message (dynamic) @@ -360,60 +360,60 @@ + ? LOAD_LOCAL(value x5) + 154 CALL_METHOD MyException.message (dynamic) 154 CALL_METHOD scala.Predef.println (dynamic) -@@ -1269,3 +1342,3 @@ +@@ -1287,3 +1360,3 @@ startBlock: 1 - blocks: [1,2,3,4,5,7] + blocks: [1,2,3,4,5,7,8] - -@@ -1293,4 +1366,11 @@ + +@@ -1311,4 +1384,11 @@ 38 CALL_METHOD java.lang.IllegalArgumentException.<init> (static-instance) - 38 THROW(IllegalArgumentException) + ? STORE_LOCAL(value e) + ? JUMP 8 - -+ 8: + ++ 8: + 42 LOAD_MODULE object Predef + 42 CONSTANT("IllegalArgumentException") + 42 CALL_METHOD scala.Predef.println (dynamic) + 42 JUMP 2 -+ - 7: -@@ -1340,5 +1420,5 @@ ++ + 7: +@@ -1358,5 +1438,5 @@ def main(args: Array[String] (ARRAY[REF(class String)])): Unit { - locals: value args, variable result, value ex6, value x4, value x5, value message, value x + locals: value args, variable result, value ex6, value x4, value x5, value x startBlock: 1 - blocks: [1,2,3,4,5,8,10,11,13,14,16] + blocks: [1,2,3,5,8,10,11,13,14,16,17] - -@@ -1366,3 +1446,4 @@ + +@@ -1384,3 +1464,4 @@ 203 CALL_METHOD MyException.<init> (static-instance) - 203 THROW(MyException) + ? STORE_LOCAL(value ex6) + ? JUMP 17 - -@@ -1386,4 +1467,13 @@ + +@@ -1404,4 +1485,13 @@ 209 CALL_METHOD MyException.<init> (static-instance) - 209 THROW(MyException) + ? STORE_LOCAL(value ex6) + ? JUMP 17 - -+ 17: + ++ 17: + 200 LOAD_LOCAL(value ex6) + 200 STORE_LOCAL(value x4) + 200 SCOPE_ENTER value x4 + 212 LOAD_LOCAL(value x4) + 212 IS_INSTANCE REF(class MyException) + 212 CZJUMP (BOOL)NE ? 5 : 8 -+ - 16: -@@ -1399,5 +1489,2 @@ ++ + 16: +@@ -1417,5 +1507,2 @@ 200 SCOPE_ENTER value x4 - 200 JUMP 4 -- -- 4: +- +- 4: 212 LOAD_LOCAL(value x4) -@@ -1411,8 +1498,5 @@ +@@ -1429,8 +1516,5 @@ 212 SCOPE_ENTER value x5 - 212 LOAD_LOCAL(value x5) - 212 CALL_METHOD MyException.message (dynamic) @@ -424,69 +424,68 @@ + ? LOAD_LOCAL(value x5) + 213 CALL_METHOD MyException.message (dynamic) 213 CALL_METHOD scala.Predef.println (dynamic) -@@ -1460,3 +1544,3 @@ +@@ -1478,3 +1562,3 @@ startBlock: 1 - blocks: [1,2,3,4,5,7] + blocks: [1,2,3,4,5,7,8] - -@@ -1484,4 +1568,11 @@ + +@@ -1502,4 +1586,11 @@ 58 CALL_METHOD java.lang.IllegalArgumentException.<init> (static-instance) - 58 THROW(IllegalArgumentException) + ? STORE_LOCAL(value e) + ? JUMP 8 - -+ 8: + ++ 8: + 62 LOAD_MODULE object Predef + 62 CONSTANT("RuntimeException") + 62 CALL_METHOD scala.Predef.println (dynamic) + 62 JUMP 2 -+ - 7: -@@ -1533,3 +1624,3 @@ ++ + 7: +@@ -1551,3 +1642,3 @@ startBlock: 1 - blocks: [1,3,4] + blocks: [1,3,4,5] - -@@ -1553,4 +1644,9 @@ + +@@ -1571,4 +1662,9 @@ 229 CALL_METHOD MyException.<init> (static-instance) - 229 THROW(MyException) + ? JUMP 5 - -+ 5: + ++ 5: + ? LOAD_LOCAL(variable monitor1) + 228 MONITOR_EXIT + 228 THROW(Throwable) -+ - 3: -@@ -1559,3 +1655,3 @@ ++ + 3: +@@ -1577,3 +1673,3 @@ 228 MONITOR_EXIT - ? THROW(Throwable) + 228 THROW(Throwable) - -@@ -1587,5 +1683,5 @@ + +@@ -1605,5 +1701,5 @@ def main(args: Array[String] (ARRAY[REF(class String)])): Unit { - locals: value args, variable result, variable monitor2, variable monitorResult1 + locals: value exception$1, value args, variable result, variable monitor2, variable monitorResult1 startBlock: 1 - blocks: [1,3,4] + blocks: [1,3,4,5] - -@@ -1612,4 +1708,12 @@ + +@@ -1630,4 +1726,12 @@ 245 CALL_METHOD MyException.<init> (static-instance) - 245 THROW(MyException) + ? STORE_LOCAL(value exception$1) + ? DROP ConcatClass + ? LOAD_LOCAL(value exception$1) + ? JUMP 5 - -+ 5: + ++ 5: + ? LOAD_LOCAL(variable monitor2) + 244 MONITOR_EXIT + 244 THROW(Throwable) -+ - 3: -@@ -1618,3 +1722,3 @@ ++ + 3: +@@ -1636,3 +1740,3 @@ 244 MONITOR_EXIT - ? THROW(Throwable) + 244 THROW(Throwable) - diff --git a/test/files/run/inline-ex-handlers.scala b/test/pending/run/inline-ex-handlers.scala index 964594d258..964594d258 100644 --- a/test/files/run/inline-ex-handlers.scala +++ b/test/pending/run/inline-ex-handlers.scala diff --git a/test/files/run/origins.check b/test/pending/run/origins.check index b12cb6e38f..b12cb6e38f 100644 --- a/test/files/run/origins.check +++ b/test/pending/run/origins.check diff --git a/test/files/run/origins.flags b/test/pending/run/origins.flags index 690753d807..690753d807 100644 --- a/test/files/run/origins.flags +++ b/test/pending/run/origins.flags diff --git a/test/files/run/origins.scala b/test/pending/run/origins.scala index 6529351d3c..6529351d3c 100644 --- a/test/files/run/origins.scala +++ b/test/pending/run/origins.scala diff --git a/test/pending/run/t5698/client.scala b/test/pending/run/t5698/client.scala deleted file mode 100644 index de672c1809..0000000000 --- a/test/pending/run/t5698/client.scala +++ /dev/null @@ -1,9 +0,0 @@ -package client - - - -object Client extends App { - val peer = actors.remote.Node("localhost", 23456) - val a = actors.remote.RemoteActor.select(peer, 'test) - a ! server.TestMsg -} diff --git a/test/pending/run/t5698/server.scala b/test/pending/run/t5698/server.scala deleted file mode 100644 index e8f3cea225..0000000000 --- a/test/pending/run/t5698/server.scala +++ /dev/null @@ -1,22 +0,0 @@ -package server - - - -object Server extends App { - - class ServerActor extends actors.Actor { - def act() { - actors.remote.RemoteActor.alive(23456) - actors.remote.RemoteActor.register('test, actors.Actor.self) - loop { - react { - case TestMsg => println("Yay!") - } - } - } - } - - val a = new ServerActor - a.start() - -} diff --git a/test/pending/run/t5698/testmsg.scala b/test/pending/run/t5698/testmsg.scala deleted file mode 100644 index 004ff0b8c7..0000000000 --- a/test/pending/run/t5698/testmsg.scala +++ /dev/null @@ -1,5 +0,0 @@ -package server - - - -case object TestMsg diff --git a/test/scaladoc/javascript/test-index.html b/test/scaladoc/javascript/test-index.html index 42cbc8cc09..91756b5be1 100644 --- a/test/scaladoc/javascript/test-index.html +++ b/test/scaladoc/javascript/test-index.html @@ -6,7 +6,6 @@ src="http://code.jquery.com/qunit/git/qunit.js"></script> <script type="text/javascript" src="../../../src/compiler/scala/tools/nsc/doc/html/resource/lib/jquery.js"></script> - <script src="../../../src/compiler/scala/tools/nsc/doc/html/resource/lib/jquery.layout.js"></script> <script src="../../../src/compiler/scala/tools/nsc/doc/html/resource/lib/scheduler.js"></script> <script type="text/javascript" src="../../../src/compiler/scala/tools/nsc/doc/html/resource/lib/index.js"></script> diff --git a/test/scaladoc/resources/SI-9599.scala b/test/scaladoc/resources/SI-9599.scala new file mode 100644 index 0000000000..9365243ffb --- /dev/null +++ b/test/scaladoc/resources/SI-9599.scala @@ -0,0 +1,6 @@ +/** + * @todo todo1 + * @todo todo2 + * @todo todo3 + */ +class X diff --git a/test/scaladoc/resources/links.scala b/test/scaladoc/resources/links.scala index 8e000ab979..b6a6b08209 100644 --- a/test/scaladoc/resources/links.scala +++ b/test/scaladoc/resources/links.scala @@ -38,7 +38,7 @@ package scala.test.scaladoc.links { /** * Links to the trait: - * - [[scala.test.scaladoc.links.Target$ object Test]] + * - [[scala.test.scaladoc.links.Target$ object Target]] * - [[scala.test package scala.test]] * - [[scala.test.scaladoc.links.Target!.T trait Target -> type T]] * - [[test.scaladoc.links.Target!.S trait Target -> type S]] @@ -51,7 +51,7 @@ package scala.test.scaladoc.links { * - [[Target$.foo(z:Str* object Target -> def foo]] * - [[Target$.bar object Target -> def bar]] * - [[[[Target$.foo[A[_[_]]]* trait Target -> def foo with 3 nested tparams]]]] (should exercise nested parens) - * - [[Target.onlyInObject object Target -> def foo]] (should find the object) + * - [[Target.onlyInObject object Target -> onlyInObject]] * - [[Target$.C object Target -> class C]] (should link directly to C, not as a member) * - [[Target!.C trait Target -> class C]] (should link directly to C, not as a member) * - [[Target$.baz(c:scala\.test\.scaladoc\.links\.C)* object Target -> def baz]] (should use dots in prefix) diff --git a/test/scaladoc/run/SI-6017.scala b/test/scaladoc/run/SI-6017.scala deleted file mode 100644 index 9951534c6d..0000000000 --- a/test/scaladoc/run/SI-6017.scala +++ /dev/null @@ -1,28 +0,0 @@ -import scala.tools.nsc.doc -import scala.tools.nsc.doc.model._ -import scala.tools.nsc.doc.html.page.{Index, ReferenceIndex} -import scala.tools.partest.ScaladocModelTest - -object Test extends ScaladocModelTest { - override def scaladocSettings = "" - override def code = """ - class STAR - class Star - """ - - def testModel(rootPackage: Package) { - model match { - case Some(universe) => { - val index = IndexModelFactory.makeIndex(universe) - // Because "STAR" and "Star" are different - assert(index.firstLetterIndex('s').keys.toSeq.length == 2) - - val indexPage = new Index(universe, index) - val letters = indexPage.letters - assert(letters.length > 1) - assert(letters(0).toString == "<span>#</span>") - } - case _ => assert(false) - } - } -} diff --git a/test/scaladoc/run/SI-6580.scala b/test/scaladoc/run/SI-6580.scala index c544138f44..55168a060b 100644 --- a/test/scaladoc/run/SI-6580.scala +++ b/test/scaladoc/run/SI-6580.scala @@ -1,6 +1,5 @@ import scala.tools.nsc.doc import scala.tools.nsc.doc.model._ -import scala.tools.nsc.doc.html.page.{Index, ReferenceIndex} import scala.tools.partest.ScaladocModelTest object Test extends ScaladocModelTest { diff --git a/test/scaladoc/run/SI-6017.check b/test/scaladoc/run/SI-9620.check index 619c56180b..619c56180b 100644 --- a/test/scaladoc/run/SI-6017.check +++ b/test/scaladoc/run/SI-9620.check diff --git a/test/scaladoc/run/SI-9620.scala b/test/scaladoc/run/SI-9620.scala new file mode 100644 index 0000000000..cac34d1c18 --- /dev/null +++ b/test/scaladoc/run/SI-9620.scala @@ -0,0 +1,42 @@ +import scala.tools.nsc.doc.model._ +import scala.tools.partest.ScaladocModelTest + +object Test extends ScaladocModelTest { + override def code = """ + package a + + trait Foo[S] { + def foo(t: S): Int = 123 + } + + /** Boo with only one foo method, hopefully! + * @hideImplicitConversion BooShouldNotAppearIsFoo + */ + trait Boo[T] + + object Boo { + sealed trait ShouldNotAppear + implicit class BooShouldNotAppearIsFoo(boo: Boo[ShouldNotAppear]) extends Foo[ShouldNotAppear] + implicit class BooLongIsFoo(boo: Boo[Long]) extends Foo[Long] + } + """ + + def scaladocSettings = "-implicits" + + def testModel(rootPackage: Package) = { + import access._ + + // Assert Boo only has one implicit conversion + val boo = rootPackage._package("a")._trait("Boo") + val conversions = boo._conversions("a.Boo.BooShouldNotAppearIsFoo") ++ boo._conversions("a.Boo.BooLongIsFoo") + assert(conversions.length == 1, conversions.length + " == 1") + + // Assert that the implicit conversion is not "BooShouldNotAppearIsFoo" + assert(conversions.head.conversionShortName == "BooLongIsFoo", + conversions.head.conversionShortName + " == BooLongIsFoo") + + // Assert that the same for full path + assert(conversions.head.conversionQualifiedName == "a.Boo.BooLongIsFoo", + conversions.head.conversionQualifiedName + " == a.Boo.BooLongIsFoo") + } +} diff --git a/test/scaladoc/run/shortDescription-annotation.check b/test/scaladoc/run/shortDescription-annotation.check new file mode 100644 index 0000000000..619c56180b --- /dev/null +++ b/test/scaladoc/run/shortDescription-annotation.check @@ -0,0 +1 @@ +Done. diff --git a/test/scaladoc/run/shortDescription-annotation.scala b/test/scaladoc/run/shortDescription-annotation.scala new file mode 100644 index 0000000000..0e2950f4f9 --- /dev/null +++ b/test/scaladoc/run/shortDescription-annotation.scala @@ -0,0 +1,55 @@ +import scala.tools.nsc.doc.model._ +import scala.tools.partest.ScaladocModelTest + +object Test extends ScaladocModelTest { + override def code = """ + package a + + /** This comment should not appear + * @shortDescription This one should appear + */ + class Foo { + /** This comment should appear */ + def foo: Int = 1 + + /** This comment should not appear + * @shortDescription This comment should appear + */ + def goo: Int = 2 + } + """ + + // no need for special settings + def scaladocSettings = "" + + def testModel(rootPackage: Package) = { + import scala.tools.nsc.doc.base.comment._ + import access._ + + def inlineToStr(inl: Inline): String = inl match { + case Chain(items) => items flatMap (inlineToStr(_)) mkString "" + case Italic(in) => inlineToStr(in) + case Bold(in) => inlineToStr(in) + case Underline(in) => inlineToStr(in) + case Monospace(in) => inlineToStr(in) + case Text(text) => text + case Summary(in) => inlineToStr(in) + case EntityLink(Text(text), _) => text + case _ => inl.toString + } + + val foo = rootPackage._package("a")._class("Foo") + + // Assert that the class has the correct short description + val classDesc = inlineToStr(foo.comment.get.short) + assert(classDesc == "This one should appear", classDesc) + + // Assert that the `foo` method has the correct short description + val fooDesc = inlineToStr(foo._method("foo").comment.get.short) + assert(fooDesc == "This comment should appear", fooDesc) + + // Assert that the `goo` method has the correct short description + val gooDesc = inlineToStr(foo._method("goo").comment.get.short) + assert(gooDesc == "This comment should appear", gooDesc) + } +} diff --git a/test/scaladoc/run/t7905.check b/test/scaladoc/run/t7905.check new file mode 100644 index 0000000000..619c56180b --- /dev/null +++ b/test/scaladoc/run/t7905.check @@ -0,0 +1 @@ +Done. diff --git a/test/scaladoc/run/t7905.scala b/test/scaladoc/run/t7905.scala new file mode 100644 index 0000000000..8570724470 --- /dev/null +++ b/test/scaladoc/run/t7905.scala @@ -0,0 +1,36 @@ +import scala.tools.nsc.doc.model._ +import scala.tools.partest.ScaladocModelTest + +object Test extends ScaladocModelTest { + override def code = """ + object A { + val foo = new B { + val bar = new C { + val baz: A.this.type = A.this + } + } + } + + trait B { + type E = bar.D + + val bar: C + } + + trait C { + trait D + } + + trait G { + type F = A.foo.E + + def m(f: F) = f match { + case _: A.foo.bar.D => // error here + } + } + """ + + def scaladocSettings = "" + + def testModel(root: Package) = () +} diff --git a/test/scaladoc/scalacheck/DeprecatedIndexTest.scala b/test/scaladoc/scalacheck/DeprecatedIndexTest.scala deleted file mode 100644 index 4a5a2001d4..0000000000 --- a/test/scaladoc/scalacheck/DeprecatedIndexTest.scala +++ /dev/null @@ -1,50 +0,0 @@ -import org.scalacheck._ -import org.scalacheck.Prop._ - -import scala.tools.nsc.doc -import scala.tools.nsc.doc.html.page.DeprecatedIndex -import java.net.{URLClassLoader, URLDecoder} - -object Test extends Properties("IndexScript") { - - def getClasspath = { - // these things can be tricky - // this test previously relied on the assumption that the current thread's classloader is an url classloader and contains all the classpaths - // does partest actually guarantee this? to quote Leonard Nimoy: The answer, of course, is no. - // this test _will_ fail again some time in the future. - // Footnote: java.lang.ClassCastException: org.apache.tools.ant.loader.AntClassLoader5 cannot be cast to java.net.URLClassLoader - val loader = Thread.currentThread.getContextClassLoader.asInstanceOf[URLClassLoader] - val paths = loader.getURLs.map(u => URLDecoder.decode(u.getPath)) - paths mkString java.io.File.pathSeparator - } - - val docFactory = { - val settings = new doc.Settings({Console.err.println(_)}) - settings.scaladocQuietRun = true - settings.nowarn.value = true - settings.classpath.value = getClasspath - val reporter = new scala.tools.nsc.reporters.ConsoleReporter(settings) - new doc.DocFactory(reporter, settings) - } - - val indexModelFactory = doc.model.IndexModelFactory - - def createDeprecatedScript(path: String) = - docFactory.makeUniverse(Left(List(path))) match { - case Some(universe) => { - val index = new DeprecatedIndex(universe, indexModelFactory.makeIndex(universe)) - Some(index) - } - case _ => - None - } - - property("deprecated-list page lists deprecated members") = { - createDeprecatedScript("test/scaladoc/resources/SI-4476.scala") match { - case Some(p) => - p.deprecatedEntries.find(_._1 == "A").isDefined && - p.deprecatedEntries.find(_._1 == "bar").isDefined - case None => false - } - } -} diff --git a/test/scaladoc/scalacheck/HtmlFactoryTest.scala b/test/scaladoc/scalacheck/HtmlFactoryTest.scala index 578e0382eb..ab2c058a03 100644 --- a/test/scaladoc/scalacheck/HtmlFactoryTest.scala +++ b/test/scaladoc/scalacheck/HtmlFactoryTest.scala @@ -26,10 +26,9 @@ object Test extends Properties("HtmlFactory") { final val RESOURCES = "test/scaladoc/resources/" + import scala.tools.nsc.ScalaDocReporter import scala.tools.nsc.doc.{DocFactory, Settings} - import scala.tools.nsc.doc.model.IndexModelFactory import scala.tools.nsc.doc.html.HtmlFactory - import scala.tools.nsc.doc.html.page.ReferenceIndex def getClasspath = { // these things can be tricky @@ -58,8 +57,7 @@ object Test extends Properties("HtmlFactory") { createFactory.makeUniverse(Left(List(RESOURCES+basename))) match { case Some(universe) => { - val index = IndexModelFactory.makeIndex(universe) - (new HtmlFactory(universe, index)).writeTemplates((page) => { + new HtmlFactory(universe, new ScalaDocReporter(universe.settings)).writeTemplates((page) => { result += (page.absoluteLinkTo(page.path) -> page.body) }) } @@ -69,23 +67,6 @@ object Test extends Properties("HtmlFactory") { result } - def createReferenceIndex(basename: String) = { - createFactory.makeUniverse(Left(List(RESOURCES+basename))) match { - case Some(universe) => { - val index = IndexModelFactory.makeIndex(universe) - val pages = index.firstLetterIndex.map({ - case (key, value) => { - val page = new ReferenceIndex(key, index, universe) - page.absoluteLinkTo(page.path) -> page.body - } - }) - Some(pages) - } - case _ => - None - } - } - def createTemplate(scala: String) = { val html = scala.stripSuffix(".scala") + ".html" createTemplates(scala)(html) @@ -336,27 +317,6 @@ object Test extends Properties("HtmlFactory") { } } - property("Trac #4471") = { - createReferenceIndex("Trac4471.scala") match { - case Some(pages) => - (pages.get("index/index-f.html") match { - case Some(node) => node.toString.contains(">A</a></strike>") - case _ => false - }) && (pages.get("index/index-b.html") match { - case Some(node) => node.toString.contains(">bar</strike>") - case _ => false - }) - case _ => false - } - } - - property("SI-4641") = { - createReferenceIndex("SI_4641.scala") match { - case Some(pages) => pages.contains("index/index-_.html") - case _ => false - } - } - property("SI-4421") = { createTemplate("SI_4421.scala") match { case node: scala.xml.Node => { @@ -723,9 +683,9 @@ object Test extends Properties("HtmlFactory") { } case _ => false } - property("package") = files.get("com/example/p1/package.html") != None + property("package") = files.get("com/example/p1/index.html") != None - property("package object") = files("com/example/p1/package.html") match { + property("package object") = files("com/example/p1/index.html") match { case node: scala.xml.Node => node.toString contains "com.example.p1#packageObjectMethod" case _ => false @@ -743,13 +703,13 @@ object Test extends Properties("HtmlFactory") { property("SI-8514: No inconsistencies") = checkText("SI-8514.scala")( - (Some("a/package"), + (Some("a/index"), """class A extends AnyRef Some doc here Some doc here Annotations @DeveloperApi() """, true), - (Some("a/package"), + (Some("a/index"), """class B extends AnyRef Annotations @DeveloperApi() """, true) @@ -771,12 +731,17 @@ object Test extends Properties("HtmlFactory") { def assertTypeLink(expectedUrl: String): Boolean = { val linkElement: NodeSeq = node \\ "div" \@ ("id", "definition") \\ "span" \@ ("class", "permalink") \ "a" - linkElement \@ "href" == expectedUrl && linkElement \@ "target" == "_top" + linkElement \@ "href" == expectedUrl } def assertMemberLink(group: String)(memberName: String, expectedUrl: String): Boolean = { val linkElement: NodeSeq = node \\ "div" \@ ("id", group) \\ "li" \@ ("name", memberName) \\ "span" \@ ("class", "permalink") \ "a" - linkElement \@ "href" == expectedUrl && linkElement \@ "target" == "_top" + linkElement \@ "href" == expectedUrl + } + + def assertValuesLink(memberName: String, expectedUrl: String): Boolean = { + val linkElement: NodeSeq = node \\ "div" \@ ("class", "values members") \\ "li" \@ ("name", memberName) \\ "span" \@ ("class", "permalink") \ "a" + linkElement \@ "href" == expectedUrl } } @@ -789,29 +754,31 @@ object Test extends Properties("HtmlFactory") { case _ => false } - property("SI-8144: Members' permalink - package") = check("some/package.html") { node => - ("type link" |: node.assertTypeLink("../index.html#some.package")) && - ("member: some.pack" |: node.assertMemberLink("values")("some.pack", "../index.html#some.package@pack")) - } - - property("SI-8144: Members' permalink - inner package") = check("some/pack/package.html") { node => - ("type link" |: node.assertTypeLink("../../index.html#some.pack.package")) && - ("member: SomeType (object)" |: node.assertMemberLink("values")("some.pack.SomeType", "../../index.html#some.pack.package@SomeType")) && - ("member: SomeType (class)" |: node.assertMemberLink("types")("some.pack.SomeType", "../../index.html#some.pack.package@SomeTypeextendsAnyRef")) + property("SI-8144: Members' permalink - inner package") = check("some/pack/index.html") { node => + ("type link" |: node.assertTypeLink("../../some/pack/index.html")) && + ("member: SomeType (object)" |: node.assertValuesLink("some.pack.SomeType", "../../some/pack/index.html#SomeType")) && + ("member: SomeType (class)" |: node.assertMemberLink("types")("some.pack.SomeType", "../../some/pack/index.html#SomeTypeextendsAnyRef")) } property("SI-8144: Members' permalink - companion object") = check("some/pack/SomeType$.html") { node => - ("type link" |: node.assertTypeLink("../../index.html#some.pack.SomeType$")) && - ("member: someVal" |: node.assertMemberLink("allMembers")("some.pack.SomeType#someVal", "../../index.html#some.pack.SomeType$@someVal:String")) + ("type link" |: node.assertTypeLink("../../some/pack/SomeType$.html")) && + ("member: someVal" |: node.assertMemberLink("allMembers")("some.pack.SomeType#someVal", "../../some/pack/SomeType$.html#someVal:String")) } property("SI-8144: Members' permalink - class") = check("some/pack/SomeType.html") { node => - ("type link" |: node.assertTypeLink("../../index.html#some.pack.SomeType")) && - ("constructor " |: node.assertMemberLink("constructors")("some.pack.SomeType#<init>", "../../index.html#some.pack.SomeType@<init>(arg:String):some.pack.SomeType")) && - ( "member: type TypeAlias" |: node.assertMemberLink("types")("some.pack.SomeType.TypeAlias", "../../index.html#some.pack.SomeType@TypeAlias=String")) && - ( "member: def >#<():Int " |: node.assertMemberLink("values")("some.pack.SomeType#>#<", "../../index.html#some.pack.SomeType@>#<():Int")) && - ( "member: def >@<():TypeAlias " |: node.assertMemberLink("values")("some.pack.SomeType#>@<", "../../index.html#some.pack.SomeType@>@<():SomeType.this.TypeAlias")) + ("type link" |: node.assertTypeLink("../../some/pack/SomeType.html")) && + ("constructor " |: node.assertMemberLink("constructors")("some.pack.SomeType#<init>", "../../some/pack/SomeType.html#<init>(arg:String):some.pack.SomeType")) && + ( "member: type TypeAlias" |: node.assertMemberLink("types")("some.pack.SomeType.TypeAlias", "../../some/pack/SomeType.html#TypeAlias=String")) && + ( "member: def >#<():Int " |: node.assertValuesLink("some.pack.SomeType#>#<", "../../some/pack/SomeType.html#>#<():Int")) && + ( "member: def >@<():TypeAlias " |: node.assertValuesLink("some.pack.SomeType#>@<", "../../some/pack/SomeType.html#>@<():SomeType.this.TypeAlias")) } } + + property("SI-9599 Multiple @todo formatted with comma on separate line") = { + createTemplates("SI-9599.scala")("X.html") match { + case node: scala.xml.Node => node.text.contains("todo3todo2todo1") + case _ => false + } + } } diff --git a/test/scaladoc/scalacheck/IndexScriptTest.scala b/test/scaladoc/scalacheck/IndexScriptTest.scala index b8b9f92965..61f462186d 100644 --- a/test/scaladoc/scalacheck/IndexScriptTest.scala +++ b/test/scaladoc/scalacheck/IndexScriptTest.scala @@ -31,17 +31,14 @@ object Test extends Properties("IndexScript") { def createIndexScript(path: String) = docFactory.makeUniverse(Left(List(path))) match { - case Some(universe) => { - val index = new IndexScript(universe, - indexModelFactory.makeIndex(universe)) - Some(index) - } + case Some(universe) => + Some(new IndexScript(universe)) case _ => None } property("allPackages") = { - createIndexScript("src/scaladoc/scala/tools/nsc/doc/html/page/Index.scala") match { + createIndexScript("src/scaladoc/scala/tools/nsc/doc/html/page/IndexScript.scala") match { case Some(index) => index.allPackages.map(_.toString) == List( "scala", diff --git a/test/scaladoc/scalacheck/IndexTest.scala b/test/scaladoc/scalacheck/IndexTest.scala deleted file mode 100644 index 7dbd2103a6..0000000000 --- a/test/scaladoc/scalacheck/IndexTest.scala +++ /dev/null @@ -1,95 +0,0 @@ -import org.scalacheck._ -import org.scalacheck.Prop._ - -import scala.tools.nsc.doc -import scala.tools.nsc.doc.html.page.Index -import java.net.{URLClassLoader, URLDecoder} - -object Test extends Properties("Index") { - - def getClasspath = { - // these things can be tricky - // this test previously relied on the assumption that the current thread's classloader is an url classloader and contains all the classpaths - // does partest actually guarantee this? to quote Leonard Nimoy: The answer, of course, is no. - // this test _will_ fail again some time in the future. - // Footnote: java.lang.ClassCastException: org.apache.tools.ant.loader.AntClassLoader5 cannot be cast to java.net.URLClassLoader - val loader = Thread.currentThread.getContextClassLoader.asInstanceOf[URLClassLoader] - val paths = loader.getURLs.map(u => URLDecoder.decode(u.getPath)) - paths mkString java.io.File.pathSeparator - } - - val docFactory = { - val settings = new doc.Settings({Console.err.println(_)}) - settings.scaladocQuietRun = true - settings.nowarn.value = true - settings.classpath.value = getClasspath - - val reporter = new scala.tools.nsc.reporters.ConsoleReporter(settings) - new doc.DocFactory(reporter, settings) - } - - val indexModelFactory = doc.model.IndexModelFactory - - def createIndex(path: String): Option[Index] = { - - val maybeUniverse = { - //val stream = new java.io.ByteArrayOutputStream - //val original = Console.out - //Console.setOut(stream) - - val result = docFactory.makeUniverse(Left(List(path))) - - // assert(stream.toString == "model contains 2 documentable templates\n") - //Console.setOut(original) - - result - } - - maybeUniverse match { - case Some(universe) => { - val index = new Index(universe, indexModelFactory.makeIndex(universe)) - return Some(index) - } - case _ => return None - } - - } - - property("path") = { - createIndex("src/scaladoc/scala/tools/nsc/doc/html/page/Index.scala") match { - case Some(index) => - index.path == List("index.html") - case None => false - } - } - - property("title") = { - createIndex("src/scaladoc/scala/tools/nsc/doc/html/page/Index.scala") match { - case Some(index) => - index.title == "" - - case None => false - } - } - property("browser contains a script element") = { - createIndex("src/scaladoc/scala/tools/nsc/doc/html/page/Index.scala") match { - case Some(index) => - (index.browser \ "script").size == 1 - - case None => false - } - } - property("package objects in index") = { - createIndex("test/scaladoc/resources/SI-5558.scala") match { - case Some(index) => - index.index.firstLetterIndex('f') isDefinedAt "foo" - case None => false - } - } - property("index should report if there are deprecated members") = { - createIndex("test/scaladoc/resources/SI-4476.scala") match { - case Some(indexPage) => indexPage.index.hasDeprecatedMembers - case None => false - } - } -} |