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

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

Issue 2404253002: [wasm] Provide better stack traces for asm.js code (Closed)
Patch Set: Address titzer's comments Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/wasm/wasm-js.cc ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-module.h
diff --git a/src/wasm/wasm-module.h b/src/wasm/wasm-module.h
index 466b15ba6735eb0e89a796dc36fe9248643e9eef..9836751f8efd239dae46e97a3083a43149cb2b8a 100644
--- a/src/wasm/wasm-module.h
+++ b/src/wasm/wasm-module.h
@@ -394,6 +394,8 @@ class WasmCompiledModule : public FixedArray {
MACRO(OBJECT, FixedArray, indirect_function_tables) \
MACRO(OBJECT, SeqOneByteString, module_bytes) \
MACRO(OBJECT, ByteArray, function_names) \
+ MACRO(OBJECT, Script, asm_js_script) \
+ MACRO(OBJECT, ByteArray, asm_js_offset_tables) \
MACRO(SMALL_NUMBER, uint32_t, min_memory_pages) \
MACRO(OBJECT, FixedArray, data_segments_info) \
MACRO(OBJECT, ByteArray, data_segments) \
@@ -499,6 +501,20 @@ Handle<JSFunction> WrapExportCodeAsJSFunction(Isolate* isolate,
// else.
bool IsWasmObject(Object* object);
+// Return the compiled module object for this wasm object.
+WasmCompiledModule* GetCompiledModule(JSObject* wasm);
+
+// Check whether the wasm module was generated from asm.js code.
+bool WasmIsAsmJs(Object* wasm, Isolate* isolate);
+
+// Get the script for the asm.js origin of the wasm module.
+Handle<Script> GetAsmWasmScript(Handle<JSObject> wasm);
+
+// Get the asm.js source position for the given byte offset in the given
+// function.
+int GetAsmWasmSourcePosition(Handle<JSObject> wasm, int func_index,
+ int byte_offset);
+
// Update memory references of code objects associated with the module
bool UpdateWasmModuleMemory(Handle<JSObject> object, Address old_start,
Address new_start, uint32_t old_size,
@@ -520,7 +536,8 @@ Handle<JSObject> CreateCompiledModuleObject(
V8_EXPORT_PRIVATE MaybeHandle<JSObject> CreateModuleObjectFromBytes(
Isolate* isolate, const byte* start, const byte* end, ErrorThrower* thrower,
- ModuleOrigin origin);
+ ModuleOrigin origin, Handle<Script> asm_js_script,
+ const byte* asm_offset_tables_start, const byte* asm_offset_tables_end);
V8_EXPORT_PRIVATE bool ValidateModuleBytes(Isolate* isolate, const byte* start,
const byte* end,
« no previous file with comments | « src/wasm/wasm-js.cc ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698