mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibWasm: Implement reference instructions (ref.{null,func,is_null})
This commit is contained in:
parent
7fb458b7c9
commit
56bf80251c
Notes:
sideshowbarker
2024-07-18 17:01:23 +09:00
Author: https://github.com/alimpfard
Commit: 56bf80251c
Pull-request: https://github.com/SerenityOS/serenity/pull/7670
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