mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-04 08:36:12 +00:00
LibWeb: Add WebAssembly.Global and exports support for global instances
This commit is contained in:
parent
910ff8b694
commit
44e3817219
Notes:
github-actions[bot]
2024-12-24 14:21:40 +00:00
Author: https://github.com/ADKaster
Commit: 44e3817219
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3028
10 changed files with 268 additions and 4 deletions
24
Libraries/LibWeb/WebAssembly/Global.idl
Normal file
24
Libraries/LibWeb/WebAssembly/Global.idl
Normal file
|
@ -0,0 +1,24 @@
|
|||
// https://webassembly.github.io/spec/js-api/#enumdef-valuetype
|
||||
enum ValueType {
|
||||
"i32",
|
||||
"i64",
|
||||
"f32",
|
||||
"f64",
|
||||
"v128",
|
||||
"externref",
|
||||
"anyfunc",
|
||||
};
|
||||
|
||||
// https://webassembly.github.io/spec/js-api/#dictdef-globaldescriptor
|
||||
dictionary GlobalDescriptor {
|
||||
required ValueType value;
|
||||
boolean mutable = false;
|
||||
};
|
||||
|
||||
// https://webassembly.github.io/spec/js-api/#global
|
||||
[LegacyNamespace=WebAssembly, Exposed=*]
|
||||
interface Global {
|
||||
constructor(GlobalDescriptor descriptor, optional any v);
|
||||
any valueOf();
|
||||
attribute any value;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue