| 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_DEBUG_INTERFACE_H_ | 5 #ifndef V8_DEBUG_DEBUG_INTERFACE_H_ |
| 6 #define V8_DEBUG_DEBUG_INTERFACE_H_ | 6 #define V8_DEBUG_DEBUG_INTERFACE_H_ |
| 7 | 7 |
| 8 #include "include/v8-debug.h" | 8 #include "include/v8-debug.h" |
| 9 #include "include/v8-util.h" | 9 #include "include/v8-util.h" |
| 10 #include "include/v8.h" | 10 #include "include/v8.h" |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 }; | 199 }; |
| 200 | 200 |
| 201 // Specialization for wasm Scripts. | 201 // Specialization for wasm Scripts. |
| 202 class WasmScript : public Script { | 202 class WasmScript : public Script { |
| 203 public: | 203 public: |
| 204 static WasmScript* Cast(Script* script); | 204 static WasmScript* Cast(Script* script); |
| 205 | 205 |
| 206 int NumFunctions() const; | 206 int NumFunctions() const; |
| 207 int NumImportedFunctions() const; | 207 int NumImportedFunctions() const; |
| 208 | 208 |
| 209 std::pair<int, int> GetFunctionRange(int function_index) const; |
| 210 |
| 209 /** | 211 /** |
| 210 * Compute the disassembly of a wasm function. | 212 * Compute the disassembly of a wasm function. |
| 211 * Returns the disassembly string and a list of <byte_offset, line, column> | 213 * Returns the disassembly string and a list of <byte_offset, line, column> |
| 212 * entries, mapping wasm byte offsets to line and column in the disassembly. | 214 * entries, mapping wasm byte offsets to line and column in the disassembly. |
| 213 * The list is guaranteed to be ordered by the byte_offset. | 215 * The list is guaranteed to be ordered by the byte_offset. |
| 214 */ | 216 */ |
| 215 std::pair<std::string, std::vector<std::tuple<uint32_t, int, int>>> | 217 std::pair<std::string, std::vector<std::tuple<uint32_t, int, int>>> |
| 216 DisassembleFunction(int function_index); | 218 DisassembleFunction(int function_index); |
| 217 }; | 219 }; |
| 218 | 220 |
| 219 static void GetLoadedScripts(Isolate* isolate, | 221 static void GetLoadedScripts(Isolate* isolate, |
| 220 PersistentValueVector<Script>& scripts); | 222 PersistentValueVector<Script>& scripts); |
| 221 | 223 |
| 222 static MaybeLocal<UnboundScript> CompileInspectorScript(Isolate* isolate, | 224 static MaybeLocal<UnboundScript> CompileInspectorScript(Isolate* isolate, |
| 223 Local<String> source); | 225 Local<String> source); |
| 224 }; | 226 }; |
| 225 | 227 |
| 226 } // namespace v8 | 228 } // namespace v8 |
| 227 | 229 |
| 228 #endif // V8_DEBUG_DEBUG_INTERFACE_H_ | 230 #endif // V8_DEBUG_DEBUG_INTERFACE_H_ |
| OLD | NEW |