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/v8.h" | 5 #include "src/v8.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/heap/objects-visiting.h" | 9 #include "src/heap/objects-visiting.h" |
10 #include "src/jsregexp.h" | 10 #include "src/jsregexp.h" |
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
712 os << " - table = " << Brief(table()); | 712 os << " - table = " << Brief(table()); |
713 os << "\n"; | 713 os << "\n"; |
714 } | 714 } |
715 | 715 |
716 | 716 |
717 void JSArrayBuffer::JSArrayBufferPrint(std::ostream& os) { // NOLINT | 717 void JSArrayBuffer::JSArrayBufferPrint(std::ostream& os) { // NOLINT |
718 HeapObject::PrintHeader(os, "JSArrayBuffer"); | 718 HeapObject::PrintHeader(os, "JSArrayBuffer"); |
719 os << " - map = " << reinterpret_cast<void*>(map()) << "\n"; | 719 os << " - map = " << reinterpret_cast<void*>(map()) << "\n"; |
720 os << " - backing_store = " << backing_store() << "\n"; | 720 os << " - backing_store = " << backing_store() << "\n"; |
721 os << " - byte_length = " << Brief(byte_length()); | 721 os << " - byte_length = " << Brief(byte_length()); |
| 722 if (was_neutered()) os << " - neutered\n"; |
722 os << "\n"; | 723 os << "\n"; |
723 } | 724 } |
724 | 725 |
725 | 726 |
726 void JSTypedArray::JSTypedArrayPrint(std::ostream& os) { // NOLINT | 727 void JSTypedArray::JSTypedArrayPrint(std::ostream& os) { // NOLINT |
727 HeapObject::PrintHeader(os, "JSTypedArray"); | 728 HeapObject::PrintHeader(os, "JSTypedArray"); |
728 os << " - map = " << reinterpret_cast<void*>(map()) << "\n"; | 729 os << " - map = " << reinterpret_cast<void*>(map()) << "\n"; |
729 os << " - buffer = " << Brief(buffer()); | 730 os << " - buffer = " << Brief(buffer()); |
730 os << "\n - byte_offset = " << Brief(byte_offset()); | 731 os << "\n - byte_offset = " << Brief(byte_offset()); |
731 os << "\n - byte_length = " << Brief(byte_length()); | 732 os << "\n - byte_length = " << Brief(byte_length()); |
732 os << "\n - length = " << Brief(length()); | 733 os << "\n - length = " << Brief(length()); |
| 734 if (WasNeutered()) os << " - neutered\n"; |
733 os << "\n"; | 735 os << "\n"; |
734 PrintElements(os); | 736 if (!WasNeutered()) PrintElements(os); |
735 } | 737 } |
736 | 738 |
737 | 739 |
738 void JSDataView::JSDataViewPrint(std::ostream& os) { // NOLINT | 740 void JSDataView::JSDataViewPrint(std::ostream& os) { // NOLINT |
739 HeapObject::PrintHeader(os, "JSDataView"); | 741 HeapObject::PrintHeader(os, "JSDataView"); |
740 os << " - map = " << reinterpret_cast<void*>(map()) << "\n"; | 742 os << " - map = " << reinterpret_cast<void*>(map()) << "\n"; |
741 os << " - buffer =" << Brief(buffer()); | 743 os << " - buffer =" << Brief(buffer()); |
742 os << "\n - byte_offset = " << Brief(byte_offset()); | 744 os << "\n - byte_offset = " << Brief(byte_offset()); |
743 os << "\n - byte_length = " << Brief(byte_length()); | 745 os << "\n - byte_length = " << Brief(byte_length()); |
| 746 if (WasNeutered()) os << " - neutered\n"; |
744 os << "\n"; | 747 os << "\n"; |
745 } | 748 } |
746 | 749 |
747 | 750 |
748 void JSFunction::JSFunctionPrint(std::ostream& os) { // NOLINT | 751 void JSFunction::JSFunctionPrint(std::ostream& os) { // NOLINT |
749 HeapObject::PrintHeader(os, "Function"); | 752 HeapObject::PrintHeader(os, "Function"); |
750 os << " - map = " << reinterpret_cast<void*>(map()) << "\n"; | 753 os << " - map = " << reinterpret_cast<void*>(map()) << "\n"; |
751 os << " - initial_map = "; | 754 os << " - initial_map = "; |
752 if (has_initial_map()) os << Brief(initial_map()); | 755 if (has_initial_map()) os << Brief(initial_map()); |
753 os << "\n - shared_info = " << Brief(shared()); | 756 os << "\n - shared_info = " << Brief(shared()); |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1202 os << " -> " << Brief(target) << "\n"; | 1205 os << " -> " << Brief(target) << "\n"; |
1203 } | 1206 } |
1204 } | 1207 } |
1205 | 1208 |
1206 | 1209 |
1207 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT | 1210 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT |
1208 TransitionArray::PrintTransitions(os, map()->raw_transitions()); | 1211 TransitionArray::PrintTransitions(os, map()->raw_transitions()); |
1209 } | 1212 } |
1210 #endif // defined(DEBUG) || defined(OBJECT_PRINT) | 1213 #endif // defined(DEBUG) || defined(OBJECT_PRINT) |
1211 } } // namespace v8::internal | 1214 } } // namespace v8::internal |
OLD | NEW |