| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 <cmath> | 7 #include <cmath> |
| 8 #include <iomanip> | 8 #include <iomanip> |
| 9 #include <sstream> | 9 #include <sstream> |
| 10 | 10 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 #include "src/source-position-table.h" | 54 #include "src/source-position-table.h" |
| 55 #include "src/string-builder.h" | 55 #include "src/string-builder.h" |
| 56 #include "src/string-search.h" | 56 #include "src/string-search.h" |
| 57 #include "src/string-stream.h" | 57 #include "src/string-stream.h" |
| 58 #include "src/utils.h" | 58 #include "src/utils.h" |
| 59 #include "src/zone.h" | 59 #include "src/zone.h" |
| 60 | 60 |
| 61 #ifdef ENABLE_DISASSEMBLER | 61 #ifdef ENABLE_DISASSEMBLER |
| 62 #include "src/disasm.h" | 62 #include "src/disasm.h" |
| 63 #include "src/disassembler.h" | 63 #include "src/disassembler.h" |
| 64 #include "src/eh-frame.h" |
| 64 #endif | 65 #endif |
| 65 | 66 |
| 66 namespace v8 { | 67 namespace v8 { |
| 67 namespace internal { | 68 namespace internal { |
| 68 | 69 |
| 69 std::ostream& operator<<(std::ostream& os, InstanceType instance_type) { | 70 std::ostream& operator<<(std::ostream& os, InstanceType instance_type) { |
| 70 switch (instance_type) { | 71 switch (instance_type) { |
| 71 #define WRITE_TYPE(TYPE) \ | 72 #define WRITE_TYPE(TYPE) \ |
| 72 case TYPE: \ | 73 case TYPE: \ |
| 73 return os << #TYPE; | 74 return os << #TYPE; |
| (...skipping 14337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14411 HandlerTable::cast(handler_table())->HandlerTableReturnPrint(os); | 14412 HandlerTable::cast(handler_table())->HandlerTableReturnPrint(os); |
| 14412 } | 14413 } |
| 14413 os << "\n"; | 14414 os << "\n"; |
| 14414 } | 14415 } |
| 14415 | 14416 |
| 14416 os << "RelocInfo (size = " << relocation_size() << ")\n"; | 14417 os << "RelocInfo (size = " << relocation_size() << ")\n"; |
| 14417 for (RelocIterator it(this); !it.done(); it.next()) { | 14418 for (RelocIterator it(this); !it.done(); it.next()) { |
| 14418 it.rinfo()->Print(GetIsolate(), os); | 14419 it.rinfo()->Print(GetIsolate(), os); |
| 14419 } | 14420 } |
| 14420 os << "\n"; | 14421 os << "\n"; |
| 14422 |
| 14423 if (has_unwinding_info()) { |
| 14424 os << "UnwindingInfo (size = " << unwinding_info_size() << ")\n"; |
| 14425 EhFrameDisassembler eh_frame_disassembler(unwinding_info_start(), |
| 14426 unwinding_info_end()); |
| 14427 eh_frame_disassembler.DisassembleToStream(os); |
| 14428 os << "\n"; |
| 14429 } |
| 14421 } | 14430 } |
| 14422 #endif // ENABLE_DISASSEMBLER | 14431 #endif // ENABLE_DISASSEMBLER |
| 14423 | 14432 |
| 14424 | 14433 |
| 14425 void BytecodeArray::Disassemble(std::ostream& os) { | 14434 void BytecodeArray::Disassemble(std::ostream& os) { |
| 14426 os << "Parameter count " << parameter_count() << "\n"; | 14435 os << "Parameter count " << parameter_count() << "\n"; |
| 14427 os << "Frame size " << frame_size() << "\n"; | 14436 os << "Frame size " << frame_size() << "\n"; |
| 14428 | 14437 |
| 14429 const uint8_t* base_address = GetFirstBytecodeAddress(); | 14438 const uint8_t* base_address = GetFirstBytecodeAddress(); |
| 14430 SourcePositionTableIterator source_positions(source_position_table()); | 14439 SourcePositionTableIterator source_positions(source_position_table()); |
| (...skipping 4547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 18978 | 18987 |
| 18979 Object* data_obj = | 18988 Object* data_obj = |
| 18980 constructor->shared()->get_api_func_data()->access_check_info(); | 18989 constructor->shared()->get_api_func_data()->access_check_info(); |
| 18981 if (data_obj->IsUndefined(isolate)) return nullptr; | 18990 if (data_obj->IsUndefined(isolate)) return nullptr; |
| 18982 | 18991 |
| 18983 return AccessCheckInfo::cast(data_obj); | 18992 return AccessCheckInfo::cast(data_obj); |
| 18984 } | 18993 } |
| 18985 | 18994 |
| 18986 } // namespace internal | 18995 } // namespace internal |
| 18987 } // namespace v8 | 18996 } // namespace v8 |
| OLD | NEW |