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

Unified Diff: src/heap.cc

Issue 132003002: Remove globale pretenuring mode from runtime. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 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 | « src/heap.h ('k') | src/runtime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index de912884a807df1afba7d27427829fce84d8d81b..6db1459825368155f802f585ef5dc9f4661a5fe3 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -3562,8 +3562,7 @@ void Heap::SetNumberStringCache(Object* number, String* string) {
MaybeObject* Heap::NumberToString(Object* number,
- bool check_number_string_cache,
- PretenureFlag pretenure) {
+ bool check_number_string_cache) {
isolate_->counters()->number_to_string_runtime()->Increment();
if (check_number_string_cache) {
Object* cached = GetNumberStringCache(number);
@@ -3584,8 +3583,11 @@ MaybeObject* Heap::NumberToString(Object* number,
}
Object* js_string;
+
+ // We tenure the allocated string since it is referenced from the
+ // number-string cache which lives in the old space.
MaybeObject* maybe_js_string =
- AllocateStringFromOneByte(CStrVector(str), pretenure);
+ AllocateStringFromOneByte(CStrVector(str), TENURED);
if (maybe_js_string->ToObject(&js_string)) {
SetNumberStringCache(number, String::cast(js_string));
}
« no previous file with comments | « src/heap.h ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698