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

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

Issue 1302173007: [es6] Introduce a dedicated JSIteratorResult type. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « src/objects-inl.h ('k') | src/runtime/runtime.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/objects.h" 5 #include "src/objects.h"
6 6
7 #include "src/disasm.h" 7 #include "src/disasm.h"
8 #include "src/disassembler.h" 8 #include "src/disassembler.h"
9 #include "src/interpreter/bytecodes.h" 9 #include "src/interpreter/bytecodes.h"
10 #include "src/objects-inl.h" 10 #include "src/objects-inl.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 break; 137 break;
138 case JS_MAP_TYPE: 138 case JS_MAP_TYPE:
139 JSMap::cast(this)->JSMapPrint(os); 139 JSMap::cast(this)->JSMapPrint(os);
140 break; 140 break;
141 case JS_SET_ITERATOR_TYPE: 141 case JS_SET_ITERATOR_TYPE:
142 JSSetIterator::cast(this)->JSSetIteratorPrint(os); 142 JSSetIterator::cast(this)->JSSetIteratorPrint(os);
143 break; 143 break;
144 case JS_MAP_ITERATOR_TYPE: 144 case JS_MAP_ITERATOR_TYPE:
145 JSMapIterator::cast(this)->JSMapIteratorPrint(os); 145 JSMapIterator::cast(this)->JSMapIteratorPrint(os);
146 break; 146 break;
147 case JS_ITERATOR_RESULT_TYPE:
148 JSIteratorResult::cast(this)->JSIteratorResultPrint(os);
149 break;
147 case JS_WEAK_MAP_TYPE: 150 case JS_WEAK_MAP_TYPE:
148 JSWeakMap::cast(this)->JSWeakMapPrint(os); 151 JSWeakMap::cast(this)->JSWeakMapPrint(os);
149 break; 152 break;
150 case JS_WEAK_SET_TYPE: 153 case JS_WEAK_SET_TYPE:
151 JSWeakSet::cast(this)->JSWeakSetPrint(os); 154 JSWeakSet::cast(this)->JSWeakSetPrint(os);
152 break; 155 break;
153 case FOREIGN_TYPE: 156 case FOREIGN_TYPE:
154 Foreign::cast(this)->ForeignPrint(os); 157 Foreign::cast(this)->ForeignPrint(os);
155 break; 158 break;
156 case SHARED_FUNCTION_INFO_TYPE: 159 case SHARED_FUNCTION_INFO_TYPE:
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 OrderedHashTableIteratorPrint(os); 752 OrderedHashTableIteratorPrint(os);
750 } 753 }
751 754
752 755
753 void JSMapIterator::JSMapIteratorPrint(std::ostream& os) { // NOLINT 756 void JSMapIterator::JSMapIteratorPrint(std::ostream& os) { // NOLINT
754 HeapObject::PrintHeader(os, "JSMapIterator"); 757 HeapObject::PrintHeader(os, "JSMapIterator");
755 OrderedHashTableIteratorPrint(os); 758 OrderedHashTableIteratorPrint(os);
756 } 759 }
757 760
758 761
762 void JSIteratorResult::JSIteratorResultPrint(std::ostream& os) { // NOLINT
763 HeapObject::PrintHeader(os, "JSIteratorResult");
764 os << " - map = " << reinterpret_cast<void*>(map()) << "\n";
765 os << " - done = " << Brief(done()) << "\n";
766 os << " - value = " << Brief(value()) << "\n";
767 os << "\n";
768 }
769
770
759 void JSWeakMap::JSWeakMapPrint(std::ostream& os) { // NOLINT 771 void JSWeakMap::JSWeakMapPrint(std::ostream& os) { // NOLINT
760 HeapObject::PrintHeader(os, "JSWeakMap"); 772 HeapObject::PrintHeader(os, "JSWeakMap");
761 os << " - map = " << reinterpret_cast<void*>(map()) << "\n"; 773 os << " - map = " << reinterpret_cast<void*>(map()) << "\n";
762 os << " - table = " << Brief(table()); 774 os << " - table = " << Brief(table());
763 os << "\n"; 775 os << "\n";
764 } 776 }
765 777
766 778
767 void JSWeakSet::JSWeakSetPrint(std::ostream& os) { // NOLINT 779 void JSWeakSet::JSWeakSetPrint(std::ostream& os) { // NOLINT
768 HeapObject::PrintHeader(os, "JSWeakSet"); 780 HeapObject::PrintHeader(os, "JSWeakSet");
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 } 1287 }
1276 } 1288 }
1277 1289
1278 1290
1279 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT 1291 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT
1280 TransitionArray::PrintTransitions(os, map()->raw_transitions()); 1292 TransitionArray::PrintTransitions(os, map()->raw_transitions());
1281 } 1293 }
1282 #endif // defined(DEBUG) || defined(OBJECT_PRINT) 1294 #endif // defined(DEBUG) || defined(OBJECT_PRINT)
1283 } // namespace internal 1295 } // namespace internal
1284 } // namespace v8 1296 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698