|
@@ -95,6 +95,7 @@ uses
|
|
|
|
|
|
procedure PushVal(vt: TWasmBasicType);
|
|
|
function PopVal: TWasmBasicType;
|
|
|
+ function PopVal(expect: TWasmBasicType): TWasmBasicType;
|
|
|
end;
|
|
|
|
|
|
twasmstruc_stack = class;
|
|
@@ -473,6 +474,13 @@ uses
|
|
|
Result:=FValueStack.Pop;
|
|
|
end;
|
|
|
|
|
|
+ function TWasmValidationStacks.PopVal(expect: TWasmBasicType): TWasmBasicType;
|
|
|
+ begin
|
|
|
+ Result:=PopVal;
|
|
|
+ if (Result<>expect) and (Result<>wbt_Unknown) and (expect<>wbt_Unknown) then
|
|
|
+ internalerror(2024013105);
|
|
|
+ end;
|
|
|
+
|
|
|
{ twasmstruc_stack }
|
|
|
|
|
|
function twasmstruc_stack.Get(Index: Integer): taicpu_wasm_structured_instruction;
|