Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update wavm (fix gc) #1671

Merged
merged 1 commit into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/Hunter/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ hunter_config(

hunter_config(
wavm
VERSION 1.0.6
VERSION 1.0.8
CMAKE_ARGS
TESTING=OFF
WAVM_ENABLE_FUZZ_TARGETS=OFF
Expand Down
4 changes: 2 additions & 2 deletions cmake/Hunter/hunter-gate-url.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
HunterGate(
URL "https://github.com/soramitsu/soramitsu-hunter/archive/refs/tags/v0.23.257-soramitsu51.zip"
SHA1 "1839ed95f13509c4767216ee17b9793798e08a6f"
URL "https://github.com/soramitsu/soramitsu-hunter/archive/refs/tags/v0.23.257-soramitsu52.zip"
SHA1 "80bd9c153da23e72a9be0c1762eff18399c32c08"
LOCAL
)
4 changes: 2 additions & 2 deletions core/runtime/common/runtime_instances_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ namespace kagome::runtime {
return instance_->getGlobal(name);
}

void forDataSegment(DataSegmentProcessor const &callback) const override {
void forDataSegment(const DataSegmentProcessor &callback) const override {
return instance_->forDataSegment(callback);
}

InstanceEnvironment const &getEnvironment() const override {
const InstanceEnvironment &getEnvironment() const override {
return instance_->getEnvironment();
}

Expand Down
2 changes: 1 addition & 1 deletion core/runtime/wavm/module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace kagome::runtime::wavm {
return nullptr;
}

auto imports = WAVM::Runtime::getModuleIR(module).memories.imports;
auto &imports = WAVM::Runtime::getModuleIR(module).memories.imports;
if (not imports.empty()) {
module_params.intrinsicMemoryType = imports[0].type;
}
Expand Down
10 changes: 6 additions & 4 deletions core/runtime/wavm/module_instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ namespace kagome::runtime::wavm {
std::string_view name) const {
auto global = WAVM::Runtime::asGlobalNullable(
WAVM::Runtime::getInstanceExport(instance_, name.data()));
if (global == nullptr) return std::nullopt;
if (global == nullptr) {
return std::nullopt;
}
WAVM::Runtime::GCPointer<WAVM::Runtime::Context> context =
WAVM::Runtime::createContext(compartment_->getCompartment());
auto value = WAVM::Runtime::getGlobalValue(context, global);
Expand All @@ -193,12 +195,12 @@ namespace kagome::runtime::wavm {
}

void ModuleInstanceImpl::forDataSegment(
DataSegmentProcessor const &callback) const {
const DataSegmentProcessor &callback) const {
using WAVM::Uptr;
using WAVM::IR::DataSegment;
using WAVM::IR::MemoryType;
using WAVM::IR::Value;
auto ir = getModuleIR(module_);
auto &ir = getModuleIR(module_);

for (Uptr segmentIndex = 0; segmentIndex < ir.dataSegments.size();
++segmentIndex) {
Expand All @@ -214,7 +216,7 @@ namespace kagome::runtime::wavm {
}
}

InstanceEnvironment const &ModuleInstanceImpl::getEnvironment() const {
const InstanceEnvironment &ModuleInstanceImpl::getEnvironment() const {
return env_;
}

Expand Down