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

Unified Diff: src/d8.cc

Issue 22715004: Version 3.20.15 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Add TypedArray API and correctness patches r16033 and r16084 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 | « src/d8.h ('k') | src/debug.cc » ('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 c7b66c2a1500d8db35a780c1b1801d85df225471..6e7beebf549a84c70d53a13119498c8c9dca825e 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -1406,14 +1406,6 @@ bool Shell::SetOptions(int argc, char* argv[]) {
#else
options.num_parallel_files++;
#endif // V8_SHARED
- } else if (strcmp(argv[i], "--dump-heap-constants") == 0) {
-#ifdef V8_SHARED
- printf("D8 with shared library does not support constant dumping\n");
- return false;
-#else
- options.dump_heap_constants = true;
- argv[i] = NULL;
-#endif
}
#ifdef V8_SHARED
else if (strcmp(argv[i], "--dump-counters") == 0) {
@@ -1568,63 +1560,6 @@ static void SetStandaloneFlagsViaCommandLine() {
#endif
-#ifndef V8_SHARED
-static void DumpHeapConstants(i::Isolate* isolate) {
- i::Heap* heap = isolate->heap();
-
- // Dump the INSTANCE_TYPES table to the console.
- printf("# List of known V8 instance types.\n");
-#define DUMP_TYPE(T) printf(" %d: \"%s\",\n", i::T, #T);
- printf("INSTANCE_TYPES = {\n");
- INSTANCE_TYPE_LIST(DUMP_TYPE)
- printf("}\n");
-#undef DUMP_TYPE
-
- // 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 (n == NULL && o == heap->name()) n = #camel_name;
-#define STRUCT_LIST_CASE(upper_name, camel_name, name) \
- 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()) {
- i::Map* m = i::Map::cast(o);
- const char* n = NULL;
- intptr_t p = reinterpret_cast<intptr_t>(m) & 0xfffff;
- int t = m->instance_type();
- ROOT_LIST(ROOT_LIST_CASE)
- STRUCT_LIST(STRUCT_LIST_CASE)
- if (n == NULL) continue;
- printf(" 0x%05" V8PRIxPTR ": (%d, \"%s\"),\n", p, t, n);
- }
- printf("}\n");
-#undef STRUCT_LIST_CASE
-#undef ROOT_LIST_CASE
-
- // 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 (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()) {
- i::HeapObjectIterator it(s);
- const char* sname = AllocationSpaceName(s->identity());
- for (i::Object* o = it.Next(); o != NULL; o = it.Next()) {
- const char* n = NULL;
- intptr_t p = reinterpret_cast<intptr_t>(o) & 0xfffff;
- ROOT_LIST(ROOT_LIST_CASE)
- if (n == NULL) continue;
- printf(" (\"%s\", 0x%05" V8PRIxPTR "): \"%s\",\n", sname, p, n);
- }
- }
- printf("}\n");
-#undef ROOT_LIST_CASE
-}
-#endif // V8_SHARED
-
-
class ShellArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
public:
virtual void* Allocate(size_t length) {
@@ -1668,13 +1603,6 @@ int Shell::Main(int argc, char* argv[]) {
PerIsolateData data(isolate);
InitializeDebugger(isolate);
-#ifndef V8_SHARED
- if (options.dump_heap_constants) {
- DumpHeapConstants(reinterpret_cast<i::Isolate*>(isolate));
- return 0;
- }
-#endif
-
if (options.stress_opt || options.stress_deopt) {
Testing::SetStressRunType(options.stress_opt
? Testing::kStressTypeOpt
« no previous file with comments | « src/d8.h ('k') | src/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698