| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 #include "src/safepoint-table.h" | 53 #include "src/safepoint-table.h" |
| 54 #include "src/string-builder.h" | 54 #include "src/string-builder.h" |
| 55 #include "src/string-search.h" | 55 #include "src/string-search.h" |
| 56 #include "src/string-stream.h" | 56 #include "src/string-stream.h" |
| 57 #include "src/utils.h" | 57 #include "src/utils.h" |
| 58 #include "src/zone.h" | 58 #include "src/zone.h" |
| 59 | 59 |
| 60 #ifdef ENABLE_DISASSEMBLER | 60 #ifdef ENABLE_DISASSEMBLER |
| 61 #include "src/disasm.h" | 61 #include "src/disasm.h" |
| 62 #include "src/disassembler.h" | 62 #include "src/disassembler.h" |
| 63 #include "src/eh-frame.h" |
| 63 #endif | 64 #endif |
| 64 | 65 |
| 65 namespace v8 { | 66 namespace v8 { |
| 66 namespace internal { | 67 namespace internal { |
| 67 | 68 |
| 68 std::ostream& operator<<(std::ostream& os, InstanceType instance_type) { | 69 std::ostream& operator<<(std::ostream& os, InstanceType instance_type) { |
| 69 switch (instance_type) { | 70 switch (instance_type) { |
| 70 #define WRITE_TYPE(TYPE) \ | 71 #define WRITE_TYPE(TYPE) \ |
| 71 case TYPE: \ | 72 case TYPE: \ |
| 72 return os << #TYPE; | 73 return os << #TYPE; |
| (...skipping 14275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14348 HandlerTable::cast(handler_table())->HandlerTableReturnPrint(os); | 14349 HandlerTable::cast(handler_table())->HandlerTableReturnPrint(os); |
| 14349 } | 14350 } |
| 14350 os << "\n"; | 14351 os << "\n"; |
| 14351 } | 14352 } |
| 14352 | 14353 |
| 14353 os << "RelocInfo (size = " << relocation_size() << ")\n"; | 14354 os << "RelocInfo (size = " << relocation_size() << ")\n"; |
| 14354 for (RelocIterator it(this); !it.done(); it.next()) { | 14355 for (RelocIterator it(this); !it.done(); it.next()) { |
| 14355 it.rinfo()->Print(GetIsolate(), os); | 14356 it.rinfo()->Print(GetIsolate(), os); |
| 14356 } | 14357 } |
| 14357 os << "\n"; | 14358 os << "\n"; |
| 14359 |
| 14360 if (has_unwinding_info()) { |
| 14361 os << "UnwindingInfo (size = " << unwinding_info_size() << ")\n"; |
| 14362 EhFrameWriter::DisassembleToStream(os, unwinding_info_start(), |
| 14363 unwinding_info_end()); |
| 14364 os << "\n"; |
| 14365 } |
| 14358 } | 14366 } |
| 14359 #endif // ENABLE_DISASSEMBLER | 14367 #endif // ENABLE_DISASSEMBLER |
| 14360 | 14368 |
| 14361 int BytecodeArray::SourcePosition(int offset) { | 14369 int BytecodeArray::SourcePosition(int offset) { |
| 14362 int last_position = 0; | 14370 int last_position = 0; |
| 14363 for (interpreter::SourcePositionTableIterator iterator( | 14371 for (interpreter::SourcePositionTableIterator iterator( |
| 14364 source_position_table()); | 14372 source_position_table()); |
| 14365 !iterator.done() && iterator.bytecode_offset() <= offset; | 14373 !iterator.done() && iterator.bytecode_offset() <= offset; |
| 14366 iterator.Advance()) { | 14374 iterator.Advance()) { |
| 14367 last_position = iterator.source_position(); | 14375 last_position = iterator.source_position(); |
| (...skipping 4495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 18863 } else { | 18871 } else { |
| 18864 // Old-style generators. | 18872 // Old-style generators. |
| 18865 int offset = continuation(); | 18873 int offset = continuation(); |
| 18866 CHECK(0 <= offset && offset < function()->code()->instruction_size()); | 18874 CHECK(0 <= offset && offset < function()->code()->instruction_size()); |
| 18867 return function()->code()->SourcePosition(offset); | 18875 return function()->code()->SourcePosition(offset); |
| 18868 } | 18876 } |
| 18869 } | 18877 } |
| 18870 | 18878 |
| 18871 } // namespace internal | 18879 } // namespace internal |
| 18872 } // namespace v8 | 18880 } // namespace v8 |
| OLD | NEW |