mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
LibWasm: Implement reference instructions (ref.{null,func,is_null})
This commit is contained in:
committed by
Ali Mohammad Pur
parent
7fb458b7c9
commit
56bf80251c
Notes:
sideshowbarker
2024-07-18 17:01:23 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/56bf80251c1 Pull-request: https://github.com/SerenityOS/serenity/pull/7670
@@ -262,7 +262,10 @@ JS::Value to_js_value(Wasm::Value& wasm_value, JS::GlobalObject& global_object)
|
||||
case Wasm::ValueType::FunctionReference:
|
||||
// FIXME: What's the name of a function reference that isn't exported?
|
||||
return create_native_function(wasm_value.to<Wasm::FunctionAddress>().value(), "FIXME_IHaveNoIdeaWhatThisShouldBeCalled", global_object);
|
||||
case Wasm::ValueType::NullFunctionReference:
|
||||
return JS::js_null();
|
||||
case Wasm::ValueType::ExternReference:
|
||||
case Wasm::ValueType::NullExternReference:
|
||||
TODO();
|
||||
}
|
||||
VERIFY_NOT_REACHED();
|
||||
@@ -304,6 +307,8 @@ Optional<Wasm::Value> to_webassembly_value(JS::Value value, const Wasm::ValueTyp
|
||||
}
|
||||
case Wasm::ValueType::FunctionReference:
|
||||
case Wasm::ValueType::ExternReference:
|
||||
case Wasm::ValueType::NullFunctionReference:
|
||||
case Wasm::ValueType::NullExternReference:
|
||||
TODO();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user