Use first hit when dumping heap constants.
authormstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 5 Aug 2013 16:47:45 +0000 (16:47 +0000)
committermstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 5 Aug 2013 16:47:45 +0000 (16:47 +0000)
This makes sure that the first hit is used when dumping heap constants
and hence "TheHoleValue" is not overwritten with other roots that are
initialized to the hole as well.

R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/21639004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16058 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/d8.cc
tools/v8heapconst.py

index 9471aa4874dd7e1c5cd2767758b0071f1945d3fa..c7b66c2a1500d8db35a780c1b1801d85df225471 100644 (file)
--- 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()) {
index 8012211b860f929df2ce7c66640d5ba2207867c5..591bf99ca9b1e752afe95aca7c77b304d0dfb93a 100644 (file)
@@ -208,7 +208,7 @@ KNOWN_MAPS = {
 KNOWN_OBJECTS = {
   ("OLD_POINTER_SPACE", 0x08081): "NullValue",
   ("OLD_POINTER_SPACE", 0x08091): "UndefinedValue",
-  ("OLD_POINTER_SPACE", 0x080a1): "InstanceofCacheMap",
+  ("OLD_POINTER_SPACE", 0x080a1): "TheHoleValue",
   ("OLD_POINTER_SPACE", 0x080b1): "TrueValue",
   ("OLD_POINTER_SPACE", 0x080c1): "FalseValue",
   ("OLD_POINTER_SPACE", 0x080d1): "UninitializedValue",
@@ -231,7 +231,7 @@ KNOWN_OBJECTS = {
   ("OLD_POINTER_SPACE", 0x0e0a1): "ElementsTransitionSymbol",
   ("OLD_POINTER_SPACE", 0x0e0ad): "EmptySlowElementDictionary",
   ("OLD_POINTER_SPACE", 0x0e249): "ObservedSymbol",
-  ("OLD_POINTER_SPACE", 0x27631): "StringTable",
+  ("OLD_POINTER_SPACE", 0x27585): "StringTable",
   ("OLD_DATA_SPACE", 0x08099): "EmptyDescriptorArray",
   ("OLD_DATA_SPACE", 0x080a1): "EmptyFixedArray",
   ("OLD_DATA_SPACE", 0x080a9): "NanValue",
@@ -247,6 +247,6 @@ KNOWN_OBJECTS = {
   ("OLD_DATA_SPACE", 0x082c9): "EmptyExternalPixelArray",
   ("OLD_DATA_SPACE", 0x082d5): "InfinityValue",
   ("OLD_DATA_SPACE", 0x082e1): "MinusZeroValue",
-  ("CODE_SPACE", 0x0e801): "JsConstructEntryCode",
-  ("CODE_SPACE", 0x176e1): "JsEntryCode",
+  ("CODE_SPACE", 0x0eb41): "JsConstructEntryCode",
+  ("CODE_SPACE", 0x177a1): "JsEntryCode",
 }