mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-08 10:59:10 +02:00
+ introduced TWasmValidationStacks.PushCtrl
This commit is contained in:
parent
18c6e13f45
commit
4cc5cf4d0e
@ -98,6 +98,8 @@ uses
|
||||
function PopVal(expect: TWasmBasicType): TWasmBasicType;
|
||||
procedure PushVals(vals: TWasmBasicTypeList);
|
||||
function PopVals(vals: TWasmBasicTypeList): TWasmBasicTypeList;
|
||||
|
||||
procedure PushCtrl(_opcode: tasmop; _in, _out: TWasmBasicTypeList);
|
||||
end;
|
||||
|
||||
twasmstruc_stack = class;
|
||||
@ -499,6 +501,22 @@ uses
|
||||
Result[I]:=PopVal(vals[I]);
|
||||
end;
|
||||
|
||||
procedure TWasmValidationStacks.PushCtrl(_opcode: tasmop; _in, _out: TWasmBasicTypeList);
|
||||
var
|
||||
frame: TWasmControlFrame;
|
||||
begin
|
||||
FillChar(frame,SizeOf(frame),0);
|
||||
with frame do
|
||||
begin
|
||||
opcode:=_opcode;
|
||||
start_types:=Copy(_in);
|
||||
end_types:=Copy(_out);
|
||||
height:=FValueStack.Count;
|
||||
unreachable:=False;
|
||||
end;
|
||||
FCtrlStack.Push(frame);
|
||||
end;
|
||||
|
||||
{ twasmstruc_stack }
|
||||
|
||||
function twasmstruc_stack.Get(Index: Integer): taicpu_wasm_structured_instruction;
|
||||
|
Loading…
Reference in New Issue
Block a user