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

Side by Side Diff: src/profile-generator.cc

Issue 10170030: Implement tracking and optimizations of packed arrays (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « src/parser.cc ('k') | src/runtime.h » ('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 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
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 1494 matching lines...) Expand 10 before | Expand all | Expand 10 after
3748 3748
3749 3749
3750 void HeapSnapshotJSONSerializer::SortHashMap( 3750 void HeapSnapshotJSONSerializer::SortHashMap(
3751 HashMap* map, List<HashMap::Entry*>* sorted_entries) { 3751 HashMap* map, List<HashMap::Entry*>* sorted_entries) {
3752 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) 3752 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p))
3753 sorted_entries->Add(p); 3753 sorted_entries->Add(p);
3754 sorted_entries->Sort(SortUsingEntryValue); 3754 sorted_entries->Sort(SortUsingEntryValue);
3755 } 3755 }
3756 3756
3757 } } // namespace v8::internal 3757 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698