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

Side by Side Diff: src/objects-printer.cc

Issue 7060010: Merge bleeding edge into the GC branch up to 7948. The asserts (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 7 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 | « src/objects-inl.h ('k') | src/objects-visiting.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 case JS_BUILTINS_OBJECT_TYPE: 144 case JS_BUILTINS_OBJECT_TYPE:
145 JSBuiltinsObject::cast(this)->JSBuiltinsObjectPrint(out); 145 JSBuiltinsObject::cast(this)->JSBuiltinsObjectPrint(out);
146 break; 146 break;
147 case JS_VALUE_TYPE: 147 case JS_VALUE_TYPE:
148 PrintF(out, "Value wrapper around:"); 148 PrintF(out, "Value wrapper around:");
149 JSValue::cast(this)->value()->Print(out); 149 JSValue::cast(this)->value()->Print(out);
150 break; 150 break;
151 case CODE_TYPE: 151 case CODE_TYPE:
152 Code::cast(this)->CodePrint(out); 152 Code::cast(this)->CodePrint(out);
153 break; 153 break;
154 case JS_PROXY_TYPE:
155 JSProxy::cast(this)->JSProxyPrint(out);
156 break;
154 case PROXY_TYPE: 157 case PROXY_TYPE:
155 Proxy::cast(this)->ProxyPrint(out); 158 Proxy::cast(this)->ProxyPrint(out);
156 break; 159 break;
157 case SHARED_FUNCTION_INFO_TYPE: 160 case SHARED_FUNCTION_INFO_TYPE:
158 SharedFunctionInfo::cast(this)->SharedFunctionInfoPrint(out); 161 SharedFunctionInfo::cast(this)->SharedFunctionInfoPrint(out);
159 break; 162 break;
160 case JS_MESSAGE_OBJECT_TYPE: 163 case JS_MESSAGE_OBJECT_TYPE:
161 JSMessageObject::cast(this)->JSMessageObjectPrint(out); 164 JSMessageObject::cast(this)->JSMessageObjectPrint(out);
162 break; 165 break;
163 case JS_GLOBAL_PROPERTY_CELL_TYPE: 166 case JS_GLOBAL_PROPERTY_CELL_TYPE:
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 case EXTERNAL_DOUBLE_ARRAY_TYPE: return "EXTERNAL_DOUBLE_ARRAY"; 413 case EXTERNAL_DOUBLE_ARRAY_TYPE: return "EXTERNAL_DOUBLE_ARRAY";
411 case FILLER_TYPE: return "FILLER"; 414 case FILLER_TYPE: return "FILLER";
412 case JS_OBJECT_TYPE: return "JS_OBJECT"; 415 case JS_OBJECT_TYPE: return "JS_OBJECT";
413 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: return "JS_CONTEXT_EXTENSION_OBJECT"; 416 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: return "JS_CONTEXT_EXTENSION_OBJECT";
414 case ODDBALL_TYPE: return "ODDBALL"; 417 case ODDBALL_TYPE: return "ODDBALL";
415 case JS_GLOBAL_PROPERTY_CELL_TYPE: return "JS_GLOBAL_PROPERTY_CELL"; 418 case JS_GLOBAL_PROPERTY_CELL_TYPE: return "JS_GLOBAL_PROPERTY_CELL";
416 case SHARED_FUNCTION_INFO_TYPE: return "SHARED_FUNCTION_INFO"; 419 case SHARED_FUNCTION_INFO_TYPE: return "SHARED_FUNCTION_INFO";
417 case JS_FUNCTION_TYPE: return "JS_FUNCTION"; 420 case JS_FUNCTION_TYPE: return "JS_FUNCTION";
418 case CODE_TYPE: return "CODE"; 421 case CODE_TYPE: return "CODE";
419 case JS_ARRAY_TYPE: return "JS_ARRAY"; 422 case JS_ARRAY_TYPE: return "JS_ARRAY";
423 case JS_PROXY_TYPE: return "JS_PROXY";
420 case JS_REGEXP_TYPE: return "JS_REGEXP"; 424 case JS_REGEXP_TYPE: return "JS_REGEXP";
421 case JS_VALUE_TYPE: return "JS_VALUE"; 425 case JS_VALUE_TYPE: return "JS_VALUE";
422 case JS_GLOBAL_OBJECT_TYPE: return "JS_GLOBAL_OBJECT"; 426 case JS_GLOBAL_OBJECT_TYPE: return "JS_GLOBAL_OBJECT";
423 case JS_BUILTINS_OBJECT_TYPE: return "JS_BUILTINS_OBJECT"; 427 case JS_BUILTINS_OBJECT_TYPE: return "JS_BUILTINS_OBJECT";
424 case JS_GLOBAL_PROXY_TYPE: return "JS_GLOBAL_PROXY"; 428 case JS_GLOBAL_PROXY_TYPE: return "JS_GLOBAL_PROXY";
425 case PROXY_TYPE: return "PROXY"; 429 case PROXY_TYPE: return "PROXY";
426 case LAST_STRING_TYPE: return "LAST_STRING_TYPE";
427 case JS_MESSAGE_OBJECT_TYPE: return "JS_MESSAGE_OBJECT_TYPE"; 430 case JS_MESSAGE_OBJECT_TYPE: return "JS_MESSAGE_OBJECT_TYPE";
428 #define MAKE_STRUCT_CASE(NAME, Name, name) case NAME##_TYPE: return #NAME; 431 #define MAKE_STRUCT_CASE(NAME, Name, name) case NAME##_TYPE: return #NAME;
429 STRUCT_LIST(MAKE_STRUCT_CASE) 432 STRUCT_LIST(MAKE_STRUCT_CASE)
430 #undef MAKE_STRUCT_CASE 433 #undef MAKE_STRUCT_CASE
431 default: return "UNKNOWN"; 434 default: return "UNKNOWN";
432 } 435 }
433 } 436 }
434 437
435 438
436 void Map::MapPrint(FILE* out) { 439 void Map::MapPrint(FILE* out) {
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 PrintF(out, "%c", Get(i)); 536 PrintF(out, "%c", Get(i));
534 } 537 }
535 if (len != length()) { 538 if (len != length()) {
536 PrintF(out, "%s", truncated_epilogue); 539 PrintF(out, "%s", truncated_epilogue);
537 } 540 }
538 541
539 if (!StringShape(this).IsSymbol()) PrintF(out, "\""); 542 if (!StringShape(this).IsSymbol()) PrintF(out, "\"");
540 } 543 }
541 544
542 545
546 void JSProxy::JSProxyPrint(FILE* out) {
547 HeapObject::PrintHeader(out, "JSProxy");
548 PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map()));
549 PrintF(out, " - handler = ");
550 handler()->Print(out);
551 PrintF(out, "\n");
552 }
553
554
543 void JSFunction::JSFunctionPrint(FILE* out) { 555 void JSFunction::JSFunctionPrint(FILE* out) {
544 HeapObject::PrintHeader(out, "Function"); 556 HeapObject::PrintHeader(out, "Function");
545 PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map())); 557 PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map()));
546 PrintF(out, " - initial_map = "); 558 PrintF(out, " - initial_map = ");
547 if (has_initial_map()) { 559 if (has_initial_map()) {
548 initial_map()->ShortPrint(out); 560 initial_map()->ShortPrint(out);
549 } 561 }
550 PrintF(out, "\n - shared_info = "); 562 PrintF(out, "\n - shared_info = ");
551 shared()->ShortPrint(out); 563 shared()->ShortPrint(out);
552 PrintF(out, "\n - name = "); 564 PrintF(out, "\n - name = ");
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 desc.Print(out); 829 desc.Print(out);
818 } 830 }
819 PrintF(out, "\n"); 831 PrintF(out, "\n");
820 } 832 }
821 833
822 834
823 #endif // OBJECT_PRINT 835 #endif // OBJECT_PRINT
824 836
825 837
826 } } // namespace v8::internal 838 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/objects-visiting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698