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

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

Issue 7529007: Preliminary Harmony weak maps API implementation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Make sure the constructor can be called directly. Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects-inl.h ('k') | src/objects-visiting.cc » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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_VALUE_TYPE: 144 case JS_VALUE_TYPE:
145 PrintF(out, "Value wrapper around:"); 145 PrintF(out, "Value wrapper around:");
146 JSValue::cast(this)->value()->Print(out); 146 JSValue::cast(this)->value()->Print(out);
147 break; 147 break;
148 case CODE_TYPE: 148 case CODE_TYPE:
149 Code::cast(this)->CodePrint(out); 149 Code::cast(this)->CodePrint(out);
150 break; 150 break;
151 case JS_PROXY_TYPE: 151 case JS_PROXY_TYPE:
152 JSProxy::cast(this)->JSProxyPrint(out); 152 JSProxy::cast(this)->JSProxyPrint(out);
153 break; 153 break;
154 case JS_WEAK_MAP_TYPE:
155 JSWeakMap::cast(this)->JSWeakMapPrint(out);
156 break;
154 case FOREIGN_TYPE: 157 case FOREIGN_TYPE:
155 Foreign::cast(this)->ForeignPrint(out); 158 Foreign::cast(this)->ForeignPrint(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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 case FILLER_TYPE: return "FILLER"; 427 case FILLER_TYPE: return "FILLER";
425 case JS_OBJECT_TYPE: return "JS_OBJECT"; 428 case JS_OBJECT_TYPE: return "JS_OBJECT";
426 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: return "JS_CONTEXT_EXTENSION_OBJECT"; 429 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: return "JS_CONTEXT_EXTENSION_OBJECT";
427 case ODDBALL_TYPE: return "ODDBALL"; 430 case ODDBALL_TYPE: return "ODDBALL";
428 case JS_GLOBAL_PROPERTY_CELL_TYPE: return "JS_GLOBAL_PROPERTY_CELL"; 431 case JS_GLOBAL_PROPERTY_CELL_TYPE: return "JS_GLOBAL_PROPERTY_CELL";
429 case SHARED_FUNCTION_INFO_TYPE: return "SHARED_FUNCTION_INFO"; 432 case SHARED_FUNCTION_INFO_TYPE: return "SHARED_FUNCTION_INFO";
430 case JS_FUNCTION_TYPE: return "JS_FUNCTION"; 433 case JS_FUNCTION_TYPE: return "JS_FUNCTION";
431 case CODE_TYPE: return "CODE"; 434 case CODE_TYPE: return "CODE";
432 case JS_ARRAY_TYPE: return "JS_ARRAY"; 435 case JS_ARRAY_TYPE: return "JS_ARRAY";
433 case JS_PROXY_TYPE: return "JS_PROXY"; 436 case JS_PROXY_TYPE: return "JS_PROXY";
437 case JS_WEAK_MAP_TYPE: return "JS_WEAK_MAP";
434 case JS_REGEXP_TYPE: return "JS_REGEXP"; 438 case JS_REGEXP_TYPE: return "JS_REGEXP";
435 case JS_VALUE_TYPE: return "JS_VALUE"; 439 case JS_VALUE_TYPE: return "JS_VALUE";
436 case JS_GLOBAL_OBJECT_TYPE: return "JS_GLOBAL_OBJECT"; 440 case JS_GLOBAL_OBJECT_TYPE: return "JS_GLOBAL_OBJECT";
437 case JS_BUILTINS_OBJECT_TYPE: return "JS_BUILTINS_OBJECT"; 441 case JS_BUILTINS_OBJECT_TYPE: return "JS_BUILTINS_OBJECT";
438 case JS_GLOBAL_PROXY_TYPE: return "JS_GLOBAL_PROXY"; 442 case JS_GLOBAL_PROXY_TYPE: return "JS_GLOBAL_PROXY";
439 case FOREIGN_TYPE: return "FOREIGN"; 443 case FOREIGN_TYPE: return "FOREIGN";
440 case JS_MESSAGE_OBJECT_TYPE: return "JS_MESSAGE_OBJECT_TYPE"; 444 case JS_MESSAGE_OBJECT_TYPE: return "JS_MESSAGE_OBJECT_TYPE";
441 #define MAKE_STRUCT_CASE(NAME, Name, name) case NAME##_TYPE: return #NAME; 445 #define MAKE_STRUCT_CASE(NAME, Name, name) case NAME##_TYPE: return #NAME;
442 STRUCT_LIST(MAKE_STRUCT_CASE) 446 STRUCT_LIST(MAKE_STRUCT_CASE)
443 #undef MAKE_STRUCT_CASE 447 #undef MAKE_STRUCT_CASE
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 566
563 void JSProxy::JSProxyPrint(FILE* out) { 567 void JSProxy::JSProxyPrint(FILE* out) {
564 HeapObject::PrintHeader(out, "JSProxy"); 568 HeapObject::PrintHeader(out, "JSProxy");
565 PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map())); 569 PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map()));
566 PrintF(out, " - handler = "); 570 PrintF(out, " - handler = ");
567 handler()->Print(out); 571 handler()->Print(out);
568 PrintF(out, "\n"); 572 PrintF(out, "\n");
569 } 573 }
570 574
571 575
576 void JSWeakMap::JSWeakMapPrint(FILE* out) {
577 HeapObject::PrintHeader(out, "JSWeakMap");
578 PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map()));
579 PrintF(out, " - number of elements = %d\n", table()->NumberOfElements());
580 PrintF(out, " - table = ");
581 table()->ShortPrint(out);
582 PrintF(out, "\n");
583 }
584
585
572 void JSFunction::JSFunctionPrint(FILE* out) { 586 void JSFunction::JSFunctionPrint(FILE* out) {
573 HeapObject::PrintHeader(out, "Function"); 587 HeapObject::PrintHeader(out, "Function");
574 PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map())); 588 PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map()));
575 PrintF(out, " - initial_map = "); 589 PrintF(out, " - initial_map = ");
576 if (has_initial_map()) { 590 if (has_initial_map()) {
577 initial_map()->ShortPrint(out); 591 initial_map()->ShortPrint(out);
578 } 592 }
579 PrintF(out, "\n - shared_info = "); 593 PrintF(out, "\n - shared_info = ");
580 shared()->ShortPrint(out); 594 shared()->ShortPrint(out);
581 PrintF(out, "\n - name = "); 595 PrintF(out, "\n - name = ");
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 desc.Print(out); 860 desc.Print(out);
847 } 861 }
848 PrintF(out, "\n"); 862 PrintF(out, "\n");
849 } 863 }
850 864
851 865
852 #endif // OBJECT_PRINT 866 #endif // OBJECT_PRINT
853 867
854 868
855 } } // namespace v8::internal 869 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/objects-visiting.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698