| 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 2222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2233 TagObject(value, "(hidden properties)"); | 2233 TagObject(value, "(hidden properties)"); |
| 2234 SetInternalReference(js_obj, entry, "hidden_properties", value); | 2234 SetInternalReference(js_obj, entry, "hidden_properties", value); |
| 2235 } | 2235 } |
| 2236 } | 2236 } |
| 2237 } | 2237 } |
| 2238 } | 2238 } |
| 2239 } | 2239 } |
| 2240 | 2240 |
| 2241 | 2241 |
| 2242 void V8HeapExplorer::ExtractElementReferences(JSObject* js_obj, int entry) { | 2242 void V8HeapExplorer::ExtractElementReferences(JSObject* js_obj, int entry) { |
| 2243 if (js_obj->HasFastElements()) { | 2243 if (js_obj->HasFastObjectElements()) { |
| 2244 FixedArray* elements = FixedArray::cast(js_obj->elements()); | 2244 FixedArray* elements = FixedArray::cast(js_obj->elements()); |
| 2245 int length = js_obj->IsJSArray() ? | 2245 int length = js_obj->IsJSArray() ? |
| 2246 Smi::cast(JSArray::cast(js_obj)->length())->value() : | 2246 Smi::cast(JSArray::cast(js_obj)->length())->value() : |
| 2247 elements->length(); | 2247 elements->length(); |
| 2248 for (int i = 0; i < length; ++i) { | 2248 for (int i = 0; i < length; ++i) { |
| 2249 if (!elements->get(i)->IsTheHole()) { | 2249 if (!elements->get(i)->IsTheHole()) { |
| 2250 SetElementReference(js_obj, entry, i, elements->get(i)); | 2250 SetElementReference(js_obj, entry, i, elements->get(i)); |
| 2251 } | 2251 } |
| 2252 } | 2252 } |
| 2253 } else if (js_obj->HasDictionaryElements()) { | 2253 } else if (js_obj->HasDictionaryElements()) { |
| (...skipping 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3755 | 3755 |
| 3756 | 3756 |
| 3757 void HeapSnapshotJSONSerializer::SortHashMap( | 3757 void HeapSnapshotJSONSerializer::SortHashMap( |
| 3758 HashMap* map, List<HashMap::Entry*>* sorted_entries) { | 3758 HashMap* map, List<HashMap::Entry*>* sorted_entries) { |
| 3759 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) | 3759 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) |
| 3760 sorted_entries->Add(p); | 3760 sorted_entries->Add(p); |
| 3761 sorted_entries->Sort(SortUsingEntryValue); | 3761 sorted_entries->Sort(SortUsingEntryValue); |
| 3762 } | 3762 } |
| 3763 | 3763 |
| 3764 } } // namespace v8::internal | 3764 } } // namespace v8::internal |
| OLD | NEW |