diff options
author | Martin Odersky <odersky@gmail.com> | 2010-06-08 07:27:08 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2010-06-08 07:27:08 +0000 |
commit | d112ec1f8878b02094b68ebe849dbc8831a9c0d9 (patch) | |
tree | 5c88195fb5596c97963c51f93c94a0899ccb0d68 /src/library | |
parent | a1e29d20aa7b49caf07e7992287eb0ba8208558a (diff) | |
download | scala-d112ec1f8878b02094b68ebe849dbc8831a9c0d9.tar.gz scala-d112ec1f8878b02094b68ebe849dbc8831a9c0d9.tar.bz2 scala-d112ec1f8878b02094b68ebe849dbc8831a9c0d9.zip |
Fixed #2424. Review by dragos
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/runtime/ShortRef.java | 1 | ||||
-rwxr-xr-x | src/library/scala/runtime/VolatileBooleanRef.java | 20 | ||||
-rwxr-xr-x | src/library/scala/runtime/VolatileByteRef.java | 20 | ||||
-rwxr-xr-x | src/library/scala/runtime/VolatileCharRef.java | 20 | ||||
-rwxr-xr-x | src/library/scala/runtime/VolatileDoubleRef.java | 19 | ||||
-rwxr-xr-x | src/library/scala/runtime/VolatileFloatRef.java | 20 | ||||
-rwxr-xr-x | src/library/scala/runtime/VolatileIntRef.java | 19 | ||||
-rwxr-xr-x | src/library/scala/runtime/VolatileLongRef.java | 20 | ||||
-rwxr-xr-x | src/library/scala/runtime/VolatileObjectRef.java | 20 | ||||
-rwxr-xr-x | src/library/scala/runtime/VolatileShortRef.java | 20 |
10 files changed, 179 insertions, 0 deletions
diff --git a/src/library/scala/runtime/ShortRef.java b/src/library/scala/runtime/ShortRef.java index eadacaca19..76db3de29a 100644 --- a/src/library/scala/runtime/ShortRef.java +++ b/src/library/scala/runtime/ShortRef.java @@ -16,4 +16,5 @@ public class ShortRef implements java.io.Serializable { public short elem; public ShortRef(short elem) { this.elem = elem; } + public String toString() { return java.lang.Short.toString(elem); } } diff --git a/src/library/scala/runtime/VolatileBooleanRef.java b/src/library/scala/runtime/VolatileBooleanRef.java new file mode 100755 index 0000000000..5cb308b0fd --- /dev/null +++ b/src/library/scala/runtime/VolatileBooleanRef.java @@ -0,0 +1,20 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2002-2010, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + + + +package scala.runtime; + + +public class VolatileBooleanRef implements java.io.Serializable { + private static final long serialVersionUID = -5730524563015615974L; + + volatile public boolean elem; + public VolatileBooleanRef(boolean elem) { this.elem = elem; } + public String toString() { return "" + elem; } +} diff --git a/src/library/scala/runtime/VolatileByteRef.java b/src/library/scala/runtime/VolatileByteRef.java new file mode 100755 index 0000000000..4cddb3ecca --- /dev/null +++ b/src/library/scala/runtime/VolatileByteRef.java @@ -0,0 +1,20 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2002-2010, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + + + +package scala.runtime; + + +public class VolatileByteRef implements java.io.Serializable { + private static final long serialVersionUID = -100666928446877072L; + + volatile public byte elem; + public VolatileByteRef(byte elem) { this.elem = elem; } + public String toString() { return java.lang.Byte.toString(elem); } +} diff --git a/src/library/scala/runtime/VolatileCharRef.java b/src/library/scala/runtime/VolatileCharRef.java new file mode 100755 index 0000000000..76cc1267fd --- /dev/null +++ b/src/library/scala/runtime/VolatileCharRef.java @@ -0,0 +1,20 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2002-2010, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + + + +package scala.runtime; + + +public class VolatileCharRef implements java.io.Serializable { + private static final long serialVersionUID = 6537214938268005702L; + + volatile public char elem; + public VolatileCharRef(char elem) { this.elem = elem; } + public String toString() { return java.lang.Character.toString(elem); } +} diff --git a/src/library/scala/runtime/VolatileDoubleRef.java b/src/library/scala/runtime/VolatileDoubleRef.java new file mode 100755 index 0000000000..4720638399 --- /dev/null +++ b/src/library/scala/runtime/VolatileDoubleRef.java @@ -0,0 +1,19 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2002-2010, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + + + +package scala.runtime; + +public class VolatileDoubleRef implements java.io.Serializable { + private static final long serialVersionUID = 8304402127373655534L; + + volatile public double elem; + public VolatileDoubleRef(double elem) { this.elem = elem; } + public String toString() { return java.lang.Double.toString(elem); } +} diff --git a/src/library/scala/runtime/VolatileFloatRef.java b/src/library/scala/runtime/VolatileFloatRef.java new file mode 100755 index 0000000000..e69dd3a2c9 --- /dev/null +++ b/src/library/scala/runtime/VolatileFloatRef.java @@ -0,0 +1,20 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2002-2010, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + + + +package scala.runtime; + + +public class VolatileFloatRef implements java.io.Serializable { + private static final long serialVersionUID = -5793980990371366933L; + + volatile public float elem; + public VolatileFloatRef(float elem) { this.elem = elem; } + public String toString() { return java.lang.Float.toString(elem); } +} diff --git a/src/library/scala/runtime/VolatileIntRef.java b/src/library/scala/runtime/VolatileIntRef.java new file mode 100755 index 0000000000..bf306a2c4c --- /dev/null +++ b/src/library/scala/runtime/VolatileIntRef.java @@ -0,0 +1,19 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2002-2010, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + + + +package scala.runtime; + +public class VolatileIntRef implements java.io.Serializable { + private static final long serialVersionUID = 1488197132022872888L; + + volatile public int elem; + public VolatileIntRef(int elem) { this.elem = elem; } + public String toString() { return java.lang.Integer.toString(elem); } +} diff --git a/src/library/scala/runtime/VolatileLongRef.java b/src/library/scala/runtime/VolatileLongRef.java new file mode 100755 index 0000000000..d7e094e296 --- /dev/null +++ b/src/library/scala/runtime/VolatileLongRef.java @@ -0,0 +1,20 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2002-2010, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + + + +package scala.runtime; + + +public class VolatileLongRef implements java.io.Serializable { + private static final long serialVersionUID = -3567869820105829499L; + + volatile public long elem; + public VolatileLongRef(long elem) { this.elem = elem; } + public String toString() { return java.lang.Long.toString(elem); } +} diff --git a/src/library/scala/runtime/VolatileObjectRef.java b/src/library/scala/runtime/VolatileObjectRef.java new file mode 100755 index 0000000000..2549b58713 --- /dev/null +++ b/src/library/scala/runtime/VolatileObjectRef.java @@ -0,0 +1,20 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2002-2010, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + + + +package scala.runtime; + + +public class VolatileObjectRef implements java.io.Serializable { + private static final long serialVersionUID = -9055728157600312291L; + + volatile public Object elem; + public VolatileObjectRef(Object elem) { this.elem = elem; } + public String toString() { return "" + elem; } +} diff --git a/src/library/scala/runtime/VolatileShortRef.java b/src/library/scala/runtime/VolatileShortRef.java new file mode 100755 index 0000000000..ccb160fae9 --- /dev/null +++ b/src/library/scala/runtime/VolatileShortRef.java @@ -0,0 +1,20 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2002-2010, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + + + +package scala.runtime; + + +public class VolatileShortRef implements java.io.Serializable { + private static final long serialVersionUID = 4218441291229072313L; + + volatile public short elem; + public VolatileShortRef(short elem) { this.elem = elem; } + public String toString() { return java.lang.Short.toString(elem); } +} |