mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-21 01:49:08 +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 }
|
{# Returns true if p is a WebAssembly externref reference type }
|
||||||
function is_wasm_externref(p : tdef): boolean;
|
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
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
@ -233,6 +236,11 @@ implementation
|
|||||||
result:=(p.typ=pointerdef) and (tcpupointerdef(p).is_wasm_externref);
|
result:=(p.typ=pointerdef) and (tcpupointerdef(p).is_wasm_externref);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function is_wasm_reference_type(p: tdef): boolean;
|
||||||
|
begin
|
||||||
|
result:=is_wasm_funcref(p) or is_wasm_externref(p);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
tcpuproptertysym
|
tcpuproptertysym
|
||||||
|
Loading…
Reference in New Issue
Block a user