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

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

Issue 238063009: ES6: Add support for Map/Set forEach (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove explicit instantiation of private and functions in objects-inl.h Created 6 years, 8 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 break; 167 break;
168 case JS_FUNCTION_PROXY_TYPE: 168 case JS_FUNCTION_PROXY_TYPE:
169 JSFunctionProxy::cast(this)->JSFunctionProxyPrint(out); 169 JSFunctionProxy::cast(this)->JSFunctionProxyPrint(out);
170 break; 170 break;
171 case JS_SET_TYPE: 171 case JS_SET_TYPE:
172 JSSet::cast(this)->JSSetPrint(out); 172 JSSet::cast(this)->JSSetPrint(out);
173 break; 173 break;
174 case JS_MAP_TYPE: 174 case JS_MAP_TYPE:
175 JSMap::cast(this)->JSMapPrint(out); 175 JSMap::cast(this)->JSMapPrint(out);
176 break; 176 break;
177 case JS_SET_ITERATOR_TYPE:
178 JSSetIterator::cast(this)->JSSetIteratorPrint(out);
179 break;
180 case JS_MAP_ITERATOR_TYPE:
181 JSMapIterator::cast(this)->JSMapIteratorPrint(out);
182 break;
177 case JS_WEAK_MAP_TYPE: 183 case JS_WEAK_MAP_TYPE:
178 JSWeakMap::cast(this)->JSWeakMapPrint(out); 184 JSWeakMap::cast(this)->JSWeakMapPrint(out);
179 break; 185 break;
180 case JS_WEAK_SET_TYPE: 186 case JS_WEAK_SET_TYPE:
181 JSWeakSet::cast(this)->JSWeakSetPrint(out); 187 JSWeakSet::cast(this)->JSWeakSetPrint(out);
182 break; 188 break;
183 case FOREIGN_TYPE: 189 case FOREIGN_TYPE:
184 Foreign::cast(this)->ForeignPrint(out); 190 Foreign::cast(this)->ForeignPrint(out);
185 break; 191 break;
186 case SHARED_FUNCTION_INFO_TYPE: 192 case SHARED_FUNCTION_INFO_TYPE:
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 sec()->IsSmi() ? Smi::cast(sec())->value() : -1); 721 sec()->IsSmi() ? Smi::cast(sec())->value() : -1);
716 } 722 }
717 } 723 }
718 724
719 725
720 void JSProxy::JSProxyPrint(FILE* out) { 726 void JSProxy::JSProxyPrint(FILE* out) {
721 HeapObject::PrintHeader(out, "JSProxy"); 727 HeapObject::PrintHeader(out, "JSProxy");
722 PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map())); 728 PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map()));
723 PrintF(out, " - handler = "); 729 PrintF(out, " - handler = ");
724 handler()->Print(out); 730 handler()->Print(out);
725 PrintF(out, " - hash = "); 731 PrintF(out, "\n - hash = ");
726 hash()->Print(out); 732 hash()->Print(out);
727 PrintF(out, "\n"); 733 PrintF(out, "\n");
728 } 734 }
729 735
730 736
731 void JSFunctionProxy::JSFunctionProxyPrint(FILE* out) { 737 void JSFunctionProxy::JSFunctionProxyPrint(FILE* out) {
732 HeapObject::PrintHeader(out, "JSFunctionProxy"); 738 HeapObject::PrintHeader(out, "JSFunctionProxy");
733 PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map())); 739 PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map()));
734 PrintF(out, " - handler = "); 740 PrintF(out, " - handler = ");
735 handler()->Print(out); 741 handler()->Print(out);
736 PrintF(out, " - call_trap = "); 742 PrintF(out, "\n - call_trap = ");
737 call_trap()->Print(out); 743 call_trap()->Print(out);
738 PrintF(out, " - construct_trap = "); 744 PrintF(out, "\n - construct_trap = ");
739 construct_trap()->Print(out); 745 construct_trap()->Print(out);
740 PrintF(out, "\n"); 746 PrintF(out, "\n");
741 } 747 }
742 748
743 749
744 void JSSet::JSSetPrint(FILE* out) { 750 void JSSet::JSSetPrint(FILE* out) {
745 HeapObject::PrintHeader(out, "JSSet"); 751 HeapObject::PrintHeader(out, "JSSet");
746 PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map())); 752 PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map()));
747 PrintF(out, " - table = "); 753 PrintF(out, " - table = ");
748 table()->ShortPrint(out); 754 table()->ShortPrint(out);
749 PrintF(out, "\n"); 755 PrintF(out, "\n");
750 } 756 }
751 757
752 758
753 void JSMap::JSMapPrint(FILE* out) { 759 void JSMap::JSMapPrint(FILE* out) {
754 HeapObject::PrintHeader(out, "JSMap"); 760 HeapObject::PrintHeader(out, "JSMap");
755 PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map())); 761 PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map()));
756 PrintF(out, " - table = "); 762 PrintF(out, " - table = ");
757 table()->ShortPrint(out); 763 table()->ShortPrint(out);
758 PrintF(out, "\n"); 764 PrintF(out, "\n");
759 } 765 }
760 766
761 767
768 template<class Derived, class TableType>
769 void OrderedHashTableIterator<Derived, TableType>::
770 OrderedHashTableIteratorPrint(FILE* out) {
771 PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map()));
772 PrintF(out, " - table = ");
773 table()->ShortPrint(out);
774 PrintF(out, "\n - index = ");
775 index()->ShortPrint(out);
776 PrintF(out, "\n - count = ");
777 count()->ShortPrint(out);
778 PrintF(out, "\n - kind = ");
779 kind()->ShortPrint(out);
780 PrintF(out, "\n - next_iterator = ");
781 next_iterator()->ShortPrint(out);
782 PrintF(out, "\n - previous_iterator = ");
783 previous_iterator()->ShortPrint(out);
784 PrintF(out, "\n");
785 }
786
787
788 template void
789 OrderedHashTableIterator<JSSetIterator,
790 OrderedHashSet>::OrderedHashTableIteratorPrint(FILE* out);
791
792
793 template void
794 OrderedHashTableIterator<JSMapIterator,
795 OrderedHashMap>::OrderedHashTableIteratorPrint(FILE* out);
adamk 2014/04/16 22:48:05 I can't imagine you need these
796
797
798 void JSSetIterator::JSSetIteratorPrint(FILE* out) {
799 HeapObject::PrintHeader(out, "JSSetIterator");
800 OrderedHashTableIteratorPrint(out);
801 }
802
803
804 void JSMapIterator::JSMapIteratorPrint(FILE* out) {
805 HeapObject::PrintHeader(out, "JSMapIterator");
806 OrderedHashTableIteratorPrint(out);
807 }
808
809
762 void JSWeakMap::JSWeakMapPrint(FILE* out) { 810 void JSWeakMap::JSWeakMapPrint(FILE* out) {
763 HeapObject::PrintHeader(out, "JSWeakMap"); 811 HeapObject::PrintHeader(out, "JSWeakMap");
764 PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map())); 812 PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map()));
765 PrintF(out, " - table = "); 813 PrintF(out, " - table = ");
766 table()->ShortPrint(out); 814 table()->ShortPrint(out);
767 PrintF(out, "\n"); 815 PrintF(out, "\n");
768 } 816 }
769 817
770 818
771 void JSWeakSet::JSWeakSetPrint(FILE* out) { 819 void JSWeakSet::JSWeakSetPrint(FILE* out) {
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 } 1275 }
1228 } 1276 }
1229 PrintF(out, "\n"); 1277 PrintF(out, "\n");
1230 } 1278 }
1231 1279
1232 1280
1233 #endif // OBJECT_PRINT 1281 #endif // OBJECT_PRINT
1234 1282
1235 1283
1236 } } // namespace v8::internal 1284 } } // 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