| OLD | NEW |
| 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 break; | 139 break; |
| 140 case JS_MAP_TYPE: | 140 case JS_MAP_TYPE: |
| 141 JSMap::cast(this)->JSMapPrint(os); | 141 JSMap::cast(this)->JSMapPrint(os); |
| 142 break; | 142 break; |
| 143 case JS_SET_ITERATOR_TYPE: | 143 case JS_SET_ITERATOR_TYPE: |
| 144 JSSetIterator::cast(this)->JSSetIteratorPrint(os); | 144 JSSetIterator::cast(this)->JSSetIteratorPrint(os); |
| 145 break; | 145 break; |
| 146 case JS_MAP_ITERATOR_TYPE: | 146 case JS_MAP_ITERATOR_TYPE: |
| 147 JSMapIterator::cast(this)->JSMapIteratorPrint(os); | 147 JSMapIterator::cast(this)->JSMapIteratorPrint(os); |
| 148 break; | 148 break; |
| 149 case JS_ITERATOR_RESULT_TYPE: | |
| 150 JSIteratorResult::cast(this)->JSIteratorResultPrint(os); | |
| 151 break; | |
| 152 case JS_WEAK_MAP_TYPE: | 149 case JS_WEAK_MAP_TYPE: |
| 153 JSWeakMap::cast(this)->JSWeakMapPrint(os); | 150 JSWeakMap::cast(this)->JSWeakMapPrint(os); |
| 154 break; | 151 break; |
| 155 case JS_WEAK_SET_TYPE: | 152 case JS_WEAK_SET_TYPE: |
| 156 JSWeakSet::cast(this)->JSWeakSetPrint(os); | 153 JSWeakSet::cast(this)->JSWeakSetPrint(os); |
| 157 break; | 154 break; |
| 158 case FOREIGN_TYPE: | 155 case FOREIGN_TYPE: |
| 159 Foreign::cast(this)->ForeignPrint(os); | 156 Foreign::cast(this)->ForeignPrint(os); |
| 160 break; | 157 break; |
| 161 case SHARED_FUNCTION_INFO_TYPE: | 158 case SHARED_FUNCTION_INFO_TYPE: |
| (...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 793 OrderedHashTableIteratorPrint(os); | 790 OrderedHashTableIteratorPrint(os); |
| 794 } | 791 } |
| 795 | 792 |
| 796 | 793 |
| 797 void JSMapIterator::JSMapIteratorPrint(std::ostream& os) { // NOLINT | 794 void JSMapIterator::JSMapIteratorPrint(std::ostream& os) { // NOLINT |
| 798 JSObjectPrintHeader(os, this, "JSMapIterator"); | 795 JSObjectPrintHeader(os, this, "JSMapIterator"); |
| 799 OrderedHashTableIteratorPrint(os); | 796 OrderedHashTableIteratorPrint(os); |
| 800 } | 797 } |
| 801 | 798 |
| 802 | 799 |
| 803 void JSIteratorResult::JSIteratorResultPrint(std::ostream& os) { // NOLINT | |
| 804 JSObjectPrintHeader(os, this, "JSIteratorResult"); | |
| 805 os << "\n - done = " << Brief(done()); | |
| 806 os << "\n - value = " << Brief(value()); | |
| 807 os << "\n"; | |
| 808 } | |
| 809 | |
| 810 | |
| 811 void JSWeakMap::JSWeakMapPrint(std::ostream& os) { // NOLINT | 800 void JSWeakMap::JSWeakMapPrint(std::ostream& os) { // NOLINT |
| 812 JSObjectPrintHeader(os, this, "JSWeakMap"); | 801 JSObjectPrintHeader(os, this, "JSWeakMap"); |
| 813 os << "\n - table = " << Brief(table()); | 802 os << "\n - table = " << Brief(table()); |
| 814 JSObjectPrintBody(os, this); | 803 JSObjectPrintBody(os, this); |
| 815 } | 804 } |
| 816 | 805 |
| 817 | 806 |
| 818 void JSWeakSet::JSWeakSetPrint(std::ostream& os) { // NOLINT | 807 void JSWeakSet::JSWeakSetPrint(std::ostream& os) { // NOLINT |
| 819 JSObjectPrintHeader(os, this, "JSWeakSet"); | 808 JSObjectPrintHeader(os, this, "JSWeakSet"); |
| 820 os << "\n - table = " << Brief(table()); | 809 os << "\n - table = " << Brief(table()); |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1326 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT | 1315 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT |
| 1327 Object* transitions = map()->raw_transitions(); | 1316 Object* transitions = map()->raw_transitions(); |
| 1328 int num_transitions = TransitionArray::NumberOfTransitions(transitions); | 1317 int num_transitions = TransitionArray::NumberOfTransitions(transitions); |
| 1329 if (num_transitions == 0) return; | 1318 if (num_transitions == 0) return; |
| 1330 os << "\n - transitions"; | 1319 os << "\n - transitions"; |
| 1331 TransitionArray::PrintTransitions(os, transitions, false); | 1320 TransitionArray::PrintTransitions(os, transitions, false); |
| 1332 } | 1321 } |
| 1333 #endif // defined(DEBUG) || defined(OBJECT_PRINT) | 1322 #endif // defined(DEBUG) || defined(OBJECT_PRINT) |
| 1334 } // namespace internal | 1323 } // namespace internal |
| 1335 } // namespace v8 | 1324 } // namespace v8 |
| OLD | NEW |