diff options
author | Michaël Zasso <targos@protonmail.com> | 2018-12-04 08:20:37 +0100 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2018-12-06 15:23:33 +0100 |
commit | 9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3 (patch) | |
tree | 2b0c843168dafb939d8df8a15b2aa72b76dee51d /deps/v8/test/mkgrokdump | |
parent | b8fbe69db1292307adb2c2b2e0d5ef48c4ab2faf (diff) | |
download | android-node-v8-9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3.tar.gz android-node-v8-9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3.tar.bz2 android-node-v8-9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3.zip |
deps: update V8 to 7.1.302.28
PR-URL: https://github.com/nodejs/node/pull/23423
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'deps/v8/test/mkgrokdump')
-rw-r--r-- | deps/v8/test/mkgrokdump/mkgrokdump.cc | 54 |
1 files changed, 23 insertions, 31 deletions
diff --git a/deps/v8/test/mkgrokdump/mkgrokdump.cc b/deps/v8/test/mkgrokdump/mkgrokdump.cc index 713e952378..387d064974 100644 --- a/deps/v8/test/mkgrokdump/mkgrokdump.cc +++ b/deps/v8/test/mkgrokdump/mkgrokdump.cc @@ -41,36 +41,28 @@ class MockArrayBufferAllocator : public v8::ArrayBuffer::Allocator { void Free(void* p, size_t) override {} }; -#define RO_ROOT_LIST_CASE(type, name, camel_name) \ - if (n == NULL && o == roots.name()) n = #camel_name; -#define ROOT_LIST_CASE(type, name, camel_name) \ - if (n == NULL && o == space->heap()->name()) n = #camel_name; -#define STRUCT_LIST_CASE(upper_name, camel_name, name) \ - if (n == NULL && o == roots.name##_map()) n = #camel_name "Map"; -#define ALLOCATION_SITE_LIST_CASE(upper_name, camel_name, size, name) \ - if (n == NULL && o == roots.name##_map()) n = #camel_name "Map"; +#define RO_ROOT_LIST_CASE(type, name, CamelName) \ + if (n == NULL && o == roots.name()) n = #CamelName; +#define MUTABLE_ROOT_LIST_CASE(type, name, CamelName) \ + if (n == NULL && o == space->heap()->name()) n = #CamelName; static void DumpMaps(i::PagedSpace* space) { i::HeapObjectIterator it(space); i::ReadOnlyRoots roots(space->heap()); - for (i::Object* o = it.Next(); o != NULL; o = it.Next()) { + for (i::Object* o = it.Next(); o != nullptr; o = it.Next()) { if (!o->IsMap()) continue; i::Map* m = i::Map::cast(o); - const char* n = NULL; + const char* n = nullptr; intptr_t p = reinterpret_cast<intptr_t>(m) & 0x7FFFF; int t = m->instance_type(); - STRONG_READ_ONLY_ROOT_LIST(RO_ROOT_LIST_CASE) - MUTABLE_ROOT_LIST(ROOT_LIST_CASE) - STRUCT_LIST(STRUCT_LIST_CASE) - ALLOCATION_SITE_LIST(ALLOCATION_SITE_LIST_CASE) - if (n == NULL) continue; + READ_ONLY_ROOT_LIST(RO_ROOT_LIST_CASE) + MUTABLE_ROOT_LIST(MUTABLE_ROOT_LIST_CASE) + if (n == nullptr) continue; const char* sname = space->name(); i::PrintF(" (\"%s\", 0x%05" V8PRIxPTR "): (%d, \"%s\"),\n", sname, p, t, n); } } -#undef ALLOCATION_SITE_LIST_CASE -#undef STRUCT_LIST_CASE -#undef ROOT_LIST_CASE +#undef MUTABLE_ROOT_LIST_CASE #undef RO_ROOT_LIST_CASE static int DumpHeapConstants(const char* argv0) { @@ -103,33 +95,33 @@ static int DumpHeapConstants(const char* argv0) { // Dump the KNOWN_OBJECTS table to the console. i::PrintF("\n# List of known V8 objects.\n"); -#define RO_ROOT_LIST_CASE(type, name, camel_name) \ - if (n == NULL && o == roots.name()) { \ - n = #camel_name; \ - i = i::Heap::k##camel_name##RootIndex; \ +#define RO_ROOT_LIST_CASE(type, name, CamelName) \ + if (n == NULL && o == roots.name()) { \ + n = #CamelName; \ + i = i::RootIndex::k##CamelName; \ } -#define ROOT_LIST_CASE(type, name, camel_name) \ - if (n == NULL && o == heap->name()) { \ - n = #camel_name; \ - i = i::Heap::k##camel_name##RootIndex; \ +#define ROOT_LIST_CASE(type, name, CamelName) \ + if (n == NULL && o == heap->name()) { \ + n = #CamelName; \ + i = i::RootIndex::k##CamelName; \ } i::PagedSpaces spit(heap, i::PagedSpaces::SpacesSpecifier::kAllPagedSpaces); i::PrintF("KNOWN_OBJECTS = {\n"); - for (i::PagedSpace* s = spit.next(); s != NULL; s = spit.next()) { + for (i::PagedSpace* s = spit.next(); s != nullptr; s = spit.next()) { i::HeapObjectIterator it(s); // Code objects are generally platform-dependent. if (s->identity() == i::CODE_SPACE || s->identity() == i::MAP_SPACE) continue; const char* sname = s->name(); - for (i::Object* o = it.Next(); o != NULL; o = it.Next()) { + for (i::Object* o = it.Next(); o != nullptr; o = it.Next()) { // Skip maps in RO_SPACE since they will be reported elsewhere. if (o->IsMap()) continue; - const char* n = NULL; - i::Heap::RootListIndex i = i::Heap::kStrongRootListLength; + const char* n = nullptr; + i::RootIndex i = i::RootIndex::kFirstSmiRoot; intptr_t p = reinterpret_cast<intptr_t>(o) & 0x7FFFF; STRONG_READ_ONLY_ROOT_LIST(RO_ROOT_LIST_CASE) MUTABLE_ROOT_LIST(ROOT_LIST_CASE) - if (n == NULL) continue; + if (n == nullptr) continue; if (!i::Heap::RootIsImmortalImmovable(i)) continue; i::PrintF(" (\"%s\", 0x%05" V8PRIxPTR "): \"%s\",\n", sname, p, n); } |