| 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_WASM_DEBUG_H_ | 5 #ifndef V8_WASM_DEBUG_H_ |
| 6 #define V8_WASM_DEBUG_H_ | 6 #define V8_WASM_DEBUG_H_ |
| 7 | 7 |
| 8 #include "src/handles.h" | 8 #include "src/handles.h" |
| 9 #include "src/objects.h" | 9 #include "src/objects.h" |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // Disassemble the specified function from this module. | 30 // Disassemble the specified function from this module. |
| 31 static Handle<String> DisassembleFunction(Handle<WasmDebugInfo> debug_info, | 31 static Handle<String> DisassembleFunction(Handle<WasmDebugInfo> debug_info, |
| 32 int func_index); | 32 int func_index); |
| 33 | 33 |
| 34 // Get the offset table for the specified function, mapping from byte offsets | 34 // Get the offset table for the specified function, mapping from byte offsets |
| 35 // to position in the disassembly. | 35 // to position in the disassembly. |
| 36 // Returns an array with three entries per instruction: byte offset, line and | 36 // Returns an array with three entries per instruction: byte offset, line and |
| 37 // column. | 37 // column. |
| 38 static Handle<FixedArray> GetFunctionOffsetTable( | 38 static Handle<FixedArray> GetFunctionOffsetTable( |
| 39 Handle<WasmDebugInfo> debug_info, int func_index); | 39 Handle<WasmDebugInfo> debug_info, int func_index); |
| 40 |
| 41 // Get the asm.js source position from a byte offset. |
| 42 // Must only be called if the associated wasm object was created from asm.js. |
| 43 static int GetAsmJsSourcePosition(Handle<WasmDebugInfo> debug_info, |
| 44 int func_index, int byte_offset); |
| 40 }; | 45 }; |
| 41 | 46 |
| 42 } // namespace wasm | 47 } // namespace wasm |
| 43 } // namespace internal | 48 } // namespace internal |
| 44 } // namespace v8 | 49 } // namespace v8 |
| 45 | 50 |
| 46 #endif // V8_WASM_DEBUG_H_ | 51 #endif // V8_WASM_DEBUG_H_ |
| OLD | NEW |