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:
parent
aff2c59f37
commit
b5ca290605
5 changed files with 88 additions and 11 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue