mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-04 23:29:52 +00:00
LibWeb: Support wasm module instantiation using a global address
Fixes 1 WPT subtest in `wasm/core/simd`.
This commit is contained in:
parent
58c3a391a3
commit
76ee1ce04c
Notes:
github-actions[bot]
2025-07-25 13:36:40 +00:00
Author: https://github.com/gmta
Commit: 76ee1ce04c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5602
4 changed files with 42 additions and 2 deletions
|
@ -342,8 +342,11 @@ JS::ThrowCompletionOr<NonnullOwnPtr<Wasm::ModuleInstance>> instantiate_module(JS
|
|||
// 3.5.1.7. Set the surrounding agent's associated store to store.
|
||||
address = cache.abstract_machine().store().allocate({ type.type(), false }, cast_value);
|
||||
}
|
||||
// FIXME: 3.5.2. Otherwise, if v implements Global,
|
||||
// FIXME: 3.5.2.1. Let globaladdr be v.[[Global]].
|
||||
// 3.5.2. Otherwise, if v implements Global,
|
||||
else if (import_.is_object() && is<Global>(import_.as_object())) {
|
||||
// 3.5.2.1. Let globaladdr be v.[[Global]].
|
||||
address = as<Global>(import_.as_object()).address();
|
||||
}
|
||||
// 3.5.3. Otherwise,
|
||||
else {
|
||||
// 3.5.3.1. Throw a LinkError exception.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue