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

Unified Diff: src/profile-generator.cc

Issue 11072014: Reverting sharing of descriptor arrays: (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Bump version Created 8 years, 2 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-inl.h ('k') | src/property.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profile-generator.cc
diff --git a/src/profile-generator.cc b/src/profile-generator.cc
index 64abc7dac896159185dba9864572c7d55accfbd1..c3b7622b09c9089b48876803e4d22dd368634d25 100644
--- a/src/profile-generator.cc
+++ b/src/profile-generator.cc
@@ -2009,33 +2009,20 @@ void V8HeapExplorer::ExtractMapReferences(int entry, Map* map) {
Map::kConstructorOffset);
if (map->HasTransitionArray()) {
TransitionArray* transitions = map->transitions();
- JSGlobalPropertyCell* pointer = transitions->descriptors_pointer();
- DescriptorArray* descriptors = transitions->descriptors();
- TagObject(descriptors, "(map descriptors)");
- SetInternalReference(pointer, entry,
- "descriptors", descriptors,
- JSGlobalPropertyCell::kValueOffset);
- IndexedReferencesExtractor pointer_refs(this, pointer, entry);
- pointer->Iterate(&pointer_refs);
-
- Object* back_pointer = transitions->back_pointer_storage();
- TagObject(transitions->back_pointer_storage(), "(back pointer)");
- SetInternalReference(transitions, entry,
- "backpointer", back_pointer,
- TransitionArray::kBackPointerStorageOffset);
- IndexedReferencesExtractor transitions_refs(this, transitions, entry);
- transitions->Iterate(&transitions_refs);
-
+ if (!transitions->descriptors()->IsEmpty()) {
+ DescriptorArray* descriptors = transitions->descriptors();
+ TagObject(descriptors, "(map descriptors)");
+ SetInternalReference(transitions, entry,
+ "descriptors", descriptors,
+ TransitionArray::kDescriptorsOffset);
+ IndexedReferencesExtractor refs_extractor(
+ this, transitions, entry);
+ transitions->Iterate(&refs_extractor);
+ }
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,
- "backpointer", back_pointer,
- Map::kTransitionsOrBackPointerOffset);
}
SetInternalReference(map, entry,
"code_cache", map->code_cache(),
@@ -2192,9 +2179,7 @@ void V8HeapExplorer::ExtractClosureReferences(JSObject* js_obj, int entry) {
void V8HeapExplorer::ExtractPropertyReferences(JSObject* js_obj, int entry) {
if (js_obj->HasFastProperties()) {
DescriptorArray* descs = js_obj->map()->instance_descriptors();
- int real_size = js_obj->map()->NumberOfOwnDescriptors();
for (int i = 0; i < descs->number_of_descriptors(); i++) {
- if (descs->GetDetails(i).descriptor_index() > real_size) continue;
switch (descs->GetType(i)) {
case FIELD: {
int index = descs->GetFieldIndex(i);
« no previous file with comments | « src/objects-inl.h ('k') | src/property.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698