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

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

Issue 2230063002: [wasm] Experimental: Add support for multiple non-homogeneous tables Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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-macro-gen.h ('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 71156ad1096770bdd2b90a31e22b773d1131de99..f443a03eeb504258629b6249d9d13eeed7e7d58f 100644
--- a/src/wasm/wasm-module.h
+++ b/src/wasm/wasm-module.h
@@ -151,6 +151,9 @@ struct WasmDataSegment {
// Static representation of a wasm indirect call table.
struct WasmIndirectFunctionTable {
+ bool isDefault; // true if table should be used as default.
+ FunctionSig* sig; // signature of the table.
+ uint32_t sig_index; // index into the signature table.
uint32_t size; // initial table size.
uint32_t max_size; // maximum table size.
std::vector<uint16_t> values; // function table.
@@ -307,6 +310,10 @@ struct ModuleEnv {
DCHECK(IsValidImport(index));
return module->import_table[index].sig;
}
+ FunctionSig* GetTableSignature(uint32_t index) {
+ DCHECK(IsValidSignature(index));
+ return module->function_tables[index].sig;
+ }
FunctionSig* GetSignature(uint32_t index) {
DCHECK(IsValidSignature(index));
return module->signatures[index];
@@ -396,6 +403,8 @@ Handle<FixedArray> BuildFunctionTable(Isolate* isolate, uint32_t index,
void PopulateFunctionTable(Handle<FixedArray> table, uint32_t table_size,
const std::vector<Handle<Code>>* code_table);
+bool isAnyFuncType(FunctionSig* sig);
+
namespace testing {
// Decode, verify, and run the function labeled "main" in the
« no previous file with comments | « src/wasm/wasm-macro-gen.h ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698