OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2139 "prototype", map->prototype(), Map::kPrototypeOffset); | 2139 "prototype", map->prototype(), Map::kPrototypeOffset); |
2140 SetInternalReference(map, entry, | 2140 SetInternalReference(map, entry, |
2141 "constructor", map->constructor(), | 2141 "constructor", map->constructor(), |
2142 Map::kConstructorOffset); | 2142 Map::kConstructorOffset); |
2143 if (!map->instance_descriptors()->IsEmpty()) { | 2143 if (!map->instance_descriptors()->IsEmpty()) { |
2144 TagObject(map->instance_descriptors(), "(map descriptors)"); | 2144 TagObject(map->instance_descriptors(), "(map descriptors)"); |
2145 SetInternalReference(map, entry, | 2145 SetInternalReference(map, entry, |
2146 "descriptors", map->instance_descriptors(), | 2146 "descriptors", map->instance_descriptors(), |
2147 Map::kInstanceDescriptorsOrBitField3Offset); | 2147 Map::kInstanceDescriptorsOrBitField3Offset); |
2148 } | 2148 } |
2149 TagObject(map->prototype_transitions(), "(prototype transitions)"); | 2149 if (map->unchecked_prototype_transitions()->IsFixedArray()) { |
2150 SetInternalReference(map, entry, | 2150 TagObject(map->prototype_transitions(), "(prototype transitions)"); |
2151 "prototype_transitions", map->prototype_transitions(), | 2151 SetInternalReference(map, entry, |
2152 Map::kPrototypeTransitionsOffset); | 2152 "prototype_transitions", map->prototype_transitions(), |
| 2153 Map::kPrototypeTransitionsOrBackPointerOffset); |
| 2154 } else { |
| 2155 SetInternalReference(map, entry, |
| 2156 "back_pointer", map->GetBackPointer(), |
| 2157 Map::kPrototypeTransitionsOrBackPointerOffset); |
| 2158 } |
2153 SetInternalReference(map, entry, | 2159 SetInternalReference(map, entry, |
2154 "code_cache", map->code_cache(), | 2160 "code_cache", map->code_cache(), |
2155 Map::kCodeCacheOffset); | 2161 Map::kCodeCacheOffset); |
2156 } | 2162 } |
2157 | 2163 |
2158 | 2164 |
2159 void V8HeapExplorer::ExtractSharedFunctionInfoReferences( | 2165 void V8HeapExplorer::ExtractSharedFunctionInfoReferences( |
2160 HeapEntry* entry, SharedFunctionInfo* shared) { | 2166 HeapEntry* entry, SharedFunctionInfo* shared) { |
2161 HeapObject* obj = shared; | 2167 HeapObject* obj = shared; |
2162 SetInternalReference(obj, entry, | 2168 SetInternalReference(obj, entry, |
(...skipping 1882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4045 | 4051 |
4046 | 4052 |
4047 void HeapSnapshotJSONSerializer::SortHashMap( | 4053 void HeapSnapshotJSONSerializer::SortHashMap( |
4048 HashMap* map, List<HashMap::Entry*>* sorted_entries) { | 4054 HashMap* map, List<HashMap::Entry*>* sorted_entries) { |
4049 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) | 4055 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) |
4050 sorted_entries->Add(p); | 4056 sorted_entries->Add(p); |
4051 sorted_entries->Sort(SortUsingEntryValue); | 4057 sorted_entries->Sort(SortUsingEntryValue); |
4052 } | 4058 } |
4053 | 4059 |
4054 } } // namespace v8::internal | 4060 } } // namespace v8::internal |
OLD | NEW |