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

Unified Diff: runtime/lib/double.dart

Issue 1874853002: VM: Remove unnecessary _Num class from runtime/lib. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: addressed comments Created 4 years, 8 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 | « runtime/lib/double.cc ('k') | runtime/lib/integers.dart » ('j') | no next file with comments »
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 87d80464f82ca2444ac990dfd604870c331d6dff..06cd324b6472d0b9f42c7b7560d11803c6971408 100644
--- a/runtime/lib/double.dart
+++ b/runtime/lib/double.dart
@@ -2,7 +2,7 @@
// 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.
-class _Double extends _Num implements double {
+class _Double implements double {
factory _Double.fromInteger(int value)
native "Double_doubleFromInteger";
@@ -140,6 +140,8 @@ class _Double extends _Num implements double {
static final List _cache = new List(CACHE_LENGTH);
static int _cacheEvictIndex = 0;
+ String _toString() native "Double_toString";
+
String toString() {
// TODO(koda): Consider starting at most recently inserted.
for (int i = 0; i < CACHE_LENGTH; i += 2) {
@@ -152,7 +154,7 @@ class _Double extends _Num implements double {
if (identical(0.0, this)) {
return "0.0";
}
- String result = super.toString();
+ String result = _toString();
// Replace the least recently inserted entry.
_cache[_cacheEvictIndex] = this;
_cache[_cacheEvictIndex + 1] = result;
« no previous file with comments | « runtime/lib/double.cc ('k') | runtime/lib/integers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698