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

Unified Diff: src/objects.cc

Issue 356393003: [Arm]: Enable use of extended out-of-line constant pool for Arm. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Formatted with git cl format Created 6 years, 6 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/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 41a7771005e9621f4d0fe457058587527cba0951..2672aac74528c43cd99c021899e93755c3be1e70 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -9710,15 +9710,23 @@ bool Map::EquivalentToForNormalization(Map* other,
void ConstantPoolArray::ConstantPoolIterateBody(ObjectVisitor* v) {
- ConstantPoolArray::Iterator code_iter(this, ConstantPoolArray::CODE_PTR);
- while (!code_iter.is_finished()) {
- v->VisitCodeEntry(reinterpret_cast<Address>(
- RawFieldOfElementAt(code_iter.next_index())));
- }
-
- ConstantPoolArray::Iterator heap_iter(this, ConstantPoolArray::HEAP_PTR);
- while (!heap_iter.is_finished()) {
- v->VisitPointer(RawFieldOfElementAt(heap_iter.next_index()));
+ // Unfortunately the serializer relies on pointers within an object being
+ // visited in-order, so we have to iterate both the code and heap pointers in
+ // the small section before doing so in the extended section.
+ for (int s = 0; s <= final_section(); ++s) {
+ LayoutSection section = static_cast<LayoutSection>(s);
+ ConstantPoolArray::Iterator code_iter(this, ConstantPoolArray::CODE_PTR,
+ section);
+ while (!code_iter.is_finished()) {
+ v->VisitCodeEntry(reinterpret_cast<Address>(
+ RawFieldOfElementAt(code_iter.next_index())));
+ }
+
+ ConstantPoolArray::Iterator heap_iter(this, ConstantPoolArray::HEAP_PTR,
+ section);
+ while (!heap_iter.is_finished()) {
+ v->VisitPointer(RawFieldOfElementAt(heap_iter.next_index()));
+ }
}
}
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698