mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 22:49:37 +02:00
[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:
parent
81a013c03a
commit
160b9a3e92
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user