From 242afcdafdaacee06f32074a228f567ee58f9fd0 Mon Sep 17 00:00:00 2001 From: mihaylov Date: Fri, 9 Feb 2007 17:07:01 +0000 Subject: Added the C# files to src/dotnet-library/scala/... Added the C# files to src/dotnet-library/scala/runtime --- src/dotnet-library/scala/runtime/BooleanRef.cs | 22 +++++++++++++ src/dotnet-library/scala/runtime/BoxedUnit.cs | 36 ++++++++++++++++++++++ src/dotnet-library/scala/runtime/ByteRef.cs | 22 +++++++++++++ src/dotnet-library/scala/runtime/CharRef.cs | 22 +++++++++++++ src/dotnet-library/scala/runtime/DoubleRef.cs | 22 +++++++++++++ .../scala/runtime/ExceptionHandling.cs | 27 ++++++++++++++++ src/dotnet-library/scala/runtime/FloatRef.cs | 22 +++++++++++++ src/dotnet-library/scala/runtime/IntRef.cs | 22 +++++++++++++ src/dotnet-library/scala/runtime/LongRef.cs | 22 +++++++++++++ src/dotnet-library/scala/runtime/ObjectRef.cs | 22 +++++++++++++ src/dotnet-library/scala/runtime/Runnable.cs | 17 ++++++++++ src/dotnet-library/scala/runtime/ShortRef.cs | 22 +++++++++++++ .../scala/runtime/SymtabAttribute.cs | 22 +++++++++++++ 13 files changed, 300 insertions(+) create mode 100644 src/dotnet-library/scala/runtime/BooleanRef.cs create mode 100644 src/dotnet-library/scala/runtime/BoxedUnit.cs create mode 100644 src/dotnet-library/scala/runtime/ByteRef.cs create mode 100644 src/dotnet-library/scala/runtime/CharRef.cs create mode 100644 src/dotnet-library/scala/runtime/DoubleRef.cs create mode 100644 src/dotnet-library/scala/runtime/ExceptionHandling.cs create mode 100644 src/dotnet-library/scala/runtime/FloatRef.cs create mode 100644 src/dotnet-library/scala/runtime/IntRef.cs create mode 100644 src/dotnet-library/scala/runtime/LongRef.cs create mode 100644 src/dotnet-library/scala/runtime/ObjectRef.cs create mode 100644 src/dotnet-library/scala/runtime/Runnable.cs create mode 100644 src/dotnet-library/scala/runtime/ShortRef.cs create mode 100644 src/dotnet-library/scala/runtime/SymtabAttribute.cs (limited to 'src') 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() {} + } + +} -- cgit v1.2.3