mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-10 16:06:22 +02:00
+ introduced TWasmValidationStacks.PopCtrl
This commit is contained in:
parent
4cb97dcdb3
commit
f3e667da42
@ -100,6 +100,7 @@ uses
|
||||
function PopVals(vals: TWasmBasicTypeList): TWasmBasicTypeList;
|
||||
|
||||
procedure PushCtrl(_opcode: tasmop; _in, _out: TWasmBasicTypeList);
|
||||
function PopCtrl: TWasmControlFrame;
|
||||
end;
|
||||
|
||||
twasmstruc_stack = class;
|
||||
@ -518,6 +519,18 @@ uses
|
||||
FCtrlStack.Push(frame);
|
||||
end;
|
||||
|
||||
function TWasmValidationStacks.PopCtrl: TWasmControlFrame;
|
||||
begin
|
||||
FillChar(Result,SizeOf(Result),0);
|
||||
if FCtrlStack.Count=0 then
|
||||
internalerror(2024013106);
|
||||
Result:=FCtrlStack[0];
|
||||
PopVals(Result.end_types);
|
||||
if FValueStack.Count<>Result.height then
|
||||
internalerror(2024013107);
|
||||
FCtrlStack.Pop;
|
||||
end;
|
||||
|
||||
{ twasmstruc_stack }
|
||||
|
||||
function twasmstruc_stack.Get(Index: Integer): taicpu_wasm_structured_instruction;
|
||||
|
Loading…
Reference in New Issue
Block a user