diff options
-rw-r--r-- | src/ir/module-splitting.cpp | 3 | ||||
-rw-r--r-- | src/ir/table-utils.h | 2 | ||||
-rw-r--r-- | src/wasm.h | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/src/ir/module-splitting.cpp b/src/ir/module-splitting.cpp index 68496045f..7f12269f8 100644 --- a/src/ir/module-splitting.cpp +++ b/src/ir/module-splitting.cpp @@ -247,6 +247,9 @@ TableSlotManager::Slot TableSlotManager::getSlot(RefFunc* entry) { addSlot(entry->func, newSlot); if (activeTable->initial <= newSlot.index) { activeTable->initial = newSlot.index + 1; + if (module.dylinkSection) { + module.dylinkSection->tableSize = activeTable->initial; + } } if (activeTable->max <= newSlot.index) { activeTable->max = newSlot.index + 1; diff --git a/src/ir/table-utils.h b/src/ir/table-utils.h index d2f90626a..59d7cc3df 100644 --- a/src/ir/table-utils.h +++ b/src/ir/table-utils.h @@ -88,7 +88,7 @@ inline Index append(Table& table, Name name, Module& wasm) { auto* func = wasm.getFunctionOrNull(name); assert(func != nullptr && "Cannot append non-existing function to a table."); segment->data.push_back(Builder(wasm).makeRefFunc(name, func->sig)); - table.initial = table.initial + 1; + table.initial++; return tableIndex; } diff --git a/src/wasm.h b/src/wasm.h index 050240333..fb1396f19 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -55,7 +55,7 @@ struct Address { return *this; } operator address64_t() const { return addr; } - Address& operator++() { + Address& operator++(int) { ++addr; return *this; } |