From e5765db5e9fe6e082f10164ea6d7c7a5325f31a1 Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Tue, 10 Jul 2012 14:23:30 +0200 Subject: starr sources to move cloneable class to package `annotation` --- src/library/scala/annotation/cloneable.scala | 16 +++ .../scala/reflect/internal/Definitions.scala | 2 +- src/starr/library/scala/cloneable.scala | 0 src/starr/library/scala/package.scala | 137 +++++++++++++++++++++ tools/new-starr | 6 + 5 files changed, 160 insertions(+), 1 deletion(-) create mode 100644 src/library/scala/annotation/cloneable.scala create mode 100644 src/starr/library/scala/cloneable.scala create mode 100644 src/starr/library/scala/package.scala create mode 100755 tools/new-starr diff --git a/src/library/scala/annotation/cloneable.scala b/src/library/scala/annotation/cloneable.scala new file mode 100644 index 0000000000..8a66f1839f --- /dev/null +++ b/src/library/scala/annotation/cloneable.scala @@ -0,0 +1,16 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + + + +package scala.annotation + +/** + * An annotation that designates the class to which it is applied as cloneable + */ +class cloneable extends annotation.StaticAnnotation diff --git a/src/reflect/scala/reflect/internal/Definitions.scala b/src/reflect/scala/reflect/internal/Definitions.scala index 60689d70fe..dea001dd7f 100644 --- a/src/reflect/scala/reflect/internal/Definitions.scala +++ b/src/reflect/scala/reflect/internal/Definitions.scala @@ -903,7 +903,7 @@ trait Definitions extends api.StandardDefinitions { lazy val BeanPropertyAttr = requiredClass[scala.beans.BeanProperty] lazy val BooleanBeanPropertyAttr = requiredClass[scala.beans.BooleanBeanProperty] - lazy val CloneableAttr = requiredClass[scala.cloneable] + lazy val CloneableAttr = requiredClass[scala.annotation.cloneable] lazy val DeprecatedAttr = requiredClass[scala.deprecated] lazy val DeprecatedNameAttr = requiredClass[scala.deprecatedName] lazy val NativeAttr = requiredClass[scala.native] diff --git a/src/starr/library/scala/cloneable.scala b/src/starr/library/scala/cloneable.scala new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/starr/library/scala/package.scala b/src/starr/library/scala/package.scala new file mode 100644 index 0000000000..070ae26862 --- /dev/null +++ b/src/starr/library/scala/package.scala @@ -0,0 +1,137 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + + +/** + * Core Scala types. They are always available without an explicit import. + * @contentDiagram hideNodes "scala.Serializable" + */ +package object scala { + type Throwable = java.lang.Throwable + type Exception = java.lang.Exception + type Error = java.lang.Error + + type RuntimeException = java.lang.RuntimeException + type NullPointerException = java.lang.NullPointerException + type ClassCastException = java.lang.ClassCastException + type IndexOutOfBoundsException = java.lang.IndexOutOfBoundsException + type ArrayIndexOutOfBoundsException = java.lang.ArrayIndexOutOfBoundsException + type StringIndexOutOfBoundsException = java.lang.StringIndexOutOfBoundsException + type UnsupportedOperationException = java.lang.UnsupportedOperationException + type IllegalArgumentException = java.lang.IllegalArgumentException + type NoSuchElementException = java.util.NoSuchElementException + type NumberFormatException = java.lang.NumberFormatException + type AbstractMethodError = java.lang.AbstractMethodError + type InterruptedException = java.lang.InterruptedException + + // A dummy used by the specialization annotation. + val AnyRef = new Specializable { + override def toString = "object AnyRef" + } + + @deprecated("instead of `@serializable class C`, use `class C extends Serializable`", "2.9.0") + type serializable = annotation.serializable + + type cloneable = annotation.cloneable + + type TraversableOnce[+A] = scala.collection.TraversableOnce[A] + + type Traversable[+A] = scala.collection.Traversable[A] + val Traversable = scala.collection.Traversable + + type Iterable[+A] = scala.collection.Iterable[A] + val Iterable = scala.collection.Iterable + + type Seq[+A] = scala.collection.Seq[A] + val Seq = scala.collection.Seq + + type IndexedSeq[+A] = scala.collection.IndexedSeq[A] + val IndexedSeq = scala.collection.IndexedSeq + + type Iterator[+A] = scala.collection.Iterator[A] + val Iterator = scala.collection.Iterator + + type BufferedIterator[+A] = scala.collection.BufferedIterator[A] + + type List[+A] = scala.collection.immutable.List[A] + val List = scala.collection.immutable.List + + val Nil = scala.collection.immutable.Nil + + type ::[A] = scala.collection.immutable.::[A] + val :: = scala.collection.immutable.:: + + val +: = scala.collection.+: + val :+ = scala.collection.:+ + + type Stream[+A] = scala.collection.immutable.Stream[A] + val Stream = scala.collection.immutable.Stream + val #:: = scala.collection.immutable.Stream.#:: + + type Vector[+A] = scala.collection.immutable.Vector[A] + val Vector = scala.collection.immutable.Vector + + type StringBuilder = scala.collection.mutable.StringBuilder + val StringBuilder = scala.collection.mutable.StringBuilder + + type Range = scala.collection.immutable.Range + val Range = scala.collection.immutable.Range + + // Numeric types which were moved into scala.math.* + + type BigDecimal = scala.math.BigDecimal + val BigDecimal = scala.math.BigDecimal + + type BigInt = scala.math.BigInt + val BigInt = scala.math.BigInt + + type Equiv[T] = scala.math.Equiv[T] + val Equiv = scala.math.Equiv + + type Fractional[T] = scala.math.Fractional[T] + type Integral[T] = scala.math.Integral[T] + + type Numeric[T] = scala.math.Numeric[T] + val Numeric = scala.math.Numeric + + type Ordered[T] = scala.math.Ordered[T] + val Ordered = scala.math.Ordered + + type Ordering[T] = scala.math.Ordering[T] + val Ordering = scala.math.Ordering + + type PartialOrdering[T] = scala.math.PartialOrdering[T] + type PartiallyOrdered[T] = scala.math.PartiallyOrdered[T] + + type Either[+A, +B] = scala.util.Either[A, B] + val Either = scala.util.Either + + type Left[+A, +B] = scala.util.Left[A, B] + val Left = scala.util.Left + + type Right[+A, +B] = scala.util.Right[A, B] + val Right = scala.util.Right + + // Annotations which we might move to annotation.* +/* + type SerialVersionUID = annotation.SerialVersionUID + type cloneable = annotation.cloneable + type deprecated = annotation.deprecated + type deprecatedName = annotation.deprecatedName + type inline = annotation.inline + type native = annotation.native + type noinline = noannotation.inline + type remote = annotation.remote + type serializable = annotation.serializable + type specialized = annotation.specialized + type transient = annotation.transient + type throws = annotation.throws + type unchecked = annotation.unchecked.unchecked + type volatile = annotation.volatile + */ +} diff --git a/tools/new-starr b/tools/new-starr new file mode 100755 index 0000000000..5f00cc758e --- /dev/null +++ b/tools/new-starr @@ -0,0 +1,6 @@ +#!/bin/bash + +ant -Dscalac.args.optimise="-optimise" locker.done +cp -R src/starr/* src/ +ant build-opt +ant starr.done -- cgit v1.2.3