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

Side by Side Diff: src/heap-snapshot-generator.cc

Issue 1156993018: GlobalDictionary now stores PropertyDetails in PropertyCells. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 5 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 unified diff | Download patch
« no previous file with comments | « src/bootstrapper.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/heap-snapshot-generator-inl.h" 7 #include "src/heap-snapshot-generator-inl.h"
8 8
9 #include "src/allocation-tracker.h" 9 #include "src/allocation-tracker.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1637 matching lines...) Expand 10 before | Expand all | Expand 10 after
1648 break; 1648 break;
1649 } 1649 }
1650 } 1650 }
1651 } else if (js_obj->IsGlobalObject()) { 1651 } else if (js_obj->IsGlobalObject()) {
1652 // We assume that global objects can only have slow properties. 1652 // We assume that global objects can only have slow properties.
1653 GlobalDictionary* dictionary = js_obj->global_dictionary(); 1653 GlobalDictionary* dictionary = js_obj->global_dictionary();
1654 int length = dictionary->Capacity(); 1654 int length = dictionary->Capacity();
1655 for (int i = 0; i < length; ++i) { 1655 for (int i = 0; i < length; ++i) {
1656 Object* k = dictionary->KeyAt(i); 1656 Object* k = dictionary->KeyAt(i);
1657 if (dictionary->IsKey(k)) { 1657 if (dictionary->IsKey(k)) {
1658 Object* target = dictionary->ValueAt(i); 1658 DCHECK(dictionary->ValueAt(i)->IsPropertyCell());
1659 DCHECK(target->IsPropertyCell()); 1659 PropertyCell* cell = PropertyCell::cast(dictionary->ValueAt(i));
1660 Object* value = PropertyCell::cast(target)->value(); 1660 Object* value = cell->value();
1661 if (k == heap_->hidden_string()) { 1661 if (k == heap_->hidden_string()) {
1662 TagObject(value, "(hidden properties)"); 1662 TagObject(value, "(hidden properties)");
1663 SetInternalReference(js_obj, entry, "hidden_properties", value); 1663 SetInternalReference(js_obj, entry, "hidden_properties", value);
1664 continue; 1664 continue;
1665 } 1665 }
1666 PropertyDetails details = dictionary->DetailsAt(i); 1666 PropertyDetails details = cell->property_details();
1667 SetDataOrAccessorPropertyReference(details.kind(), js_obj, entry, 1667 SetDataOrAccessorPropertyReference(details.kind(), js_obj, entry,
1668 Name::cast(k), value); 1668 Name::cast(k), value);
1669 } 1669 }
1670 } 1670 }
1671 } else { 1671 } else {
1672 NameDictionary* dictionary = js_obj->property_dictionary(); 1672 NameDictionary* dictionary = js_obj->property_dictionary();
1673 int length = dictionary->Capacity(); 1673 int length = dictionary->Capacity();
1674 for (int i = 0; i < length; ++i) { 1674 for (int i = 0; i < length; ++i) {
1675 Object* k = dictionary->KeyAt(i); 1675 Object* k = dictionary->KeyAt(i);
1676 if (dictionary->IsKey(k)) { 1676 if (dictionary->IsKey(k)) {
(...skipping 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after
3176 writer_->AddString("\"<dummy>\""); 3176 writer_->AddString("\"<dummy>\"");
3177 for (int i = 1; i < sorted_strings.length(); ++i) { 3177 for (int i = 1; i < sorted_strings.length(); ++i) {
3178 writer_->AddCharacter(','); 3178 writer_->AddCharacter(',');
3179 SerializeString(sorted_strings[i]); 3179 SerializeString(sorted_strings[i]);
3180 if (writer_->aborted()) return; 3180 if (writer_->aborted()) return;
3181 } 3181 }
3182 } 3182 }
3183 3183
3184 3184
3185 } } // namespace v8::internal 3185 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698