Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: src/wasm/wasm-debug.h

Issue 2050953003: [wasm] Split off debug info from wasm object (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@decode-function-offsets-table
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/v8.gyp ('k') | src/wasm/wasm-debug.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef V8_WASM_DEBUG_H_
6 #define V8_WASM_DEBUG_H_
7
8 #include "src/handles.h"
9 #include "src/objects.h"
10
11 namespace v8 {
12 namespace internal {
13 namespace wasm {
14
15 class WasmDebugInfo : public JSObject {
titzer 2016/06/10 10:59:26 Why not a fixed array?
clemensh 2016/06/10 11:06:02 Where is the benefit? Is it more lightweight? I th
16 public:
17 static Handle<WasmDebugInfo> New(Handle<JSObject> wasm);
18
19 static bool IsDebugInfo(Object* object);
20 static WasmDebugInfo* cast(Object* object);
21
22 JSObject* wasm_object();
23
24 bool SetBreakPoint(int byte_offset);
25
26 std::pair<int, int> GetFunctionOffsetAndLength(int func_index);
27
28 Script* GetFunctionScript(int func_index);
29 };
30
31 // Compute the function offset table.
32 // Returns a JSArray with two Smis per function: offset and length.
33 // Returns undefined if the module bytes are invalid.
34 Handle<Object> GetFunctionOffsetTable(Isolate* isolate,
35 Handle<String> module_bytes);
36
37 // Decode the given wasm binary code.
38 // Returns an array with text representation and offset table, or undefined if
39 // the wasm bytes do not represent a valid wasm function body.
40 // The boolean flags specify whether text, table or both should be generated.
41 // Ungenerated array elements will be undefined.
42 Handle<Object> DisassembleFunction(Isolate* isolate,
43 Handle<String> function_bytes, bool get_code,
44 bool get_table);
45
46 } // namespace wasm
47 } // namespace internal
48 } // namespace v8
49
50 #endif // V8_WASM_DEBUG_H_
OLDNEW
« no previous file with comments | « src/v8.gyp ('k') | src/wasm/wasm-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698