[PATCH 047/188] adding type for a wasm instruction

From 327446334d76d0c0c242259447b031766e4373c1 Mon Sep 17 00:00:00 2001
From: Dmitry Boyarintsev <skalogryz.lists@gmail.com>
Date: Thu, 21 Nov 2019 10:24:50 -0500

git-svn-id: branches/wasm@46043 -
This commit is contained in:
nickysn 2020-08-03 12:59:34 +00:00
parent 81a013c03a
commit 160b9a3e92

View File

@ -37,11 +37,16 @@ type
function isExplicitRef: Boolean;
end;
{ TWasmInstr }
TWasmInstr = class(TObject)
code : byte;
operandIdx : string;
operandNum : integer;
operandText : string;
insttype : TWasmFuncType; // used by call_indirect only
function addInstType: TWasmFuncType;
destructor Destroy; override;
end;
{ TWasmInstrList }
@ -117,6 +122,20 @@ begin
l.Clear;
end;
{ TWasmInstr }
function TWasmInstr.addInstType: TWasmFuncType;
begin
if insttype=nil then insttype := TWasmFuncType.Create;
result:=insttype;
end;
destructor TWasmInstr.Destroy;
begin
insttype.Free;
inherited Destroy;
end;
{ TWasmInstrList }
function TWasmInstrList.GetItem(i: integer): TWasmInstr;