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 <iomanip> | 7 #include <iomanip> |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "src/disasm.h" | 10 #include "src/disasm.h" |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 break; | 186 break; |
187 case WEAK_CELL_TYPE: | 187 case WEAK_CELL_TYPE: |
188 WeakCell::cast(this)->WeakCellPrint(os); | 188 WeakCell::cast(this)->WeakCellPrint(os); |
189 break; | 189 break; |
190 case JS_ARRAY_BUFFER_TYPE: | 190 case JS_ARRAY_BUFFER_TYPE: |
191 JSArrayBuffer::cast(this)->JSArrayBufferPrint(os); | 191 JSArrayBuffer::cast(this)->JSArrayBufferPrint(os); |
192 break; | 192 break; |
193 case JS_TYPED_ARRAY_TYPE: | 193 case JS_TYPED_ARRAY_TYPE: |
194 JSTypedArray::cast(this)->JSTypedArrayPrint(os); | 194 JSTypedArray::cast(this)->JSTypedArrayPrint(os); |
195 break; | 195 break; |
| 196 case JS_FIXED_ARRAY_ITERATOR_TYPE: |
| 197 JSFixedArrayIterator::cast(this)->JSFixedArrayIteratorPrint(os); |
| 198 break; |
196 case JS_DATA_VIEW_TYPE: | 199 case JS_DATA_VIEW_TYPE: |
197 JSDataView::cast(this)->JSDataViewPrint(os); | 200 JSDataView::cast(this)->JSDataViewPrint(os); |
198 break; | 201 break; |
199 #define MAKE_STRUCT_CASE(NAME, Name, name) \ | 202 #define MAKE_STRUCT_CASE(NAME, Name, name) \ |
200 case NAME##_TYPE: \ | 203 case NAME##_TYPE: \ |
201 Name::cast(this)->Name##Print(os); \ | 204 Name::cast(this)->Name##Print(os); \ |
202 break; | 205 break; |
203 STRUCT_LIST(MAKE_STRUCT_CASE) | 206 STRUCT_LIST(MAKE_STRUCT_CASE) |
204 #undef MAKE_STRUCT_CASE | 207 #undef MAKE_STRUCT_CASE |
205 | 208 |
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
942 void JSTypedArray::JSTypedArrayPrint(std::ostream& os) { // NOLINT | 945 void JSTypedArray::JSTypedArrayPrint(std::ostream& os) { // NOLINT |
943 JSObjectPrintHeader(os, this, "JSTypedArray"); | 946 JSObjectPrintHeader(os, this, "JSTypedArray"); |
944 os << "\n - buffer = " << Brief(buffer()); | 947 os << "\n - buffer = " << Brief(buffer()); |
945 os << "\n - byte_offset = " << Brief(byte_offset()); | 948 os << "\n - byte_offset = " << Brief(byte_offset()); |
946 os << "\n - byte_length = " << Brief(byte_length()); | 949 os << "\n - byte_length = " << Brief(byte_length()); |
947 os << "\n - length = " << Brief(length()); | 950 os << "\n - length = " << Brief(length()); |
948 if (WasNeutered()) os << "\n - neutered"; | 951 if (WasNeutered()) os << "\n - neutered"; |
949 JSObjectPrintBody(os, this, !WasNeutered()); | 952 JSObjectPrintBody(os, this, !WasNeutered()); |
950 } | 953 } |
951 | 954 |
| 955 void JSFixedArrayIterator::JSFixedArrayIteratorPrint( |
| 956 std::ostream& os) { // NOLINT |
| 957 JSObjectPrintHeader(os, this, "JSFixedArrayIterator"); |
| 958 os << "\n - array = " << Brief(array()); |
| 959 os << "\n - index = " << index(); |
| 960 os << "\n - initial_next = " << Brief(initial_next()); |
| 961 JSObjectPrintBody(os, this); |
| 962 } |
952 | 963 |
953 void JSDataView::JSDataViewPrint(std::ostream& os) { // NOLINT | 964 void JSDataView::JSDataViewPrint(std::ostream& os) { // NOLINT |
954 JSObjectPrintHeader(os, this, "JSDataView"); | 965 JSObjectPrintHeader(os, this, "JSDataView"); |
955 os << "\n - buffer =" << Brief(buffer()); | 966 os << "\n - buffer =" << Brief(buffer()); |
956 os << "\n - byte_offset = " << Brief(byte_offset()); | 967 os << "\n - byte_offset = " << Brief(byte_offset()); |
957 os << "\n - byte_length = " << Brief(byte_length()); | 968 os << "\n - byte_length = " << Brief(byte_length()); |
958 if (WasNeutered()) os << "\n - neutered"; | 969 if (WasNeutered()) os << "\n - neutered"; |
959 JSObjectPrintBody(os, this, !WasNeutered()); | 970 JSObjectPrintBody(os, this, !WasNeutered()); |
960 } | 971 } |
961 | 972 |
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1560 printf("Not a transition array\n"); | 1571 printf("Not a transition array\n"); |
1561 } else { | 1572 } else { |
1562 reinterpret_cast<i::TransitionArray*>(object)->Print(); | 1573 reinterpret_cast<i::TransitionArray*>(object)->Print(); |
1563 } | 1574 } |
1564 } | 1575 } |
1565 | 1576 |
1566 extern void _v8_internal_Print_StackTrace() { | 1577 extern void _v8_internal_Print_StackTrace() { |
1567 i::Isolate* isolate = i::Isolate::Current(); | 1578 i::Isolate* isolate = i::Isolate::Current(); |
1568 isolate->PrintStack(stdout); | 1579 isolate->PrintStack(stdout); |
1569 } | 1580 } |
OLD | NEW |