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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 break; | 124 break; |
125 case JS_DATE_TYPE: | 125 case JS_DATE_TYPE: |
126 JSDate::cast(this)->JSDatePrint(os); | 126 JSDate::cast(this)->JSDatePrint(os); |
127 break; | 127 break; |
128 case CODE_TYPE: | 128 case CODE_TYPE: |
129 Code::cast(this)->CodePrint(os); | 129 Code::cast(this)->CodePrint(os); |
130 break; | 130 break; |
131 case JS_PROXY_TYPE: | 131 case JS_PROXY_TYPE: |
132 JSProxy::cast(this)->JSProxyPrint(os); | 132 JSProxy::cast(this)->JSProxyPrint(os); |
133 break; | 133 break; |
134 case JS_FUNCTION_PROXY_TYPE: | |
135 JSFunctionProxy::cast(this)->JSFunctionProxyPrint(os); | |
136 break; | |
137 case JS_SET_TYPE: | 134 case JS_SET_TYPE: |
138 JSSet::cast(this)->JSSetPrint(os); | 135 JSSet::cast(this)->JSSetPrint(os); |
139 break; | 136 break; |
140 case JS_MAP_TYPE: | 137 case JS_MAP_TYPE: |
141 JSMap::cast(this)->JSMapPrint(os); | 138 JSMap::cast(this)->JSMapPrint(os); |
142 break; | 139 break; |
143 case JS_SET_ITERATOR_TYPE: | 140 case JS_SET_ITERATOR_TYPE: |
144 JSSetIterator::cast(this)->JSSetIteratorPrint(os); | 141 JSSetIterator::cast(this)->JSSetIteratorPrint(os); |
145 break; | 142 break; |
146 case JS_MAP_ITERATOR_TYPE: | 143 case JS_MAP_ITERATOR_TYPE: |
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 os << "\n - target = "; | 741 os << "\n - target = "; |
745 target()->ShortPrint(os); | 742 target()->ShortPrint(os); |
746 os << "\n - handler = "; | 743 os << "\n - handler = "; |
747 handler()->ShortPrint(os); | 744 handler()->ShortPrint(os); |
748 os << "\n - hash = "; | 745 os << "\n - hash = "; |
749 hash()->ShortPrint(os); | 746 hash()->ShortPrint(os); |
750 os << "\n"; | 747 os << "\n"; |
751 } | 748 } |
752 | 749 |
753 | 750 |
754 void JSFunctionProxy::JSFunctionProxyPrint(std::ostream& os) { // NOLINT | |
755 HeapObject::PrintHeader(os, "JSFunctionProxy"); | |
756 os << " - map = " << reinterpret_cast<void*>(map()) << "\n"; | |
757 os << " - handler = "; | |
758 handler()->Print(os); | |
759 os << "\n - call_trap = "; | |
760 call_trap()->Print(os); | |
761 os << "\n - construct_trap = "; | |
762 construct_trap()->Print(os); | |
763 os << "\n"; | |
764 } | |
765 | |
766 | |
767 void JSSet::JSSetPrint(std::ostream& os) { // NOLINT | 751 void JSSet::JSSetPrint(std::ostream& os) { // NOLINT |
768 JSObjectPrintHeader(os, this, "JSSet"); | 752 JSObjectPrintHeader(os, this, "JSSet"); |
769 os << " - table = " << Brief(table()); | 753 os << " - table = " << Brief(table()); |
770 JSObjectPrintBody(os, this); | 754 JSObjectPrintBody(os, this); |
771 } | 755 } |
772 | 756 |
773 | 757 |
774 void JSMap::JSMapPrint(std::ostream& os) { // NOLINT | 758 void JSMap::JSMapPrint(std::ostream& os) { // NOLINT |
775 JSObjectPrintHeader(os, this, "JSMap"); | 759 JSObjectPrintHeader(os, this, "JSMap"); |
776 os << " - table = " << Brief(table()); | 760 os << " - table = " << Brief(table()); |
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1329 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT | 1313 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT |
1330 Object* transitions = map()->raw_transitions(); | 1314 Object* transitions = map()->raw_transitions(); |
1331 int num_transitions = TransitionArray::NumberOfTransitions(transitions); | 1315 int num_transitions = TransitionArray::NumberOfTransitions(transitions); |
1332 if (num_transitions == 0) return; | 1316 if (num_transitions == 0) return; |
1333 os << "\n - transitions"; | 1317 os << "\n - transitions"; |
1334 TransitionArray::PrintTransitions(os, transitions, false); | 1318 TransitionArray::PrintTransitions(os, transitions, false); |
1335 } | 1319 } |
1336 #endif // defined(DEBUG) || defined(OBJECT_PRINT) | 1320 #endif // defined(DEBUG) || defined(OBJECT_PRINT) |
1337 } // namespace internal | 1321 } // namespace internal |
1338 } // namespace v8 | 1322 } // namespace v8 |
OLD | NEW |