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

Unified Diff: runtime/lib/num.cc

Issue 511963007: Pretenure some strings into bump-allocated block (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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/vm/freelist.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/num.cc
===================================================================
--- runtime/lib/num.cc (revision 39687)
+++ runtime/lib/num.cc (working copy)
@@ -11,7 +11,9 @@
DEFINE_NATIVE_ENTRY(Num_toString, 1) {
const Number& number = Number::CheckedHandle(arguments->NativeArgAt(0));
- return number.ToString(Heap::kNew);
+ Heap::Space space = isolate->heap()->ShouldPretenure(kOneByteStringCid) ?
+ Heap::kPretenured : Heap::kNew;
+ return number.ToString(space);
}
} // namespace dart
« no previous file with comments | « no previous file | runtime/vm/freelist.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698