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

Unified Diff: runtime/lib/double.cc

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/core_sources.gypi ('k') | runtime/lib/double.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/double.cc
diff --git a/runtime/lib/double.cc b/runtime/lib/double.cc
index dbeb44705b81d380aa62b8bcd9b55b976e3ca04e..2706269ad72e79bdb4f278f8f29c88640848e5fa 100644
--- a/runtime/lib/double.cc
+++ b/runtime/lib/double.cc
@@ -230,6 +230,14 @@ DEFINE_NATIVE_ENTRY(Double_parse, 3) {
}
+DEFINE_NATIVE_ENTRY(Double_toString, 1) {
+ const Number& number = Number::CheckedHandle(arguments->NativeArgAt(0));
+ Heap::Space space = isolate->heap()->ShouldPretenure(kOneByteStringCid) ?
+ Heap::kPretenured : Heap::kNew;
+ return number.ToString(space);
+}
+
+
DEFINE_NATIVE_ENTRY(Double_toStringAsFixed, 2) {
// The boundaries are exclusive.
static const double kLowerBoundary = -1e21;
« no previous file with comments | « runtime/lib/core_sources.gypi ('k') | runtime/lib/double.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698