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; |