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 2189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2200 TagObject(value, "(hidden properties)"); | 2200 TagObject(value, "(hidden properties)"); |
2201 SetInternalReference(js_obj, entry, "hidden_properties", value); | 2201 SetInternalReference(js_obj, entry, "hidden_properties", value); |
2202 } | 2202 } |
2203 } | 2203 } |
2204 } | 2204 } |
2205 } | 2205 } |
2206 } | 2206 } |
2207 | 2207 |
2208 | 2208 |
2209 void V8HeapExplorer::ExtractElementReferences(JSObject* js_obj, int entry) { | 2209 void V8HeapExplorer::ExtractElementReferences(JSObject* js_obj, int entry) { |
2210 if (js_obj->HasFastObjectElements()) { | 2210 if (js_obj->HasFastElements()) { |
2211 FixedArray* elements = FixedArray::cast(js_obj->elements()); | 2211 FixedArray* elements = FixedArray::cast(js_obj->elements()); |
2212 int length = js_obj->IsJSArray() ? | 2212 int length = js_obj->IsJSArray() ? |
2213 Smi::cast(JSArray::cast(js_obj)->length())->value() : | 2213 Smi::cast(JSArray::cast(js_obj)->length())->value() : |
2214 elements->length(); | 2214 elements->length(); |
2215 for (int i = 0; i < length; ++i) { | 2215 for (int i = 0; i < length; ++i) { |
2216 if (!elements->get(i)->IsTheHole()) { | 2216 if (!elements->get(i)->IsTheHole()) { |
2217 SetElementReference(js_obj, entry, i, elements->get(i)); | 2217 SetElementReference(js_obj, entry, i, elements->get(i)); |
2218 } | 2218 } |
2219 } | 2219 } |
2220 } else if (js_obj->HasDictionaryElements()) { | 2220 } else if (js_obj->HasDictionaryElements()) { |
(...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3523 | 3523 |
3524 | 3524 |
3525 void HeapSnapshotJSONSerializer::SortHashMap( | 3525 void HeapSnapshotJSONSerializer::SortHashMap( |
3526 HashMap* map, List<HashMap::Entry*>* sorted_entries) { | 3526 HashMap* map, List<HashMap::Entry*>* sorted_entries) { |
3527 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) | 3527 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) |
3528 sorted_entries->Add(p); | 3528 sorted_entries->Add(p); |
3529 sorted_entries->Sort(SortUsingEntryValue); | 3529 sorted_entries->Sort(SortUsingEntryValue); |
3530 } | 3530 } |
3531 | 3531 |
3532 } } // namespace v8::internal | 3532 } } // namespace v8::internal |
OLD | NEW |