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

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

Issue 1033653002: Move prototype metadata from internal properties to prototype maps (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: small fixes Created 5 years, 9 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.h » ('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 929064489bc2115bc0bdaf009cb0cde42b290a46..a97e4cf328961354b2c7c68b401024cc395c321e 100644
--- a/src/heap-snapshot-generator.cc
+++ b/src/heap-snapshot-generator.cc
@@ -1282,9 +1282,11 @@ void V8HeapExplorer::ExtractContextReferences(int entry, Context* context) {
void V8HeapExplorer::ExtractMapReferences(int entry, Map* map) {
- Object* raw_transitions = map->raw_transitions();
- if (TransitionArray::IsFullTransitionArray(raw_transitions)) {
- TransitionArray* transitions = TransitionArray::cast(raw_transitions);
+ Object* raw_transitions_or_prototype_info = map->raw_transitions();
+ if (TransitionArray::IsFullTransitionArray(
+ raw_transitions_or_prototype_info)) {
+ TransitionArray* transitions =
+ TransitionArray::cast(raw_transitions_or_prototype_info);
int transitions_entry = GetEntry(transitions)->index();
if (FLAG_collect_maps && map->CanTransition()) {
@@ -1302,11 +1304,18 @@ void V8HeapExplorer::ExtractMapReferences(int entry, Map* map) {
TagObject(transitions, "(transition array)");
SetInternalReference(map, entry, "transitions", transitions,
- Map::kTransitionsOffset);
- } else if (TransitionArray::IsSimpleTransition(raw_transitions)) {
- TagObject(raw_transitions, "(transition)");
- SetInternalReference(map, entry, "transition", raw_transitions,
- Map::kTransitionsOffset);
+ Map::kTransitionsOrPrototypeInfoOffset);
+ } else if (TransitionArray::IsSimpleTransition(
+ raw_transitions_or_prototype_info)) {
+ TagObject(raw_transitions_or_prototype_info, "(transition)");
+ SetInternalReference(map, entry, "transition",
+ raw_transitions_or_prototype_info,
+ Map::kTransitionsOrPrototypeInfoOffset);
+ } else if (map->is_prototype_map()) {
+ TagObject(raw_transitions_or_prototype_info, "prototype_info");
+ SetInternalReference(map, entry, "prototype_info",
+ raw_transitions_or_prototype_info,
+ Map::kTransitionsOrPrototypeInfoOffset);
}
DescriptorArray* descriptors = map->instance_descriptors();
TagObject(descriptors, "(map descriptors)");
« no previous file with comments | « src/factory.cc ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698