summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-12-04 15:19:55 +0000
committerpaltherr <paltherr@epfl.ch>2003-12-04 15:19:55 +0000
commit3b81bb39eb779dc97fa270d62b3f339c72d9fce2 (patch)
tree12a004b77ff1f7e98a5611dcb96da4d768b75ce4 /sources
parente4a37a2f1108a3c1ff880f796b1fd08ea58ca18e (diff)
downloadscala-3b81bb39eb779dc97fa270d62b3f339c72d9fce2.tar.gz
scala-3b81bb39eb779dc97fa270d62b3f339c72d9fce2.tar.bz2
scala-3b81bb39eb779dc97fa270d62b3f339c72d9fce2.zip
- Made value types flat
Diffstat (limited to 'sources')
-rw-r--r--sources/scala/Double.java84
-rw-r--r--sources/scala/Float.java111
-rw-r--r--sources/scala/Int.java192
-rw-r--r--sources/scala/Long.java157
-rw-r--r--sources/scalac/backend/Primitives.java8
5 files changed, 304 insertions, 248 deletions
diff --git a/sources/scala/Double.java b/sources/scala/Double.java
index b673de5426..727dfabf40 100644
--- a/sources/scala/Double.java
+++ b/sources/scala/Double.java
@@ -6,56 +6,62 @@
** |/ **
\* */
-// $OldId: Double.java,v 1.13 2002/10/11 08:17:20 schinz Exp $
// $Id$
package scala;
public abstract class Double extends AnyVal {
+
+
+
+
+
+
+
+
public abstract double asDouble();
- public abstract float asFloat();
- public abstract long asLong();
- public abstract int asInt();
- public abstract char asChar();
- public abstract short asShort();
- public abstract byte asByte();
-
- /** @meta method []scala.Double;
- */
- public double $plus() { return asDouble(); }
- /** @meta method []scala.Double;
- */
- public double $minus() { return -asDouble(); }
-
- public double $plus(double that) { return asDouble() + that; }
- public double $minus(double that) { return asDouble() - that; }
- public double $times(double that) { return asDouble() * that; }
- public double $div(double that) { return asDouble() / that; }
- public double $percent(double that) { return asDouble() % that; }
-
- public boolean $eq$eq(double that) { return asDouble() == that; }
- public boolean $bang$eq(double that) { return asDouble() != that; }
- public boolean $less(double that) { return asDouble() < that; }
- public boolean $greater(double that) { return asDouble() > that; }
- public boolean $less$eq(double that) { return asDouble() <= that; }
- public boolean $greater$eq(double that) { return asDouble() >= that; }
-
- public String toString() { return String.valueOf(asDouble()); }
- public String $plus(String that) { return this + that; }
+ public abstract float asFloat();
+ public abstract long asLong();
+ public abstract int asInt();
+ public abstract char asChar();
+ public abstract short asShort();
+ public abstract byte asByte();
+
+ public boolean equals(java.lang.Object other) {
+ return other instanceof Double && $eq$eq(((Double)other).asDouble());
+ }
public int hashCode() {
long bits = java.lang.Double.doubleToLongBits(asDouble());
return (int)(bits ^ (bits >>> 32));
}
-
- public boolean equals(java.lang.Object obj) {
- return obj instanceof Double && $eq$eq(((Double)obj).asDouble());
+ public String toString() {
+ return String.valueOf(asDouble());
}
- /** @meta method (scala.Any)scala.Boolean;
- */
- public boolean $eq$eq(java.lang.Object obj) { return equals(obj); }
+ /** @meta method (scala.Any)scala.Boolean; */
+ public boolean $eq$eq (java.lang.Object other) { return equals(other); }
+ /** @meta method (scala.Any)scala.Boolean; */
+ public boolean $bang$eq(java.lang.Object other) { return !equals(other); }
+
+ /** @meta method []scala.Double; */
+ public double $plus () { return +asDouble() ; }
+ /** @meta method []scala.Double; */
+ public double $minus () { return -asDouble() ; }
+
+
+
+ public String $plus (String that) { return asDouble() + that; }
+
+ public double $plus (double that) { return asDouble() + that; }
+ public double $minus (double that) { return asDouble() - that; }
+ public double $times (double that) { return asDouble() * that; }
+ public double $div (double that) { return asDouble() / that; }
+ public double $percent (double that) { return asDouble() % that; }
+ public boolean $eq$eq (double that) { return asDouble() == that; }
+ public boolean $bang$eq (double that) { return asDouble() != that; }
+ public boolean $less (double that) { return asDouble() < that; }
+ public boolean $greater (double that) { return asDouble() > that; }
+ public boolean $less$eq (double that) { return asDouble() <= that; }
+ public boolean $greater$eq(double that) { return asDouble() >= that; }
- /** @meta method (scala.Any)scala.Boolean;
- */
- public boolean $bang$eq(java.lang.Object obj) { return !equals(obj); }
}
diff --git a/sources/scala/Float.java b/sources/scala/Float.java
index b32844d526..1633755d25 100644
--- a/sources/scala/Float.java
+++ b/sources/scala/Float.java
@@ -6,55 +6,74 @@
** |/ **
\* */
-// $OldId: Float.java,v 1.13 2002/09/19 10:36:39 paltherr Exp $
// $Id$
package scala;
+public abstract class Float extends AnyVal {
+
+
+
+
+
+ /** @meta method []scala.Double; */
+ public double coerce() { return asDouble(); }
+
+ public abstract double asDouble();
+ public abstract float asFloat();
+ public abstract long asLong();
+ public abstract int asInt();
+ public abstract char asChar();
+ public abstract short asShort();
+ public abstract byte asByte();
+
+ public boolean equals(java.lang.Object other) {
+ return other instanceof Float && $eq$eq(((Float )other).asFloat ());
+ }
+ public int hashCode() {
+ int bits = java.lang.Float.floatToIntBits(asFloat());
+ return bits;
+ }
+ public String toString() {
+ return String.valueOf(asFloat ());
+ }
+
+ /** @meta method (scala.Any)scala.Boolean; */
+ public boolean $eq$eq (java.lang.Object other) { return equals(other); }
+ /** @meta method (scala.Any)scala.Boolean; */
+ public boolean $bang$eq(java.lang.Object other) { return !equals(other); }
+
+ /** @meta method []scala.Float ; */
+ public float $plus () { return +asFloat () ; }
+ /** @meta method []scala.Float ; */
+ public float $minus () { return -asFloat () ; }
+
+
+
+ public String $plus (String that) { return asFloat () + that; }
+
+ public double $plus (double that) { return asDouble() + that; }
+ public double $minus (double that) { return asDouble() - that; }
+ public double $times (double that) { return asDouble() * that; }
+ public double $div (double that) { return asDouble() / that; }
+ public double $percent (double that) { return asDouble() % that; }
+ public boolean $eq$eq (double that) { return asDouble() == that; }
+ public boolean $bang$eq (double that) { return asDouble() != that; }
+ public boolean $less (double that) { return asDouble() < that; }
+ public boolean $greater (double that) { return asDouble() > that; }
+ public boolean $less$eq (double that) { return asDouble() <= that; }
+ public boolean $greater$eq(double that) { return asDouble() >= that; }
+
+ public float $plus (float that) { return asFloat () + that; }
+ public float $minus (float that) { return asFloat () - that; }
+ public float $times (float that) { return asFloat () * that; }
+ public float $div (float that) { return asFloat () / that; }
+ public float $percent (float that) { return asFloat () % that; }
+ public boolean $eq$eq (float that) { return asFloat () == that; }
+ public boolean $bang$eq (float that) { return asFloat () != that; }
+ public boolean $less (float that) { return asFloat () < that; }
+ public boolean $greater (float that) { return asFloat () > that; }
+ public boolean $less$eq (float that) { return asFloat () <= that; }
+ public boolean $greater$eq(float that) { return asFloat () >= that; }
-public abstract class Float extends Double {
- /** @meta method []scala.Float;
- */
- public float $plus() { return asFloat(); }
- /** @meta method []scala.Float;
- */
- public float $minus() { return -asFloat(); }
-
- public float $plus(float that) { return asFloat() + that; }
- public float $minus(float that) { return asFloat() - that; }
- public float $times(float that) { return asFloat() * that; }
- public float $div(float that) { return asFloat() / that; }
- public float $percent(float that) { return asFloat() % that; }
-
- public boolean $eq$eq(float that) { return asFloat() == that; }
- public boolean $bang$eq(float that) { return asFloat() != that; }
- public boolean $less(float that) { return asFloat() < that; }
- public boolean $greater(float that) { return asFloat() > that; }
- public boolean $less$eq(float that) { return asFloat() <= that; }
- public boolean $greater$eq(float that) { return asFloat() >= that; }
-
- public double $plus(double that) { return asDouble() + that; }
- public double $minus(double that) { return asDouble() - that; }
- public double $times(double that) { return asDouble() * that; }
- public double $div(double that) { return asDouble() / that; }
- public double $percent(double that) { return asDouble() % that; }
-
- public boolean $eq$eq(double that) { return asDouble() == that; }
- public boolean $bang$eq(double that) { return asDouble() != that; }
- public boolean $less(double that) { return asDouble() < that; }
- public boolean $greater(double that) { return asDouble() > that; }
- public boolean $less$eq(double that) { return asDouble() <= that; }
- public boolean $greater$eq(double that) { return asDouble() >= that; }
-
- public String toString() { return String.valueOf(asFloat()); }
- public String $plus(String that) { return this + that; }
- public int hashCode() { return java.lang.Float.floatToIntBits(asFloat()); }
-
- /** @meta method (scala.Any)scala.Boolean;
- */
- public boolean $eq$eq(java.lang.Object obj) { return equals(obj); }
-
- /** @meta method (scala.Any)scala.Boolean;
- */
- public boolean $bang$eq(java.lang.Object obj) { return !equals(obj); }
}
diff --git a/sources/scala/Int.java b/sources/scala/Int.java
index 7e740f149b..2ee3adaf2c 100644
--- a/sources/scala/Int.java
+++ b/sources/scala/Int.java
@@ -6,99 +6,111 @@
** |/ **
\* */
-// $OldId: Int.java,v 1.16 2002/09/19 10:36:39 paltherr Exp $
// $Id$
package scala;
-public abstract class Int extends Long {
- /** @meta method []scala.Int;
- */
- public int $plus() { return asInt(); }
- /** @meta method []scala.Int;
- */
- public int $minus() { return -asInt(); }
- /** @meta method []scala.Int;
- */
- public int $tilde() { return ~asInt(); }
+public abstract class Int extends AnyVal {
+
+ /** @meta method []scala.Long ; */
+ public long coerce() { return asLong (); }
+ /** @meta method []scala.Float ; */
+ public float coerce() { return asFloat (); }
+ /** @meta method []scala.Double; */
+ public double coerce() { return asDouble(); }
+
+ public abstract double asDouble();
+ public abstract float asFloat();
+ public abstract long asLong();
+ public abstract int asInt();
+ public abstract char asChar();
+ public abstract short asShort();
+ public abstract byte asByte();
+
+ public boolean equals(java.lang.Object other) {
+ return other instanceof Int && $eq$eq(((Int )other).asInt ());
+ }
+ public int hashCode() {
+ int bits = asInt ();
+ return bits;
+ }
+ public String toString() {
+ return String.valueOf(asInt ());
+ }
+
+ /** @meta method (scala.Any)scala.Boolean; */
+ public boolean $eq$eq (java.lang.Object other) { return equals(other); }
+ /** @meta method (scala.Any)scala.Boolean; */
+ public boolean $bang$eq(java.lang.Object other) { return !equals(other); }
+
+ /** @meta method []scala.Int ; */
+ public int $plus () { return +asInt () ; }
+ /** @meta method []scala.Int ; */
+ public int $minus () { return -asInt () ; }
+ /** @meta method []scala.Int ; */
+ public int $tilde () { return ~asInt () ; }
+
+ public String $plus (String that) { return asInt () + that; }
+
+ public double $plus (double that) { return asDouble() + that; }
+ public double $minus (double that) { return asDouble() - that; }
+ public double $times (double that) { return asDouble() * that; }
+ public double $div (double that) { return asDouble() / that; }
+ public double $percent (double that) { return asDouble() % that; }
+ public boolean $eq$eq (double that) { return asDouble() == that; }
+ public boolean $bang$eq (double that) { return asDouble() != that; }
+ public boolean $less (double that) { return asDouble() < that; }
+ public boolean $greater (double that) { return asDouble() > that; }
+ public boolean $less$eq (double that) { return asDouble() <= that; }
+ public boolean $greater$eq(double that) { return asDouble() >= that; }
+
+ public float $plus (float that) { return asFloat () + that; }
+ public float $minus (float that) { return asFloat () - that; }
+ public float $times (float that) { return asFloat () * that; }
+ public float $div (float that) { return asFloat () / that; }
+ public float $percent (float that) { return asFloat () % that; }
+ public boolean $eq$eq (float that) { return asFloat () == that; }
+ public boolean $bang$eq (float that) { return asFloat () != that; }
+ public boolean $less (float that) { return asFloat () < that; }
+ public boolean $greater (float that) { return asFloat () > that; }
+ public boolean $less$eq (float that) { return asFloat () <= that; }
+ public boolean $greater$eq(float that) { return asFloat () >= that; }
+
+ public int $less$less (int that) { return asInt () << that; }
+ public int $less$less (long that) { return asInt () << that; }
+ public int $greater$greater(int that) { return asInt () >> that; }
+ public int $greater$greater(long that) { return asInt () >> that; }
+ public int $greater$greater$greater(int that) { return asInt () >>>that; }
+ public int $greater$greater$greater(long that) { return asInt () >>>that; }
+
+ public long $amp (long that) { return asLong () & that; }
+ public long $bar (long that) { return asLong () | that; }
+ public long $up (long that) { return asLong () ^ that; }
+ public long $plus (long that) { return asLong () + that; }
+ public long $minus (long that) { return asLong () - that; }
+ public long $times (long that) { return asLong () * that; }
+ public long $div (long that) { return asLong () / that; }
+ public long $percent (long that) { return asLong () % that; }
+ public boolean $eq$eq (long that) { return asLong () == that; }
+ public boolean $bang$eq (long that) { return asLong () != that; }
+ public boolean $less (long that) { return asLong () < that; }
+ public boolean $greater (long that) { return asLong () > that; }
+ public boolean $less$eq (long that) { return asLong () <= that; }
+ public boolean $greater$eq(long that) { return asLong () >= that; }
+
+ public int $amp (int that) { return asInt () & that; }
+ public int $bar (int that) { return asInt () | that; }
+ public int $up (int that) { return asInt () ^ that; }
+ public int $plus (int that) { return asInt () + that; }
+ public int $minus (int that) { return asInt () - that; }
+ public int $times (int that) { return asInt () * that; }
+ public int $div (int that) { return asInt () / that; }
+ public int $percent (int that) { return asInt () % that; }
+ public boolean $eq$eq (int that) { return asInt () == that; }
+ public boolean $bang$eq (int that) { return asInt () != that; }
+ public boolean $less (int that) { return asInt () < that; }
+ public boolean $greater (int that) { return asInt () > that; }
+ public boolean $less$eq (int that) { return asInt () <= that; }
+ public boolean $greater$eq(int that) { return asInt () >= that; }
- public int $plus(int that) { return asInt() + that; }
- public int $minus(int that) { return asInt() - that; }
- public int $times(int that) { return asInt() * that; }
- public int $div(int that) { return asInt() / that; }
- public int $percent(int that) { return asInt() % that; }
-
- public int $less$less(int that) { return asInt() << that; }
- public int $greater$greater(int that) { return asInt() >> that; }
- public int $greater$greater$greater(int that) { return asInt() >>> that; }
- public int $amp(int that) { return asInt() & that; }
- public int $bar(int that) { return asInt() | that; }
- public int $up(int that) { return asInt() ^ that; }
-
- public boolean $eq$eq(int that) { return asInt() == that; }
- public boolean $bang$eq(int that) { return asInt() != that; }
- public boolean $less(int that) { return asInt() < that; }
- public boolean $greater(int that) { return asInt() > that; }
- public boolean $less$eq(int that) { return asInt() <= that; }
- public boolean $greater$eq(int that) { return asInt() >= that; }
-
- public long $plus(long that) { return asLong() + that; }
- public long $minus(long that) { return asLong() - that; }
- public long $times(long that) { return asLong() * that; }
- public long $div(long that) { return asLong() / that; }
- public long $percent(long that) { return asLong() % that; }
-
- public long $less$less(long that) { return asLong() << that; }
- public long $greater$greater(long that) { return asLong() >> that; }
- public long $greater$greater$greater(long that) { return asLong() >>> that; }
- public long $amp(long that) { return asLong() & that; }
- public long $bar(long that) { return asLong() | that; }
- public long $up(long that) { return asLong() ^ that; }
-
- public boolean $eq$eq(long that) { return asLong() == that; }
- public boolean $bang$eq(long that) { return asLong() != that; }
- public boolean $less(long that) { return asLong() < that; }
- public boolean $greater(long that) { return asLong() > that; }
- public boolean $less$eq(long that) { return asLong() <= that; }
- public boolean $greater$eq(long that) { return asLong() >= that; }
-
- public float $plus(float that) { return asFloat() + that; }
- public float $minus(float that) { return asFloat() - that; }
- public float $times(float that) { return asFloat() * that; }
- public float $div(float that) { return asFloat() / that; }
- public float $percent(float that) { return asFloat() % that; }
-
- public boolean $eq$eq(float that) { return asFloat() == that; }
- public boolean $bang$eq(float that) { return asFloat() != that; }
- public boolean $less(float that) { return asFloat() < that; }
- public boolean $greater(float that) { return asFloat() > that; }
- public boolean $less$eq(float that) { return asFloat() <= that; }
- public boolean $greater$eq(float that) { return asFloat() >= that; }
-
- public double $plus(double that) { return asDouble() + that; }
- public double $minus(double that) { return asDouble() - that; }
- public double $times(double that) { return asDouble() * that; }
- public double $div(double that) { return asDouble() / that; }
- public double $percent(double that) { return asDouble() % that; }
-
- public boolean $eq$eq(double that) { return asDouble() == that; }
- public boolean $bang$eq(double that) { return asDouble() != that; }
- public boolean $less(double that) { return asDouble() < that; }
- public boolean $greater(double that) { return asDouble() > that; }
- public boolean $less$eq(double that) { return asDouble() <= that; }
- public boolean $greater$eq(double that) { return asDouble() >= that; }
-
- public String $plus(String that) { return this + that; }
-
- public String toString() { return String.valueOf(asInt()); }
-
- public int hashCode() { return asInt(); }
-
- /** @meta method (scala.Any)scala.Boolean;
- */
- public boolean $eq$eq(java.lang.Object obj) { return equals(obj); }
-
- /** @meta method (scala.Any)scala.Boolean;
- */
- public boolean $bang$eq(java.lang.Object obj) { return !equals(obj); }
}
diff --git a/sources/scala/Long.java b/sources/scala/Long.java
index a473bdb2ef..8fb5518b56 100644
--- a/sources/scala/Long.java
+++ b/sources/scala/Long.java
@@ -6,77 +6,96 @@
** |/ **
\* */
-// $OldId: Long.java,v 1.14 2002/09/19 10:36:39 paltherr Exp $
// $Id$
package scala;
-public abstract class Long extends Float {
- /** @meta method []scala.Long;
- */
- public long $plus() { return asLong(); }
- /** @meta method []scala.Long;
- */
- public long $minus() { return -asLong(); }
- /** @meta method []scala.Long;
- */
- public long $tilde() { return ~asLong(); }
-
- public long $plus(long that) { return asLong() + that; }
- public long $minus(long that) { return asLong() - that; }
- public long $times(long that) { return asLong() * that; }
- public long $div(long that) { return asLong() / that; }
- public long $percent(long that) { return asLong() % that; }
-
- public long $less$less(long that) { return asLong() << that; }
- public long $greater$greater(long that) { return asLong() >> that; }
- public long $greater$greater$greater(long that) { return asLong() >>> that; }
- public long $amp(long that) { return asLong() & that; }
- public long $bar(long that) { return asLong() | that; }
- public long $up(long that) { return asLong() ^ that; }
-
- public boolean $eq$eq(long that) { return asLong() == that; }
- public boolean $bang$eq(long that) { return asLong() != that; }
- public boolean $less(long that) { return asLong() < that; }
- public boolean $greater(long that) { return asLong() > that; }
- public boolean $less$eq(long that) { return asLong() <= that; }
- public boolean $greater$eq(long that) { return asLong() >= that; }
-
- public float $plus(float that) { return asFloat() + that; }
- public float $minus(float that) { return asFloat() - that; }
- public float $times(float that) { return asFloat() * that; }
- public float $div(float that) { return asFloat() / that; }
- public float $percent(float that) { return asFloat() % that; }
-
- public boolean $eq$eq(float that) { return asFloat() == that; }
- public boolean $bang$eq(float that) { return asFloat() != that; }
- public boolean $less(float that) { return asFloat() < that; }
- public boolean $greater(float that) { return asFloat() > that; }
- public boolean $less$eq(float that) { return asFloat() <= that; }
- public boolean $greater$eq(float that) { return asFloat() >= that; }
-
- public double $plus(double that) { return asDouble() + that; }
- public double $minus(double that) { return asDouble() - that; }
- public double $times(double that) { return asDouble() * that; }
- public double $div(double that) { return asDouble() / that; }
- public double $percent(double that) { return asDouble() % that; }
-
- public boolean $eq$eq(double that) { return asDouble() == that; }
- public boolean $bang$eq(double that) { return asDouble() != that; }
- public boolean $less(double that) { return asDouble() < that; }
- public boolean $greater(double that) { return asDouble() > that; }
- public boolean $less$eq(double that) { return asDouble() <= that; }
- public boolean $greater$eq(double that) { return asDouble() >= that; }
-
- public String toString() { return String.valueOf(asLong()); }
- public String $plus(String that) { return this + that; }
- public int hashCode() { return (int)(asLong() ^ (asLong() >>> 32)); }
-
- /** @meta method (scala.Any)scala.Boolean;
- */
- public boolean $eq$eq(java.lang.Object obj) { return equals(obj); }
-
- /** @meta method (scala.Any)scala.Boolean;
- */
- public boolean $bang$eq(java.lang.Object obj) { return !equals(obj); }
+public abstract class Long extends AnyVal {
+
+
+
+ /** @meta method []scala.Float ; */
+ public float coerce() { return asFloat (); }
+ /** @meta method []scala.Double; */
+ public double coerce() { return asDouble(); }
+
+ public abstract double asDouble();
+ public abstract float asFloat();
+ public abstract long asLong();
+ public abstract int asInt();
+ public abstract char asChar();
+ public abstract short asShort();
+ public abstract byte asByte();
+
+ public boolean equals(java.lang.Object other) {
+ return other instanceof Long && $eq$eq(((Long )other).asLong ());
+ }
+ public int hashCode() {
+ long bits = asLong();
+ return (int)(bits ^ (bits >>> 32));
+ }
+ public String toString() {
+ return String.valueOf(asLong ());
+ }
+
+ /** @meta method (scala.Any)scala.Boolean; */
+ public boolean $eq$eq (java.lang.Object other) { return equals(other); }
+ /** @meta method (scala.Any)scala.Boolean; */
+ public boolean $bang$eq(java.lang.Object other) { return !equals(other); }
+
+ /** @meta method []scala.Long ; */
+ public long $plus () { return +asLong () ; }
+ /** @meta method []scala.Long ; */
+ public long $minus () { return -asLong () ; }
+ /** @meta method []scala.Long ; */
+ public long $tilde () { return ~asLong () ; }
+
+ public String $plus (String that) { return asLong () + that; }
+
+ public double $plus (double that) { return asDouble() + that; }
+ public double $minus (double that) { return asDouble() - that; }
+ public double $times (double that) { return asDouble() * that; }
+ public double $div (double that) { return asDouble() / that; }
+ public double $percent (double that) { return asDouble() % that; }
+ public boolean $eq$eq (double that) { return asDouble() == that; }
+ public boolean $bang$eq (double that) { return asDouble() != that; }
+ public boolean $less (double that) { return asDouble() < that; }
+ public boolean $greater (double that) { return asDouble() > that; }
+ public boolean $less$eq (double that) { return asDouble() <= that; }
+ public boolean $greater$eq(double that) { return asDouble() >= that; }
+
+ public float $plus (float that) { return asFloat () + that; }
+ public float $minus (float that) { return asFloat () - that; }
+ public float $times (float that) { return asFloat () * that; }
+ public float $div (float that) { return asFloat () / that; }
+ public float $percent (float that) { return asFloat () % that; }
+ public boolean $eq$eq (float that) { return asFloat () == that; }
+ public boolean $bang$eq (float that) { return asFloat () != that; }
+ public boolean $less (float that) { return asFloat () < that; }
+ public boolean $greater (float that) { return asFloat () > that; }
+ public boolean $less$eq (float that) { return asFloat () <= that; }
+ public boolean $greater$eq(float that) { return asFloat () >= that; }
+
+ public long $less$less (int that) { return asLong () << that; }
+ public long $less$less (long that) { return asLong () << that; }
+ public long $greater$greater(int that) { return asLong () >> that; }
+ public long $greater$greater(long that) { return asLong () >> that; }
+ public long $greater$greater$greater(int that) { return asLong () >>>that; }
+ public long $greater$greater$greater(long that) { return asLong () >>>that; }
+
+ public long $amp (long that) { return asLong () & that; }
+ public long $bar (long that) { return asLong () | that; }
+ public long $up (long that) { return asLong () ^ that; }
+ public long $plus (long that) { return asLong () + that; }
+ public long $minus (long that) { return asLong () - that; }
+ public long $times (long that) { return asLong () * that; }
+ public long $div (long that) { return asLong () / that; }
+ public long $percent (long that) { return asLong () % that; }
+ public boolean $eq$eq (long that) { return asLong () == that; }
+ public boolean $bang$eq (long that) { return asLong () != that; }
+ public boolean $less (long that) { return asLong () < that; }
+ public boolean $greater (long that) { return asLong () > that; }
+ public boolean $less$eq (long that) { return asLong () <= that; }
+ public boolean $greater$eq(long that) { return asLong () >= that; }
+
}
diff --git a/sources/scalac/backend/Primitives.java b/sources/scalac/backend/Primitives.java
index 62444b60da..5b02145ec4 100644
--- a/sources/scalac/backend/Primitives.java
+++ b/sources/scalac/backend/Primitives.java
@@ -514,7 +514,7 @@ public class Primitives {
//addAll(defs.INT_CLASS, Names.equals, Primitive.EQUALS, 1);
addAll(defs.INT_CLASS, Names.hashCode, Primitive.HASHCODE, 1);
addAll(defs.INT_CLASS, Names.toString, Primitive.TOSTRING, 1);
- addAll(defs.INT_CLASS, Names.NOT, Primitive.NOT, 2);
+ addAll(defs.INT_CLASS, Names.NOT, Primitive.NOT, 1);
addAdd(defs.INT_CLASS, 4);
addSub(defs.INT_CLASS, 4);
addAll(defs.INT_CLASS, Names.MUL, Primitive.MUL, 4);
@@ -550,9 +550,9 @@ public class Primitives {
addAll(defs.LONG_CLASS, Names.OR, Primitive.OR, 1);
addAll(defs.LONG_CLASS, Names.XOR, Primitive.XOR, 1);
addAll(defs.LONG_CLASS, Names.AND, Primitive.AND, 1);
- addAll(defs.LONG_CLASS, Names.LSL, Primitive.LSL, 1);
- addAll(defs.LONG_CLASS, Names.LSR, Primitive.LSR, 1);
- addAll(defs.LONG_CLASS, Names.ASR, Primitive.ASR, 1);
+ addAll(defs.LONG_CLASS, Names.LSL, Primitive.LSL, 2);
+ addAll(defs.LONG_CLASS, Names.LSR, Primitive.LSR, 2);
+ addAll(defs.LONG_CLASS, Names.ASR, Primitive.ASR, 2);
// scala.Float
addAll(defs.FLOAT_CLASS, Names.EQ, Primitive.EQ, 3);