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

Unified Diff: src/d8.cc

Issue 21639004: Use first hit when dumping heap constants. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/v8heapconst.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index 9471aa4874dd7e1c5cd2767758b0071f1945d3fa..c7b66c2a1500d8db35a780c1b1801d85df225471 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -1583,9 +1583,9 @@ static void DumpHeapConstants(i::Isolate* isolate) {
// Dump the KNOWN_MAP table to the console.
printf("\n# List of known V8 maps.\n");
#define ROOT_LIST_CASE(type, name, camel_name) \
- if (o == heap->name()) n = #camel_name;
+ if (n == NULL && o == heap->name()) n = #camel_name;
#define STRUCT_LIST_CASE(upper_name, camel_name, name) \
- if (o == heap->name##_map()) n = #camel_name "Map";
+ if (n == NULL && o == heap->name##_map()) n = #camel_name "Map";
i::HeapObjectIterator it(heap->map_space());
printf("KNOWN_MAPS = {\n");
for (i::Object* o = it.Next(); o != NULL; o = it.Next()) {
@@ -1605,7 +1605,7 @@ static void DumpHeapConstants(i::Isolate* isolate) {
// Dump the KNOWN_OBJECTS table to the console.
printf("\n# List of known V8 objects.\n");
#define ROOT_LIST_CASE(type, name, camel_name) \
- if (o == heap->name()) n = #camel_name;
+ if (n == NULL && o == heap->name()) n = #camel_name;
i::OldSpaces spit(heap);
printf("KNOWN_OBJECTS = {\n");
for (i::PagedSpace* s = spit.next(); s != NULL; s = spit.next()) {
« no previous file with comments | « no previous file | tools/v8heapconst.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698