|
@@ -101,6 +101,8 @@ uses
|
|
|
|
|
|
procedure PushCtrl(_opcode: tasmop; _in, _out: TWasmBasicTypeList);
|
|
|
function PopCtrl: TWasmControlFrame;
|
|
|
+
|
|
|
+ function label_types(const frame: TWasmControlFrame): TWasmBasicTypeList;
|
|
|
end;
|
|
|
|
|
|
twasmstruc_stack = class;
|
|
@@ -531,6 +533,14 @@ uses
|
|
|
FCtrlStack.Pop;
|
|
|
end;
|
|
|
|
|
|
+ function TWasmValidationStacks.label_types(const frame: TWasmControlFrame): TWasmBasicTypeList;
|
|
|
+ begin
|
|
|
+ if frame.opcode=a_loop then
|
|
|
+ Result:=frame.start_types
|
|
|
+ else
|
|
|
+ Result:=frame.end_types;
|
|
|
+ end;
|
|
|
+
|
|
|
{ twasmstruc_stack }
|
|
|
|
|
|
function twasmstruc_stack.Get(Index: Integer): taicpu_wasm_structured_instruction;
|