mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:18:13 +00:00
LibWasm: Implement reference instructions (ref.{null,func,is_null})
This commit is contained in:
parent
7fb458b7c9
commit
56bf80251c
8 changed files with 73 additions and 9 deletions
|
@ -152,7 +152,8 @@ InstantiationResult AbstractMachine::instantiate(const Module& module, Vector<Ex
|
|||
result.values().first().value().visit(
|
||||
[&](const auto& value) { offset = value; },
|
||||
[&](const FunctionAddress&) { instantiation_result = InstantiationError { "Data segment offset returned an address" }; },
|
||||
[&](const ExternAddress&) { instantiation_result = InstantiationError { "Data segment offset returned an address" }; });
|
||||
[&](const ExternAddress&) { instantiation_result = InstantiationError { "Data segment offset returned an address" }; },
|
||||
[&](const Value::Null&) { instantiation_result = InstantiationError { "Data segment offset returned a null reference" }; });
|
||||
if (instantiation_result.has_value() && instantiation_result->is_error())
|
||||
return;
|
||||
if (main_module_instance.memories().size() <= data.index.value()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue