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

Unified Diff: src/wasm/wasm-objects.h

Issue 2522953002: [wasm] Move asm.js offset table to compiled module (Closed)
Patch Set: Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: src/wasm/wasm-objects.h
diff --git a/src/wasm/wasm-objects.h b/src/wasm/wasm-objects.h
index 0ba5a8dc3f516af9355cf8edf5e69a613b4baa30..1c41f99d53cd99d289c9862fc80ca5fd1d4df362 100644
--- a/src/wasm/wasm-objects.h
+++ b/src/wasm/wasm-objects.h
@@ -198,7 +198,7 @@ class WasmCompiledModule : public FixedArray {
/* For debugging: */ \
MACRO(OBJECT, SeqOneByteString, module_bytes) \
MACRO(OBJECT, Script, script) \
- MACRO(OBJECT, ByteArray, asm_js_offset_tables) \
+ MACRO(OBJECT, ByteArray, asm_js_offset_table) \
/* End of debugging stuff */ \
MACRO(OBJECT, FixedArray, function_tables) \
MACRO(OBJECT, FixedArray, empty_function_tables) \
@@ -286,12 +286,18 @@ class WasmCompiledModule : public FixedArray {
// Returns true if the position is valid inside this module, false otherwise.
bool GetPositionInfo(uint32_t position, Script::PositionInfo* info);
+ // Get the asm.js source position from a byte offset.
+ // Must only be called if the associated wasm object was created from asm.js.
+ static int GetAsmJsSourcePosition(Handle<WasmCompiledModule> debug_info,
+ uint32_t func_index, uint32_t byte_offset);
+
private:
void InitId();
DISALLOW_IMPLICIT_CONSTRUCTORS(WasmCompiledModule);
};
+// TODO(clemensh): Extend this object for breakpoint support, or remove it.
class WasmDebugInfo : public FixedArray {
public:
enum class Fields { kFieldCount };
@@ -302,28 +308,6 @@ class WasmDebugInfo : public FixedArray {
static WasmDebugInfo* cast(Object* object);
WasmInstanceObject* wasm_instance();
-
- bool SetBreakPoint(int byte_offset);
-
- // Get the Script for the specified function.
- static Script* GetFunctionScript(Handle<WasmDebugInfo> debug_info,
- int func_index);
-
- // Disassemble the specified function from this module.
- static Handle<String> DisassembleFunction(Handle<WasmDebugInfo> debug_info,
- int func_index);
-
- // Get the offset table for the specified function, mapping from byte offsets
- // to position in the disassembly.
- // Returns an array with three entries per instruction: byte offset, line and
- // column.
- static Handle<FixedArray> GetFunctionOffsetTable(
- Handle<WasmDebugInfo> debug_info, int func_index);
-
- // Get the asm.js source position from a byte offset.
- // Must only be called if the associated wasm object was created from asm.js.
- static int GetAsmJsSourcePosition(Handle<WasmDebugInfo> debug_info,
- int func_index, int byte_offset);
};
#undef DECLARE_ACCESSORS

Powered by Google App Engine
This is Rietveld 408576698