summaryrefslogtreecommitdiff
path: root/src/dotnet-library
diff options
context:
space:
mode:
authormihaylov <mihaylov@epfl.ch>2007-02-09 17:07:01 +0000
committermihaylov <mihaylov@epfl.ch>2007-02-09 17:07:01 +0000
commit242afcdafdaacee06f32074a228f567ee58f9fd0 (patch)
tree706e4216f5bd714062676c4635fec15f8795fdff /src/dotnet-library
parent3c8bde9170217c53a6bb1413fbc7d17679ebd4aa (diff)
downloadscala-242afcdafdaacee06f32074a228f567ee58f9fd0.tar.gz
scala-242afcdafdaacee06f32074a228f567ee58f9fd0.tar.bz2
scala-242afcdafdaacee06f32074a228f567ee58f9fd0.zip
Added the C# files to src/dotnet-library/scala/...
Added the C# files to src/dotnet-library/scala/runtime
Diffstat (limited to 'src/dotnet-library')
-rw-r--r--src/dotnet-library/scala/runtime/BooleanRef.cs22
-rw-r--r--src/dotnet-library/scala/runtime/BoxedUnit.cs36
-rw-r--r--src/dotnet-library/scala/runtime/ByteRef.cs22
-rw-r--r--src/dotnet-library/scala/runtime/CharRef.cs22
-rw-r--r--src/dotnet-library/scala/runtime/DoubleRef.cs22
-rw-r--r--src/dotnet-library/scala/runtime/ExceptionHandling.cs27
-rw-r--r--src/dotnet-library/scala/runtime/FloatRef.cs22
-rw-r--r--src/dotnet-library/scala/runtime/IntRef.cs22
-rw-r--r--src/dotnet-library/scala/runtime/LongRef.cs22
-rw-r--r--src/dotnet-library/scala/runtime/ObjectRef.cs22
-rw-r--r--src/dotnet-library/scala/runtime/Runnable.cs17
-rw-r--r--src/dotnet-library/scala/runtime/ShortRef.cs22
-rw-r--r--src/dotnet-library/scala/runtime/SymtabAttribute.cs22
13 files changed, 300 insertions, 0 deletions
diff --git a/src/dotnet-library/scala/runtime/BooleanRef.cs b/src/dotnet-library/scala/runtime/BooleanRef.cs
new file mode 100644
index 0000000000..2680b30149
--- /dev/null
+++ b/src/dotnet-library/scala/runtime/BooleanRef.cs
@@ -0,0 +1,22 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id$
+
+namespace scala.runtime {
+
+ using System;
+
+ [Serializable]
+ public class BooleanRef {
+ public bool elem;
+ public BooleanRef(bool elem) { this.elem = elem; }
+ override public string ToString() { return elem.ToString(); }
+ }
+
+}
diff --git a/src/dotnet-library/scala/runtime/BoxedUnit.cs b/src/dotnet-library/scala/runtime/BoxedUnit.cs
new file mode 100644
index 0000000000..d3ef5a3e11
--- /dev/null
+++ b/src/dotnet-library/scala/runtime/BoxedUnit.cs
@@ -0,0 +1,36 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id$
+
+
+namespace scala.runtime {
+
+ using System;
+
+ [Serializable]
+ public sealed class BoxedUnit {
+
+ public static readonly BoxedUnit UNIT = new BoxedUnit();
+
+ private BoxedUnit() { }
+
+ override public bool Equals(object other) {
+ return this == other;
+ }
+
+ override public int GetHashCode() {
+ return 0;
+ }
+
+ override public string ToString() {
+ return "()";
+ }
+ }
+
+}
diff --git a/src/dotnet-library/scala/runtime/ByteRef.cs b/src/dotnet-library/scala/runtime/ByteRef.cs
new file mode 100644
index 0000000000..6a539a3afd
--- /dev/null
+++ b/src/dotnet-library/scala/runtime/ByteRef.cs
@@ -0,0 +1,22 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id$
+
+namespace scala.runtime {
+
+ using System;
+
+ [Serializable]
+ public class ByteRef {
+ public byte elem;
+ public ByteRef(byte elem) { this.elem = elem; }
+ override public string ToString() { return elem.ToString(); }
+ }
+
+}
diff --git a/src/dotnet-library/scala/runtime/CharRef.cs b/src/dotnet-library/scala/runtime/CharRef.cs
new file mode 100644
index 0000000000..75b2817b83
--- /dev/null
+++ b/src/dotnet-library/scala/runtime/CharRef.cs
@@ -0,0 +1,22 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2006, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id$
+
+namespace scala.runtime {
+
+ using System;
+
+ [Serializable]
+ public class CharRef {
+ public char elem;
+ public CharRef(char elem) { this.elem = elem; }
+ override public string ToString() { return elem.ToString(); }
+ }
+
+}
diff --git a/src/dotnet-library/scala/runtime/DoubleRef.cs b/src/dotnet-library/scala/runtime/DoubleRef.cs
new file mode 100644
index 0000000000..60a155f00b
--- /dev/null
+++ b/src/dotnet-library/scala/runtime/DoubleRef.cs
@@ -0,0 +1,22 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id$
+
+namespace scala.runtime {
+
+ using System;
+
+ [Serializable]
+ public class DoubleRef {
+ public double elem;
+ public DoubleRef(double elem) { this.elem = elem; }
+ override public string ToString() { return elem.ToString(); }
+ }
+
+}
diff --git a/src/dotnet-library/scala/runtime/ExceptionHandling.cs b/src/dotnet-library/scala/runtime/ExceptionHandling.cs
new file mode 100644
index 0000000000..4448777f2e
--- /dev/null
+++ b/src/dotnet-library/scala/runtime/ExceptionHandling.cs
@@ -0,0 +1,27 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id$
+
+namespace scala.runtime {
+
+ using System;
+
+ public abstract class ExceptionHandling {
+
+ public static Exception tryCatch(Runnable runnable) {
+ try {
+ runnable.run();
+ return null;
+ } catch (Exception exception) {
+ return exception;
+ }
+ }
+ }
+
+}
diff --git a/src/dotnet-library/scala/runtime/FloatRef.cs b/src/dotnet-library/scala/runtime/FloatRef.cs
new file mode 100644
index 0000000000..ee81ea3c9c
--- /dev/null
+++ b/src/dotnet-library/scala/runtime/FloatRef.cs
@@ -0,0 +1,22 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id$
+
+namespace scala.runtime {
+
+ using System;
+
+ [Serializable]
+ public class FloatRef {
+ public float elem;
+ public FloatRef(float elem) { this.elem = elem; }
+ override public string ToString() { return elem.ToString(); }
+ }
+
+}
diff --git a/src/dotnet-library/scala/runtime/IntRef.cs b/src/dotnet-library/scala/runtime/IntRef.cs
new file mode 100644
index 0000000000..e305df145f
--- /dev/null
+++ b/src/dotnet-library/scala/runtime/IntRef.cs
@@ -0,0 +1,22 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id$
+
+namespace scala.runtime {
+
+ using System;
+
+ [Serializable]
+ public class IntRef {
+ public int elem;
+ public IntRef(int elem) { this.elem = elem; }
+ override public string ToString() { return elem.ToString(); }
+ }
+
+}
diff --git a/src/dotnet-library/scala/runtime/LongRef.cs b/src/dotnet-library/scala/runtime/LongRef.cs
new file mode 100644
index 0000000000..e6387ed96f
--- /dev/null
+++ b/src/dotnet-library/scala/runtime/LongRef.cs
@@ -0,0 +1,22 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id$
+
+namespace scala.runtime {
+
+ using System;
+
+ [Serializable]
+ public class LongRef {
+ public long elem;
+ public LongRef(long elem) { this.elem = elem; }
+ override public string ToString() { return elem.ToString(); }
+ }
+
+}
diff --git a/src/dotnet-library/scala/runtime/ObjectRef.cs b/src/dotnet-library/scala/runtime/ObjectRef.cs
new file mode 100644
index 0000000000..a25d61639e
--- /dev/null
+++ b/src/dotnet-library/scala/runtime/ObjectRef.cs
@@ -0,0 +1,22 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id$
+
+namespace scala.runtime {
+
+ using System;
+
+ [Serializable]
+ public class ObjectRef {
+ public Object elem;
+ public ObjectRef(Object elem) { this.elem = elem; }
+ override public string ToString() { return "" + elem; }
+ }
+
+}
diff --git a/src/dotnet-library/scala/runtime/Runnable.cs b/src/dotnet-library/scala/runtime/Runnable.cs
new file mode 100644
index 0000000000..74ab3ea16a
--- /dev/null
+++ b/src/dotnet-library/scala/runtime/Runnable.cs
@@ -0,0 +1,17 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id$
+
+namespace scala.runtime {
+
+ public interface Runnable {
+ void run();
+ }
+
+}
diff --git a/src/dotnet-library/scala/runtime/ShortRef.cs b/src/dotnet-library/scala/runtime/ShortRef.cs
new file mode 100644
index 0000000000..22f8f784e5
--- /dev/null
+++ b/src/dotnet-library/scala/runtime/ShortRef.cs
@@ -0,0 +1,22 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id$
+
+namespace scala.runtime {
+
+ using System;
+
+ [Serializable]
+ public class ShortRef {
+ public short elem;
+ public ShortRef(short elem) { this.elem = elem; }
+ override public string ToString() { return elem.ToString(); }
+ }
+
+}
diff --git a/src/dotnet-library/scala/runtime/SymtabAttribute.cs b/src/dotnet-library/scala/runtime/SymtabAttribute.cs
new file mode 100644
index 0000000000..b5608fe208
--- /dev/null
+++ b/src/dotnet-library/scala/runtime/SymtabAttribute.cs
@@ -0,0 +1,22 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id$
+
+namespace scala.runtime {
+
+ using System;
+
+ public class SymtabAttribute : Attribute {
+ public byte[] symtab;
+
+ public SymtabAttribute(byte[] symtab) { this.symtab = symtab; }
+ public SymtabAttribute() {}
+ }
+
+}