mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 16:16:43 +00:00
LibWasm+LibWeb: Allow tables to have externrefs in the JS API
This commit is contained in:
parent
fc83653f3c
commit
4e7d3026d2
Notes:
github-actions[bot]
2024-08-18 21:36:13 +00:00
Author: https://github.com/dzfrias
Commit: 4e7d3026d2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1105
Reviewed-by: https://github.com/alimpfard
8 changed files with 56 additions and 13 deletions
|
@ -74,9 +74,25 @@ private:
|
|||
|
||||
class Value {
|
||||
public:
|
||||
Value()
|
||||
explicit Value(ValueType type)
|
||||
: m_value(u128())
|
||||
{
|
||||
switch (type.kind()) {
|
||||
case ValueType::I32:
|
||||
case ValueType::I64:
|
||||
case ValueType::F32:
|
||||
case ValueType::F64:
|
||||
case ValueType::V128:
|
||||
break;
|
||||
case ValueType::FunctionReference:
|
||||
// ref.null funcref
|
||||
m_value = u128(0, 2);
|
||||
break;
|
||||
case ValueType::ExternReference:
|
||||
// ref.null externref
|
||||
m_value = u128(0, 3);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue