| Index: runtime/lib/integers.dart
|
| diff --git a/runtime/lib/integers.dart b/runtime/lib/integers.dart
|
| index 0c5b11985bad5dd6648392883097aec8ee5f26cc..f524a7df3982e9e66ce4cdcaf27ca5ad3e965cb6 100644
|
| --- a/runtime/lib/integers.dart
|
| +++ b/runtime/lib/integers.dart
|
| @@ -92,13 +92,16 @@ abstract class _IntegerImplementation {
|
| return other._greaterThanFromInteger(this);
|
| }
|
| bool operator >=(num other) {
|
| - return (this == other) || (this > other);
|
| + return (this == other) || (this > other);
|
| }
|
| bool operator <=(num other) {
|
| return (this == other) || (this < other);
|
| }
|
| bool _greaterThanFromInteger(int other)
|
| native "Integer_greaterThanFromInteger";
|
| + bool _greaterThanFromPixels(pixels other) {
|
| + return other._value > (this << _Pixels._SCALING_BITS);
|
| + }
|
| bool operator ==(other) {
|
| if (other is num) {
|
| return other._equalToInteger(this);
|
| @@ -106,6 +109,9 @@ abstract class _IntegerImplementation {
|
| return false;
|
| }
|
| bool _equalToInteger(int other) native "Integer_equalToInteger";
|
| + bool _equalToPixels(pixels other) {
|
| + return (this << _Pixels._SCALING_BITS) == other._value;
|
| + }
|
| int abs() {
|
| return this < 0 ? -this : this;
|
| }
|
| @@ -200,8 +206,10 @@ abstract class _IntegerImplementation {
|
|
|
| int toInt() { return this; }
|
| double toDouble() { return new _Double.fromInteger(this); }
|
| + pixels toPixels() { return new _Pixels.fromInteger(this); }
|
| _Bigint _toBigint() { return new _Bigint._fromInt(this); }
|
| - num _toBigintOrDouble() { return _toBigint(); }
|
| + num _toBigintIfInteger() { return _toBigint(); }
|
| + num _toDoubleOrPixels() { return new _Pixels.fromInteger(this); }
|
|
|
| String toStringAsFixed(int fractionDigits) {
|
| return this.toDouble().toStringAsFixed(fractionDigits);
|
|
|