[PATCH 150/188] writing jump vector (for br_table) command

From 4f9c81a44945b02ff5f735f8ae21aafee8164d51 Mon Sep 17 00:00:00 2001
From: Dmitry Boyarintsev <skalogryz.lists@gmail.com>
Date: Thu, 26 Mar 2020 10:52:20 -0400

git-svn-id: branches/wasm@46146 -
This commit is contained in:
nickysn 2020-08-03 13:01:42 +00:00
parent eff566cc32
commit 7e64176086

View File

@ -669,6 +669,7 @@ end;
procedure TBinWriter.WriteInstList(list: TWasmInstrList; ofsAddition: LongWord);
var
i : integer;
j : integer;
ci : TWasmInstr;
idx : integer;
rt : Byte;
@ -726,6 +727,13 @@ begin
WriteU32(dst, ci.operandNum);
end;
ipJumpVec: begin
writeU32(dst, ci.vecTableCount);
for j:=0 to ci.vecTableCount-1 do
WriteU32(dst, ci.vecTable[j].idNum);
WriteU32(dst, ci.operandNum);
end;
ipResType:
dst.WriteByte(byte(ci.operandNum));
end;