diff options
author | Martin Odersky <odersky@gmail.com> | 2006-01-20 15:50:55 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2006-01-20 15:50:55 +0000 |
commit | 3ba2f2b49e0635255bbb40958e05cc5dccde0424 (patch) | |
tree | bafa0a461bae7046be9285146b326a7d2685483c /src/library | |
parent | 79fab589462c093512d1c5c37adc6fdc28cd86b0 (diff) | |
download | scala-3ba2f2b49e0635255bbb40958e05cc5dccde0424.tar.gz scala-3ba2f2b49e0635255bbb40958e05cc5dccde0424.tar.bz2 scala-3ba2f2b49e0635255bbb40958e05cc5dccde0424.zip |
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/CaseClass.scala | 2 | ||||
-rw-r--r-- | src/library/scala/collection/mutable/BitSet.scala | 7 | ||||
-rw-r--r-- | src/library/scala/runtime/ScalaRunTime.scala | 11 |
3 files changed, 16 insertions, 4 deletions
diff --git a/src/library/scala/CaseClass.scala b/src/library/scala/CaseClass.scala index 07b766ede9..c899d7cff6 100644 --- a/src/library/scala/CaseClass.scala +++ b/src/library/scala/CaseClass.scala @@ -28,6 +28,6 @@ trait CaseClass extends AnyRef { */ def caseArity: Int ; - def caseName: String = ""; // for now + def caseName: String ; } diff --git a/src/library/scala/collection/mutable/BitSet.scala b/src/library/scala/collection/mutable/BitSet.scala index 40d0bf0529..fe4b5b5059 100644 --- a/src/library/scala/collection/mutable/BitSet.scala +++ b/src/library/scala/collection/mutable/BitSet.scala @@ -25,14 +25,15 @@ class BitSet(initSize: Int) extends scala.collection.BitSet { class ByteArray extends AnyRef with ResizableArray[Int] { final def ensureBits(nbits: Int): Unit = { + val l = array.length; super[ResizableArray].ensureSize(memsize( nbits )); } - final def and(j: Int, mask:Int): Unit = { - array.update( j, array(j) & mask ); - } final def or(j: Int, mask:Int): Unit = { array.update( j, array(j) | mask ); } + final def and(j: Int, mask:Int): Unit = { + array.update( j, array(j) & mask ); + } def get(j:Int, mask:Int):Boolean = { (array(j) & mask) != 0; } diff --git a/src/library/scala/runtime/ScalaRunTime.scala b/src/library/scala/runtime/ScalaRunTime.scala index 64bcbda839..827e4cc223 100644 --- a/src/library/scala/runtime/ScalaRunTime.scala +++ b/src/library/scala/runtime/ScalaRunTime.scala @@ -89,4 +89,15 @@ object ScalaRunTime { } def Seq[a](xs: a*): Seq[a] = null; // interpreted specially by new backend. + + def booleanValue(x: BoxedBoolean): Boolean = if (x eq null) false else x.booleanValue(); + def byteValue (x: BoxedNumber ): Byte = if (x eq null) 0 else x.byteValue(); + def shortValue (x: BoxedNumber ): Short = if (x eq null) 0 else x.shortValue(); + def charValue (x: BoxedNumber ): Char = if (x eq null) 0 else x.charValue(); + def intValue (x: BoxedNumber ): Int = if (x eq null) 0 else x.intValue(); + def longValue (x: BoxedNumber ): Long = if (x eq null) 0L else x.longValue(); + def floatValue (x: BoxedNumber ): Float = if (x eq null) 0.0F else x.floatValue(); + def doubleValue (x: BoxedNumber ): Double = if (x eq null) 0.0D else x.doubleValue(); + def arrayValue (x: BoxedArray, elemTag: String): Object = + if (x eq null) null else x.unbox(elemTag); } |