Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(740)

Unified Diff: runtime/lib/double.dart

Issue 11019011: Cleaning up in VM number hierarchy which was exposing a bunch (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove formatting changes Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/lib/integers.dart » ('j') | runtime/vm/intrinsifier_ia32.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/double.dart
diff --git a/runtime/lib/double.dart b/runtime/lib/double.dart
index 9ea44a74b689911f88dbb921fcbefbb5445b3fcd..4878d0096597abdf08a5df701356019cc1e3b298 100644
--- a/runtime/lib/double.dart
+++ b/runtime/lib/double.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -13,40 +13,39 @@ class _Double implements double {
}
}
double operator +(num other) {
- return add_(other.toDouble());
+ return _add(other.toDouble());
}
- double add_(double other) native "Double_add";
+ double _add(double other) native "Double_add";
double operator -(num other) {
- return sub_(other.toDouble());
+ return _sub(other.toDouble());
}
- double sub_(double other) native "Double_sub";
+ double _sub(double other) native "Double_sub";
double operator *(num other) {
- return mul_(other.toDouble());
+ return _mul(other.toDouble());
}
- double mul_(double other) native "Double_mul";
+ double _mul(double other) native "Double_mul";
double operator ~/(num other) {
- return trunc_div_(other.toDouble());
+ return _trunc_div(other.toDouble());
}
- double trunc_div_(double other) native "Double_trunc_div";
+ double _trunc_div(double other) native "Double_trunc_div";
double operator /(num other) {
- return div_(other.toDouble());
+ return _div(other.toDouble());
}
- double div_(double other) native "Double_div";
+ double _div(double other) native "Double_div";
double operator %(num other) {
- return modulo_(other.toDouble());
+ return _modulo(other.toDouble());
}
- double modulo_(double other) native "Double_modulo";
+ double _modulo(double other) native "Double_modulo";
double remainder(num other) {
- return remainder_(other.toDouble());
+ return _remainder(other.toDouble());
}
- double remainder_(double other) native "Double_remainder";
-
+ double _remainder(double other) native "Double_remainder";
double operator -() {
if (this == 0.0) {
// -0.0 is canonicalized by the VM's parser, therefore no cycles.
@@ -56,43 +55,43 @@ class _Double implements double {
}
bool operator ==(other) {
if (!(other is num)) return false;
- return equal_(other.toDouble());
+ return _equal(other.toDouble());
}
- bool equal_(double other)native "Double_equal";
- bool equalToInteger(int other) native "Double_equalToInteger";
+ bool _equal(double other)native "Double_equal";
+ bool _equalToInteger(int other) native "Double_equalToInteger";
bool operator <(num other) {
return other > this;
}
bool operator >(num other) {
- return greaterThan_(other.toDouble());
+ return _greaterThan(other.toDouble());
}
- bool greaterThan_(double other) native "Double_greaterThan";
+ bool _greaterThan(double other) native "Double_greaterThan";
bool operator >=(num other) {
return (this == other) || (this > other);
}
bool operator <=(num other) {
return (this == other) || (this < other);
}
- double addFromInteger(int other) {
+ double _addFromInteger(int other) {
return new _Double.fromInteger(other) + this;
}
- double subFromInteger(int other) {
+ double _subFromInteger(int other) {
return new _Double.fromInteger(other) - this;
}
- double mulFromInteger(int other) {
+ double _mulFromInteger(int other) {
return new _Double.fromInteger(other) * this;
}
- double truncDivFromInteger(int other) {
+ double _truncDivFromInteger(int other) {
return new _Double.fromInteger(other) ~/ this;
}
- double moduloFromInteger(int other) {
+ double _moduloFromInteger(int other) {
return new _Double.fromInteger(other) % this;
}
- double remainderFromInteger(int other) {
+ double _remainderFromInteger(int other) {
return new _Double.fromInteger(other).remainder(this);
}
-
- bool greaterThanFromInteger(int other) native "Double_greaterThanFromInteger";
+ bool _greaterThanFromInteger(int other)
+ native "Double_greaterThanFromInteger";
bool isNegative() native "Double_isNegative";
bool isInfinite() native "Double_isInfinite";
« no previous file with comments | « no previous file | runtime/lib/integers.dart » ('j') | runtime/vm/intrinsifier_ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698