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

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

Issue 238973011: Revert "ES6: Add support for Map/Set forEach" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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;
183 case JS_WEAK_MAP_TYPE: 177 case JS_WEAK_MAP_TYPE:
184 JSWeakMap::cast(this)->JSWeakMapPrint(out); 178 JSWeakMap::cast(this)->JSWeakMapPrint(out);
185 break; 179 break;
186 case JS_WEAK_SET_TYPE: 180 case JS_WEAK_SET_TYPE:
187 JSWeakSet::cast(this)->JSWeakSetPrint(out); 181 JSWeakSet::cast(this)->JSWeakSetPrint(out);
188 break; 182 break;
189 case FOREIGN_TYPE: 183 case FOREIGN_TYPE:
190 Foreign::cast(this)->ForeignPrint(out); 184 Foreign::cast(this)->ForeignPrint(out);
191 break; 185 break;
192 case SHARED_FUNCTION_INFO_TYPE: 186 case SHARED_FUNCTION_INFO_TYPE:
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 sec()->IsSmi() ? Smi::cast(sec())->value() : -1); 715 sec()->IsSmi() ? Smi::cast(sec())->value() : -1);
722 } 716 }
723 } 717 }
724 718
725 719
726 void JSProxy::JSProxyPrint(FILE* out) { 720 void JSProxy::JSProxyPrint(FILE* out) {
727 HeapObject::PrintHeader(out, "JSProxy"); 721 HeapObject::PrintHeader(out, "JSProxy");
728 PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map())); 722 PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map()));
729 PrintF(out, " - handler = "); 723 PrintF(out, " - handler = ");
730 handler()->Print(out); 724 handler()->Print(out);
731 PrintF(out, "\n - hash = "); 725 PrintF(out, " - hash = ");
732 hash()->Print(out); 726 hash()->Print(out);
733 PrintF(out, "\n"); 727 PrintF(out, "\n");
734 } 728 }
735 729
736 730
737 void JSFunctionProxy::JSFunctionProxyPrint(FILE* out) { 731 void JSFunctionProxy::JSFunctionProxyPrint(FILE* out) {
738 HeapObject::PrintHeader(out, "JSFunctionProxy"); 732 HeapObject::PrintHeader(out, "JSFunctionProxy");
739 PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map())); 733 PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map()));
740 PrintF(out, " - handler = "); 734 PrintF(out, " - handler = ");
741 handler()->Print(out); 735 handler()->Print(out);
742 PrintF(out, "\n - call_trap = "); 736 PrintF(out, " - call_trap = ");
743 call_trap()->Print(out); 737 call_trap()->Print(out);
744 PrintF(out, "\n - construct_trap = "); 738 PrintF(out, " - construct_trap = ");
745 construct_trap()->Print(out); 739 construct_trap()->Print(out);
746 PrintF(out, "\n"); 740 PrintF(out, "\n");
747 } 741 }
748 742
749 743
750 void JSSet::JSSetPrint(FILE* out) { 744 void JSSet::JSSetPrint(FILE* out) {
751 HeapObject::PrintHeader(out, "JSSet"); 745 HeapObject::PrintHeader(out, "JSSet");
752 PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map())); 746 PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map()));
753 PrintF(out, " - table = "); 747 PrintF(out, " - table = ");
754 table()->ShortPrint(out); 748 table()->ShortPrint(out);
755 PrintF(out, "\n"); 749 PrintF(out, "\n");
756 } 750 }
757 751
758 752
759 void JSMap::JSMapPrint(FILE* out) { 753 void JSMap::JSMapPrint(FILE* out) {
760 HeapObject::PrintHeader(out, "JSMap"); 754 HeapObject::PrintHeader(out, "JSMap");
761 PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map())); 755 PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map()));
762 PrintF(out, " - table = "); 756 PrintF(out, " - table = ");
763 table()->ShortPrint(out); 757 table()->ShortPrint(out);
764 PrintF(out, "\n"); 758 PrintF(out, "\n");
765 } 759 }
766 760
767 761
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 void JSSetIterator::JSSetIteratorPrint(FILE* out) {
789 HeapObject::PrintHeader(out, "JSSetIterator");
790 OrderedHashTableIteratorPrint(out);
791 }
792
793
794 void JSMapIterator::JSMapIteratorPrint(FILE* out) {
795 HeapObject::PrintHeader(out, "JSMapIterator");
796 OrderedHashTableIteratorPrint(out);
797 }
798
799
800 void JSWeakMap::JSWeakMapPrint(FILE* out) { 762 void JSWeakMap::JSWeakMapPrint(FILE* out) {
801 HeapObject::PrintHeader(out, "JSWeakMap"); 763 HeapObject::PrintHeader(out, "JSWeakMap");
802 PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map())); 764 PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map()));
803 PrintF(out, " - table = "); 765 PrintF(out, " - table = ");
804 table()->ShortPrint(out); 766 table()->ShortPrint(out);
805 PrintF(out, "\n"); 767 PrintF(out, "\n");
806 } 768 }
807 769
808 770
809 void JSWeakSet::JSWeakSetPrint(FILE* out) { 771 void JSWeakSet::JSWeakSetPrint(FILE* out) {
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
1265 } 1227 }
1266 } 1228 }
1267 PrintF(out, "\n"); 1229 PrintF(out, "\n");
1268 } 1230 }
1269 1231
1270 1232
1271 #endif // OBJECT_PRINT 1233 #endif // OBJECT_PRINT
1272 1234
1273 1235
1274 } } // namespace v8::internal 1236 } } // 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