mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 11:29:27 +02:00
+ introduced TWasmValidationStacks.PopVals
This commit is contained in:
parent
4d5479741d
commit
064adbf3f8
@ -97,6 +97,7 @@ uses
|
||||
function PopVal: TWasmBasicType;
|
||||
function PopVal(expect: TWasmBasicType): TWasmBasicType;
|
||||
procedure PushVals(vals: TWasmBasicTypeList);
|
||||
function PopVals(vals: TWasmBasicTypeList): TWasmBasicTypeList;
|
||||
end;
|
||||
|
||||
twasmstruc_stack = class;
|
||||
@ -490,6 +491,15 @@ uses
|
||||
PushVal(v);
|
||||
end;
|
||||
|
||||
function TWasmValidationStacks.PopVals(vals: TWasmBasicTypeList): TWasmBasicTypeList;
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
SetLength(Result,Length(vals));
|
||||
for I:=High(vals) downto Low(Vals) do
|
||||
Result[I]:=PopVal(vals[I]);
|
||||
end;
|
||||
|
||||
{ twasmstruc_stack }
|
||||
|
||||
function twasmstruc_stack.Get(Index: Integer): taicpu_wasm_structured_instruction;
|
||||
|
Loading…
Reference in New Issue
Block a user