mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 14:59:26 +02:00
+ introduced the is_wasm_reference_type(tdef) helper
This commit is contained in:
parent
5cc4096f41
commit
1f76366125
@ -211,6 +211,9 @@ const
|
||||
{# Returns true if p is a WebAssembly externref reference type }
|
||||
function is_wasm_externref(p : tdef): boolean;
|
||||
|
||||
{# Returns true if p is a WebAssembly reference type (funcref or externref) }
|
||||
function is_wasm_reference_type(p : tdef): boolean;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
@ -233,6 +236,11 @@ implementation
|
||||
result:=(p.typ=pointerdef) and (tcpupointerdef(p).is_wasm_externref);
|
||||
end;
|
||||
|
||||
function is_wasm_reference_type(p: tdef): boolean;
|
||||
begin
|
||||
result:=is_wasm_funcref(p) or is_wasm_externref(p);
|
||||
end;
|
||||
|
||||
|
||||
{****************************************************************************
|
||||
tcpuproptertysym
|
||||
|
Loading…
Reference in New Issue
Block a user