OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |