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

Unified Diff: src/heap-snapshot-generator.cc

Issue 950283002: Move Maps' back pointers from "transitions" to "constructor" field (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix stupidity on arm64 Created 5 years, 10 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/factory.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap-snapshot-generator.cc
diff --git a/src/heap-snapshot-generator.cc b/src/heap-snapshot-generator.cc
index 8e185184cea3c6b5a9aca3af727b92cc0fac975a..6fb68702fdc2a28ca2e02a783c1b2b6f3a19b58c 100644
--- a/src/heap-snapshot-generator.cc
+++ b/src/heap-snapshot-generator.cc
@@ -1289,10 +1289,6 @@ void V8HeapExplorer::ExtractMapReferences(int entry, Map* map) {
if (map->HasTransitionArray()) {
TransitionArray* transitions = map->transitions();
int transitions_entry = GetEntry(transitions)->index();
- Object* back_pointer = transitions->back_pointer_storage();
- TagObject(back_pointer, "(back pointer)");
- SetInternalReference(transitions, transitions_entry,
- "back_pointer", back_pointer);
if (FLAG_collect_maps && map->CanTransition()) {
if (!transitions->IsSimpleTransition()) {
@@ -1310,15 +1306,8 @@ void V8HeapExplorer::ExtractMapReferences(int entry, Map* map) {
}
TagObject(transitions, "(transition array)");
- SetInternalReference(map, entry,
- "transitions", transitions,
- Map::kTransitionsOrBackPointerOffset);
- } else {
- Object* back_pointer = map->GetBackPointer();
- TagObject(back_pointer, "(back pointer)");
- SetInternalReference(map, entry,
- "back_pointer", back_pointer,
- Map::kTransitionsOrBackPointerOffset);
+ SetInternalReference(map, entry, "transitions", transitions,
+ Map::kTransitionsOffset);
}
DescriptorArray* descriptors = map->instance_descriptors();
TagObject(descriptors, "(map descriptors)");
@@ -1332,9 +1321,15 @@ void V8HeapExplorer::ExtractMapReferences(int entry, Map* map) {
Map::kCodeCacheOffset);
SetInternalReference(map, entry,
"prototype", map->prototype(), Map::kPrototypeOffset);
- SetInternalReference(map, entry,
- "constructor", map->constructor(),
- Map::kConstructorOffset);
+ Object* constructor_or_backpointer = map->constructor_or_backpointer();
+ if (constructor_or_backpointer->IsMap()) {
+ TagObject(constructor_or_backpointer, "(back pointer)");
+ SetInternalReference(map, entry, "back_pointer", constructor_or_backpointer,
+ Map::kConstructorOrBackPointerOffset);
+ } else {
+ SetInternalReference(map, entry, "constructor", constructor_or_backpointer,
+ Map::kConstructorOrBackPointerOffset);
+ }
TagObject(map->dependent_code(), "(dependent code)");
MarkAsWeakContainer(map->dependent_code());
SetInternalReference(map, entry,
« no previous file with comments | « src/factory.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698