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

Side by Side Diff: src/heap-snapshot-generator.cc

Issue 19256020: Report initial_map field of JSFunction in heap snapshot. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 981 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 if (!proto_or_map->IsMap()) { 992 if (!proto_or_map->IsMap()) {
993 SetPropertyReference( 993 SetPropertyReference(
994 obj, entry, 994 obj, entry,
995 heap_->prototype_string(), proto_or_map, 995 heap_->prototype_string(), proto_or_map,
996 NULL, 996 NULL,
997 JSFunction::kPrototypeOrInitialMapOffset); 997 JSFunction::kPrototypeOrInitialMapOffset);
998 } else { 998 } else {
999 SetPropertyReference( 999 SetPropertyReference(
1000 obj, entry, 1000 obj, entry,
1001 heap_->prototype_string(), js_fun->prototype()); 1001 heap_->prototype_string(), js_fun->prototype());
1002 SetInternalReference(
1003 obj, entry, "initial_map", proto_or_map,
1004 JSFunction::kPrototypeOrInitialMapOffset);
1002 } 1005 }
1003 } 1006 }
1004 SharedFunctionInfo* shared_info = js_fun->shared(); 1007 SharedFunctionInfo* shared_info = js_fun->shared();
1005 // JSFunction has either bindings or literals and never both. 1008 // JSFunction has either bindings or literals and never both.
1006 bool bound = shared_info->bound(); 1009 bool bound = shared_info->bound();
1007 TagObject(js_fun->literals_or_bindings(), 1010 TagObject(js_fun->literals_or_bindings(),
1008 bound ? "(function bindings)" : "(function literals)"); 1011 bound ? "(function bindings)" : "(function literals)");
1009 SetInternalReference(js_fun, entry, 1012 SetInternalReference(js_fun, entry,
1010 bound ? "bindings" : "literals", 1013 bound ? "bindings" : "literals",
1011 js_fun->literals_or_bindings(), 1014 js_fun->literals_or_bindings(),
(...skipping 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after
2679 2682
2680 2683
2681 void HeapSnapshotJSONSerializer::SortHashMap( 2684 void HeapSnapshotJSONSerializer::SortHashMap(
2682 HashMap* map, List<HashMap::Entry*>* sorted_entries) { 2685 HashMap* map, List<HashMap::Entry*>* sorted_entries) {
2683 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) 2686 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p))
2684 sorted_entries->Add(p); 2687 sorted_entries->Add(p);
2685 sorted_entries->Sort(SortUsingEntryValue); 2688 sorted_entries->Sort(SortUsingEntryValue);
2686 } 2689 }
2687 2690
2688 } } // namespace v8::internal 2691 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698