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

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

Issue 1744713003: [wasm] Add an export table. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/module-decoder.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 5f5777cebebe4c5a865aaa11dd37472eb61ea3f5..a05dd393bc412bcf7c36a94bd26d6de856d85b64 100644
--- a/src/wasm/wasm-module.h
+++ b/src/wasm/wasm-module.h
@@ -33,6 +33,7 @@ enum WasmSectionDeclCode {
kDeclEnd = 0x06,
kDeclStartFunction = 0x07,
kDeclImportTable = 0x08,
+ kDeclExportTable = 0x09,
kDeclWLL = 0x11,
};
@@ -74,6 +75,12 @@ struct WasmImport {
uint32_t function_name_offset; // offset in module bytes of the import name.
};
+// Static representation of an exported WASM function.
+struct WasmExport {
+ uint16_t func_index; // index into the function table.
+ uint32_t name_offset; // offset in module bytes of the name to export.
+};
+
// Static representation of a wasm global variable.
struct WasmGlobal {
uint32_t name_offset; // offset in the module bytes of the name, if any.
@@ -110,6 +117,7 @@ struct WasmModule {
std::vector<WasmDataSegment>* data_segments; // data segments in this module.
std::vector<uint16_t>* function_table; // function table.
std::vector<WasmImport>* import_table; // import table.
+ std::vector<WasmExport>* export_table; // export table.
WasmModule();
~WasmModule();
« no previous file with comments | « src/wasm/module-decoder.cc ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698