summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormihaylov <mihaylov@epfl.ch>2007-04-24 20:02:38 +0000
committermihaylov <mihaylov@epfl.ch>2007-04-24 20:02:38 +0000
commit2c2a0807ed93f43e078077a0f38888ea9e591e9a (patch)
treeb59198c3d57718b22cb0bace68f59790ad53de6e
parent9015f58e122c1dbe4dfda6f2571aa4a1e24e20a7 (diff)
downloadscala-2c2a0807ed93f43e078077a0f38888ea9e591e9a.tar.gz
scala-2c2a0807ed93f43e078077a0f38888ea9e591e9a.tar.bz2
scala-2c2a0807ed93f43e078077a0f38888ea9e591e9a.zip
Use scala.Math instead of scala.compat.Math
-rw-r--r--src/compiler/scala/tools/nsc/MainTokenMetric.scala3
-rw-r--r--src/compiler/scala/tools/nsc/doc/DocGenerator.scala2
-rw-r--r--src/compiler/scala/tools/nsc/doc/ModelAdditions.scala2
-rw-r--r--src/compiler/scala/tools/nsc/io/VirtualFile.scala3
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/RefChecks.scala3
-rw-r--r--src/library/scala/collection/BitSet.scala5
-rw-r--r--src/library/scala/collection/immutable/Tree.scala4
-rw-r--r--src/library/scala/util/automata/SubsetConstruction.scala2
8 files changed, 10 insertions, 14 deletions
diff --git a/src/compiler/scala/tools/nsc/MainTokenMetric.scala b/src/compiler/scala/tools/nsc/MainTokenMetric.scala
index 5444aac3fd..9a48f1d4b1 100644
--- a/src/compiler/scala/tools/nsc/MainTokenMetric.scala
+++ b/src/compiler/scala/tools/nsc/MainTokenMetric.scala
@@ -6,7 +6,6 @@
package scala.tools.nsc
-import compat.Math.log
import scala.tools.nsc.reporters.ConsoleReporter
/** The main class for NSC, a compiler for the programming
@@ -28,7 +27,7 @@ object MainTokenMetric {
i += 1
s.nextToken
}
- var j = 0 ; while(j + log(i) / log(10) < 7) {
+ var j = 0 ; while(j + Math.log(i) / Math.log(10) < 7) {
j += 1
Console.print(' ')
}
diff --git a/src/compiler/scala/tools/nsc/doc/DocGenerator.scala b/src/compiler/scala/tools/nsc/doc/DocGenerator.scala
index bcdddd4820..5972a59d33 100644
--- a/src/compiler/scala/tools/nsc/doc/DocGenerator.scala
+++ b/src/compiler/scala/tools/nsc/doc/DocGenerator.scala
@@ -1108,7 +1108,7 @@ abstract class DocGenerator extends Models {
* </p>
* <p>
* Values <code>""" + maxValue + """</code> and <code>""" + minValue + """</code>
- * are in defined in object <a href="compat/Math$object.html">scala.compat.Math</a>.
+ * are in defined in object <a href="Math$object.html">scala.Math</a>.
* </p>
*/"""
}
diff --git a/src/compiler/scala/tools/nsc/doc/ModelAdditions.scala b/src/compiler/scala/tools/nsc/doc/ModelAdditions.scala
index 02dcbfda40..9c77dd2a7b 100644
--- a/src/compiler/scala/tools/nsc/doc/ModelAdditions.scala
+++ b/src/compiler/scala/tools/nsc/doc/ModelAdditions.scala
@@ -161,7 +161,7 @@ class ModelAdditions(val global : Global) {
* </p>
* <p>
* Values <code>""" + maxValue + """</code> and <code>""" + minValue + """</code>
- * are in defined in object <a href="compat/Math$object.html">scala.compat.Math</a>.
+ * are in defined in object <a href="Math$object.html">scala.Math</a>.
* </p>
*/""";
}
diff --git a/src/compiler/scala/tools/nsc/io/VirtualFile.scala b/src/compiler/scala/tools/nsc/io/VirtualFile.scala
index 05c4dc8aec..865e7f0abf 100644
--- a/src/compiler/scala/tools/nsc/io/VirtualFile.scala
+++ b/src/compiler/scala/tools/nsc/io/VirtualFile.scala
@@ -7,7 +7,6 @@
package scala.tools.nsc.io
-import compat.Math.MIN_LONG
import java.io.{File,InputStream}
/** This class implements an empty abstract regular file.
@@ -44,7 +43,7 @@ class VirtualFile(val name: String, _path: String) extends AbstractFile {
def isDirectory: Boolean = false
/** Returns the time that this abstract file was last modified. */
- def lastModified: Long = MIN_LONG
+ def lastModified: Long = Math.MIN_LONG
/** Returns all abstract subfiles of this abstract directory. */
def elements: Iterator[AbstractFile] = {
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
index 3d8c664ae6..8324aac2b0 100644
--- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
@@ -10,7 +10,6 @@ import symtab.Flags._
import collection.mutable.HashMap
import transform.InfoTransform
import scala.tools.nsc.util.{Position, NoPosition}
-import compat.Math.MIN_INT
/** <p>
* Post-attribution checking and transformation.
@@ -421,7 +420,7 @@ abstract class RefChecks extends InfoTransform {
class LevelInfo(val outer: LevelInfo) {
val scope: Scope = if (outer eq null) newScope else newScope(outer.scope)
- var maxindex: int = MIN_INT
+ var maxindex: int = Math.MIN_INT
var refpos: Position = _
var refsym: Symbol = _
}
diff --git a/src/library/scala/collection/BitSet.scala b/src/library/scala/collection/BitSet.scala
index 41863fe29b..a4473f8aa8 100644
--- a/src/library/scala/collection/BitSet.scala
+++ b/src/library/scala/collection/BitSet.scala
@@ -25,7 +25,6 @@ package scala.collection
abstract class BitSet extends Set[Int] {
import compat.Platform.arraycopy
- import compat.Math.min
/** number of bits in this bitset */
def size: Int
@@ -81,7 +80,7 @@ abstract class BitSet extends Set[Int] {
override def equals(other: Any): Boolean = other match {
case that: BitSet =>
(size == that.size) && {
- var len = memsize(min(this.capacity, that.capacity))
+ var len = memsize(Math.min(this.capacity, that.capacity))
var i = 0
while (i < len && arr(i) == that.arr(i)) i = i + 1
i == len
@@ -109,7 +108,7 @@ abstract class BitSet extends Set[Int] {
case that: BitSet =>
val thisLen = memsize(this.capacity)
val thatLen = memsize(that.capacity)
- val minLen = min(thisLen, thatLen)
+ val minLen = Math.min(thisLen, thatLen)
var i = 0
while (i < minLen && that.arr(i) == (that.arr(i) | arr(i))) i = i + 1
while (i < thisLen && arr(i) == 0) i = i + 1
diff --git a/src/library/scala/collection/immutable/Tree.scala b/src/library/scala/collection/immutable/Tree.scala
index 83184965d7..d4b63b4e4f 100644
--- a/src/library/scala/collection/immutable/Tree.scala
+++ b/src/library/scala/collection/immutable/Tree.scala
@@ -236,7 +236,7 @@ private case class INode[A <% Ordered[A],B](t1: GBTree[A,B],
balance_p(GBNode(key, value, smaller, t1),smaller);
protected def balance_p(t:GBTree[A,B],subtree:GBTree[A,B]):InsertTree[A,B] = {
val (subHeight, subSize) = subtree.count
- val totalHeight = 2 * compat.Math.max(height, subHeight)
+ val totalHeight = 2 * Math.max(height, subHeight)
val totalSize = size + subSize + 1
val BalanceHeight = totalSize * totalSize
if (totalHeight > BalanceHeight) ITree(t.balance(totalSize))
@@ -308,7 +308,7 @@ private case class GBNode[A <% Ordered[A],B](key: A,
if (mySize == 1)
(1, mySize)
else
- (2 * compat.Math.max(sHeight, bHeight), mySize)
+ (2 * Math.max(sHeight, bHeight), mySize)
}
def isDefinedAt(sKey: A): Boolean =
diff --git a/src/library/scala/util/automata/SubsetConstruction.scala b/src/library/scala/util/automata/SubsetConstruction.scala
index 46d4c916f5..aff2319bef 100644
--- a/src/library/scala/util/automata/SubsetConstruction.scala
+++ b/src/library/scala/util/automata/SubsetConstruction.scala
@@ -60,7 +60,7 @@ class SubsetConstruction[T <: AnyRef](val nfa: NondetWordAutom[T]) {
def selectTag(Q: BitSet, finals: Array[Int]) = {
val it = Q.elements
- var mintag = compat.Math.MAX_INT
+ var mintag = Math.MAX_INT
while (it.hasNext) {
val tag = finals(it.next)
if ((0 < tag) && (tag < mintag))