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

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

Issue 11188031: Move DescriptorArray into the map (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: remove padding area Created 8 years, 2 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/objects-visiting-inl.h ('k') | src/spaces.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 1991 matching lines...) Expand 10 before | Expand all | Expand 10 after
2002 2002
2003 2003
2004 void V8HeapExplorer::ExtractMapReferences(int entry, Map* map) { 2004 void V8HeapExplorer::ExtractMapReferences(int entry, Map* map) {
2005 SetInternalReference(map, entry, 2005 SetInternalReference(map, entry,
2006 "prototype", map->prototype(), Map::kPrototypeOffset); 2006 "prototype", map->prototype(), Map::kPrototypeOffset);
2007 SetInternalReference(map, entry, 2007 SetInternalReference(map, entry,
2008 "constructor", map->constructor(), 2008 "constructor", map->constructor(),
2009 Map::kConstructorOffset); 2009 Map::kConstructorOffset);
2010 if (map->HasTransitionArray()) { 2010 if (map->HasTransitionArray()) {
2011 TransitionArray* transitions = map->transitions(); 2011 TransitionArray* transitions = map->transitions();
2012 DescriptorArray* descriptors = transitions->descriptors();
2013 TagObject(descriptors, "(map descriptors)");
2014 SetInternalReference(transitions, entry,
2015 "descriptors", descriptors,
2016 TransitionArray::kDescriptorsOffset);
2017 2012
2018 Object* back_pointer = transitions->back_pointer_storage(); 2013 Object* back_pointer = transitions->back_pointer_storage();
2019 TagObject(transitions->back_pointer_storage(), "(back pointer)"); 2014 TagObject(transitions->back_pointer_storage(), "(back pointer)");
2020 SetInternalReference(transitions, entry, 2015 SetInternalReference(transitions, entry,
2021 "backpointer", back_pointer, 2016 "backpointer", back_pointer,
2022 TransitionArray::kBackPointerStorageOffset); 2017 TransitionArray::kBackPointerStorageOffset);
2023 IndexedReferencesExtractor transitions_refs(this, transitions, entry); 2018 IndexedReferencesExtractor transitions_refs(this, transitions, entry);
2024 transitions->Iterate(&transitions_refs); 2019 transitions->Iterate(&transitions_refs);
2025 2020
2026 TagObject(transitions, "(transition array)"); 2021 TagObject(transitions, "(transition array)");
2027 SetInternalReference(map, entry, 2022 SetInternalReference(map, entry,
2028 "transitions", transitions, 2023 "transitions", transitions,
2029 Map::kTransitionsOrBackPointerOffset); 2024 Map::kTransitionsOrBackPointerOffset);
2030 } else { 2025 } else {
2031 Object* back_pointer = map->GetBackPointer(); 2026 Object* back_pointer = map->GetBackPointer();
2032 TagObject(back_pointer, "(back pointer)"); 2027 TagObject(back_pointer, "(back pointer)");
2033 SetInternalReference(map, entry, 2028 SetInternalReference(map, entry,
2034 "backpointer", back_pointer, 2029 "backpointer", back_pointer,
2035 Map::kTransitionsOrBackPointerOffset); 2030 Map::kTransitionsOrBackPointerOffset);
2036 } 2031 }
2032 DescriptorArray* descriptors = map->instance_descriptors();
2033 TagObject(descriptors, "(map descriptors)");
2034 SetInternalReference(map, entry,
2035 "descriptors", descriptors,
2036 Map::kDescriptorsOffset);
2037
2037 SetInternalReference(map, entry, 2038 SetInternalReference(map, entry,
2038 "code_cache", map->code_cache(), 2039 "code_cache", map->code_cache(),
2039 Map::kCodeCacheOffset); 2040 Map::kCodeCacheOffset);
2040 } 2041 }
2041 2042
2042 2043
2043 void V8HeapExplorer::ExtractSharedFunctionInfoReferences( 2044 void V8HeapExplorer::ExtractSharedFunctionInfoReferences(
2044 int entry, SharedFunctionInfo* shared) { 2045 int entry, SharedFunctionInfo* shared) {
2045 HeapObject* obj = shared; 2046 HeapObject* obj = shared;
2046 SetInternalReference(obj, entry, 2047 SetInternalReference(obj, entry,
(...skipping 1531 matching lines...) Expand 10 before | Expand all | Expand 10 after
3578 3579
3579 3580
3580 void HeapSnapshotJSONSerializer::SortHashMap( 3581 void HeapSnapshotJSONSerializer::SortHashMap(
3581 HashMap* map, List<HashMap::Entry*>* sorted_entries) { 3582 HashMap* map, List<HashMap::Entry*>* sorted_entries) {
3582 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) 3583 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p))
3583 sorted_entries->Add(p); 3584 sorted_entries->Add(p);
3584 sorted_entries->Sort(SortUsingEntryValue); 3585 sorted_entries->Sort(SortUsingEntryValue);
3585 } 3586 }
3586 3587
3587 } } // namespace v8::internal 3588 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-visiting-inl.h ('k') | src/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698