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 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
868 void JSFunction::JSFunctionPrint(std::ostream& os) { // NOLINT | 868 void JSFunction::JSFunctionPrint(std::ostream& os) { // NOLINT |
869 JSObjectPrintHeader(os, this, "Function"); | 869 JSObjectPrintHeader(os, this, "Function"); |
870 os << "\n - initial_map = "; | 870 os << "\n - initial_map = "; |
871 if (has_initial_map()) os << Brief(initial_map()); | 871 if (has_initial_map()) os << Brief(initial_map()); |
872 os << "\n - shared_info = " << Brief(shared()); | 872 os << "\n - shared_info = " << Brief(shared()); |
873 os << "\n - name = " << Brief(shared()->name()); | 873 os << "\n - name = " << Brief(shared()->name()); |
874 os << "\n - formal_parameter_count = " | 874 os << "\n - formal_parameter_count = " |
875 << shared()->internal_formal_parameter_count(); | 875 << shared()->internal_formal_parameter_count(); |
876 if (shared()->is_generator()) { | 876 if (shared()->is_generator()) { |
877 os << "\n - generator"; | 877 os << "\n - generator"; |
| 878 } else if (shared()->is_async()) { |
| 879 os << "\n - async"; |
878 } | 880 } |
879 os << "\n - context = " << Brief(context()); | 881 os << "\n - context = " << Brief(context()); |
880 os << "\n - literals = " << Brief(literals()); | 882 os << "\n - literals = " << Brief(literals()); |
881 os << "\n - code = " << Brief(code()); | 883 os << "\n - code = " << Brief(code()); |
882 JSObjectPrintBody(os, this); | 884 JSObjectPrintBody(os, this); |
883 } | 885 } |
884 | 886 |
885 | 887 |
886 void SharedFunctionInfo::SharedFunctionInfoPrint(std::ostream& os) { // NOLINT | 888 void SharedFunctionInfo::SharedFunctionInfoPrint(std::ostream& os) { // NOLINT |
887 HeapObject::PrintHeader(os, "SharedFunctionInfo"); | 889 HeapObject::PrintHeader(os, "SharedFunctionInfo"); |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1337 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT | 1339 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT |
1338 Object* transitions = map()->raw_transitions(); | 1340 Object* transitions = map()->raw_transitions(); |
1339 int num_transitions = TransitionArray::NumberOfTransitions(transitions); | 1341 int num_transitions = TransitionArray::NumberOfTransitions(transitions); |
1340 if (num_transitions == 0) return; | 1342 if (num_transitions == 0) return; |
1341 os << "\n - transitions"; | 1343 os << "\n - transitions"; |
1342 TransitionArray::PrintTransitions(os, transitions, false); | 1344 TransitionArray::PrintTransitions(os, transitions, false); |
1343 } | 1345 } |
1344 #endif // defined(DEBUG) || defined(OBJECT_PRINT) | 1346 #endif // defined(DEBUG) || defined(OBJECT_PRINT) |
1345 } // namespace internal | 1347 } // namespace internal |
1346 } // namespace v8 | 1348 } // namespace v8 |
OLD | NEW |