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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects-inl.h ('k') | src/objects-visiting.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-printer.cc
diff --git a/src/objects-printer.cc b/src/objects-printer.cc
index a59b1e9ae8094a9c171192674ba0c48b27cd9b56..f9483999d73f88dc63c4719a295c9216ad7a2433 100644
--- a/src/objects-printer.cc
+++ b/src/objects-printer.cc
@@ -174,6 +174,12 @@ void HeapObject::HeapObjectPrint(FILE* out) {
case JS_MAP_TYPE:
JSMap::cast(this)->JSMapPrint(out);
break;
+ case JS_SET_ITERATOR_TYPE:
+ JSSetIterator::cast(this)->JSSetIteratorPrint(out);
+ break;
+ case JS_MAP_ITERATOR_TYPE:
+ JSMapIterator::cast(this)->JSMapIteratorPrint(out);
+ break;
case JS_WEAK_MAP_TYPE:
JSWeakMap::cast(this)->JSWeakMapPrint(out);
break;
@@ -722,7 +728,7 @@ void JSProxy::JSProxyPrint(FILE* out) {
PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map()));
PrintF(out, " - handler = ");
handler()->Print(out);
- PrintF(out, " - hash = ");
+ PrintF(out, "\n - hash = ");
hash()->Print(out);
PrintF(out, "\n");
}
@@ -733,9 +739,9 @@ void JSFunctionProxy::JSFunctionProxyPrint(FILE* out) {
PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map()));
PrintF(out, " - handler = ");
handler()->Print(out);
- PrintF(out, " - call_trap = ");
+ PrintF(out, "\n - call_trap = ");
call_trap()->Print(out);
- PrintF(out, " - construct_trap = ");
+ PrintF(out, "\n - construct_trap = ");
construct_trap()->Print(out);
PrintF(out, "\n");
}
@@ -759,6 +765,48 @@ void JSMap::JSMapPrint(FILE* out) {
}
+template<class Derived, class TableType>
+void OrderedHashTableIterator<Derived, TableType>::
+ OrderedHashTableIteratorPrint(FILE* out) {
+ PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map()));
+ PrintF(out, " - table = ");
+ table()->ShortPrint(out);
+ PrintF(out, "\n - index = ");
+ index()->ShortPrint(out);
+ PrintF(out, "\n - count = ");
+ count()->ShortPrint(out);
+ PrintF(out, "\n - kind = ");
+ kind()->ShortPrint(out);
+ PrintF(out, "\n - next_iterator = ");
+ next_iterator()->ShortPrint(out);
+ PrintF(out, "\n - previous_iterator = ");
+ previous_iterator()->ShortPrint(out);
+ PrintF(out, "\n");
+}
+
+
+template void
+OrderedHashTableIterator<JSSetIterator,
+ OrderedHashSet>::OrderedHashTableIteratorPrint(FILE* out);
+
+
+template void
+OrderedHashTableIterator<JSMapIterator,
+ OrderedHashMap>::OrderedHashTableIteratorPrint(FILE* out);
adamk 2014/04/16 22:48:05 I can't imagine you need these
+
+
+void JSSetIterator::JSSetIteratorPrint(FILE* out) {
+ HeapObject::PrintHeader(out, "JSSetIterator");
+ OrderedHashTableIteratorPrint(out);
+}
+
+
+void JSMapIterator::JSMapIteratorPrint(FILE* out) {
+ HeapObject::PrintHeader(out, "JSMapIterator");
+ OrderedHashTableIteratorPrint(out);
+}
+
+
void JSWeakMap::JSWeakMapPrint(FILE* out) {
HeapObject::PrintHeader(out, "JSWeakMap");
PrintF(out, " - map = %p\n", reinterpret_cast<void*>(map()));
« 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