Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef V8_DEBUG_INTERFACE_TYPES_H_ | 5 #ifndef V8_DEBUG_INTERFACE_TYPES_H_ |
| 6 #define V8_DEBUG_INTERFACE_TYPES_H_ | 6 #define V8_DEBUG_INTERFACE_TYPES_H_ |
| 7 | 7 |
| 8 #include <cstdint> | 8 #include <cstdint> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 43 * All numbers are 0-based. | 43 * All numbers are 0-based. |
| 44 */ | 44 */ |
| 45 struct WasmDisassemblyOffsetTableEntry { | 45 struct WasmDisassemblyOffsetTableEntry { |
| 46 WasmDisassemblyOffsetTableEntry(uint32_t byte_offset, int line, int column) | 46 WasmDisassemblyOffsetTableEntry(uint32_t byte_offset, int line, int column) |
| 47 : byte_offset(byte_offset), line(line), column(column) {} | 47 : byte_offset(byte_offset), line(line), column(column) {} |
| 48 | 48 |
| 49 uint32_t byte_offset; | 49 uint32_t byte_offset; |
| 50 int line; | 50 int line; |
| 51 int column; | 51 int column; |
| 52 }; | 52 }; |
| 53 | |
| 53 struct WasmDisassembly { | 54 struct WasmDisassembly { |
| 54 using OffsetTable = std::vector<WasmDisassemblyOffsetTableEntry>; | 55 using OffsetTable = std::vector<WasmDisassemblyOffsetTableEntry>; |
| 55 WasmDisassembly() {} | 56 WasmDisassembly() {} |
| 56 WasmDisassembly(std::string disassembly, OffsetTable offset_table) | 57 WasmDisassembly(std::string disassembly, OffsetTable offset_table) |
| 57 : disassembly(std::move(disassembly)), | 58 : disassembly(std::move(disassembly)), |
| 58 offset_table(std::move(offset_table)) {} | 59 offset_table(std::move(offset_table)) {} |
| 59 | 60 |
| 60 std::string disassembly; | 61 std::string disassembly; |
| 61 OffsetTable offset_table; | 62 OffsetTable offset_table; |
| 62 }; | 63 }; |
| 63 | 64 |
| 64 enum PromiseDebugActionType { | 65 enum PromiseDebugActionType { |
| 65 kDebugPromiseCreated, | 66 kDebugPromiseCreated, |
| 66 kDebugEnqueueAsyncFunction, | 67 kDebugEnqueueAsyncFunction, |
| 67 kDebugEnqueuePromiseResolve, | 68 kDebugEnqueuePromiseResolve, |
| 68 kDebugEnqueuePromiseReject, | 69 kDebugEnqueuePromiseReject, |
| 69 kDebugPromiseCollected, | 70 kDebugPromiseCollected, |
| 70 kDebugWillHandle, | 71 kDebugWillHandle, |
| 71 kDebugDidHandle, | 72 kDebugDidHandle, |
| 72 }; | 73 }; |
| 73 | 74 |
| 75 class V8_EXPORT_PRIVATE BreakLocation : public Location { | |
| 76 public: | |
| 77 BreakLocation(int line_number, int column_number, bool is_call, | |
| 78 bool is_return, bool is_debugger_statement) | |
| 79 : Location(line_number, column_number), | |
| 80 is_call_(is_call), | |
| 81 is_return_(is_return), | |
| 82 is_debugger_statement_(is_debugger_statement) {} | |
| 83 | |
| 84 bool IsCall() { return is_call_; } | |
| 85 bool IsReturn() { return is_return_; } | |
| 86 bool IsDebuggerStatement() { return is_debugger_statement_; } | |
| 87 | |
| 88 private: | |
| 89 bool is_call_; | |
|
Yang
2017/03/02 20:06:57
This could also be an enum. Just saying :)
kozy
2017/03/02 22:38:09
Done.
| |
| 90 bool is_return_; | |
| 91 bool is_debugger_statement_; | |
| 92 }; | |
| 93 | |
| 74 } // namespace debug | 94 } // namespace debug |
| 75 } // namespace v8 | 95 } // namespace v8 |
| 76 | 96 |
| 77 #endif // V8_DEBUG_INTERFACE_TYPES_H_ | 97 #endif // V8_DEBUG_INTERFACE_TYPES_H_ |
| OLD | NEW |