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

Unified Diff: src/heap.cc

Issue 10996018: Allow partial scanning of large arrays in order to avoid (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 3 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 | src/incremental-marking.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
===================================================================
--- src/heap.cc (revision 12609)
+++ src/heap.cc (working copy)
@@ -1359,11 +1359,12 @@
if (external_string_table_.new_space_strings_.is_empty()) return;
- Object** start = &external_string_table_.new_space_strings_[0];
- Object** end = start + external_string_table_.new_space_strings_.length();
- Object** last = start;
+ Object** start_slot = &external_string_table_.new_space_strings_[0];
+ Object** end_slot =
+ start_slot + external_string_table_.new_space_strings_.length();
+ Object** last = start_slot;
- for (Object** p = start; p < end; ++p) {
+ for (Object** p = start_slot; p < end_slot; ++p) {
ASSERT(InFromSpace(*p));
String* target = updater_func(this, p);
@@ -1381,8 +1382,8 @@
}
}
- ASSERT(last <= end);
- external_string_table_.ShrinkNewStrings(static_cast<int>(last - start));
+ ASSERT(last <= end_slot);
+ external_string_table_.ShrinkNewStrings(static_cast<int>(last - start_slot));
}
@@ -1391,9 +1392,10 @@
// Update old space string references.
if (external_string_table_.old_space_strings_.length() > 0) {
- Object** start = &external_string_table_.old_space_strings_[0];
- Object** end = start + external_string_table_.old_space_strings_.length();
- for (Object** p = start; p < end; ++p) *p = updater_func(this, p);
+ Object** start_slot = &external_string_table_.old_space_strings_[0];
+ Object** end_slot =
+ start_slot + external_string_table_.old_space_strings_.length();
+ for (Object** p = start_slot; p < end_slot; ++p) *p = updater_func(this, p);
}
UpdateNewSpaceReferencesInExternalStringTable(updater_func);
@@ -6789,11 +6791,11 @@
// Scan the object body.
if (is_native_context && (visit_mode_ == VISIT_ONLY_STRONG)) {
// This is specialized to scan Context's properly.
- Object** start = reinterpret_cast<Object**>(obj->address() +
- Context::kHeaderSize);
- Object** end = reinterpret_cast<Object**>(obj->address() +
+ Object** start_slot = reinterpret_cast<Object**>(obj->address() +
+ Context::kHeaderSize);
+ Object** end_slot = reinterpret_cast<Object**>(obj->address() +
Context::kHeaderSize + Context::FIRST_WEAK_SLOT * kPointerSize);
- mark_visitor->VisitPointers(start, end);
+ mark_visitor->VisitPointers(start_slot, end_slot);
} else {
obj->IterateBody(map_p->instance_type(),
obj->SizeFromMap(map_p),
« no previous file with comments | « no previous file | src/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698