1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 01:17:36 +00:00

LibWasm: Implement memory.init and passive mode data

This commit is contained in:
Ali Mohammad Pur 2021-12-04 17:56:58 +03:30 committed by Ali Mohammad Pur
parent aff2c59f37
commit b5ca290605
5 changed files with 88 additions and 11 deletions

View file

@ -103,6 +103,9 @@ ErrorOr<void, ValidationError> Validator::validate(Module& module)
for (auto& segment : section.segments())
m_context.elements.unchecked_append(segment.type);
});
module.for_each_section_of_type<DataSection>([this](DataSection const& section) {
m_context.datas.resize(section.data().size());
});
// FIXME: C.refs is the set funcidx(module with funcs=ϵ with start=ϵ),
// i.e., the set of function indices occurring in the module, except in its functions or start function.