mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-20 13:09:15 +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;
|
function isExplicitRef: Boolean;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TWasmInstr }
|
||||||
|
|
||||||
TWasmInstr = class(TObject)
|
TWasmInstr = class(TObject)
|
||||||
code : byte;
|
code : byte;
|
||||||
operandIdx : string;
|
operandIdx : string;
|
||||||
operandNum : integer;
|
operandNum : integer;
|
||||||
operandText : string;
|
operandText : string;
|
||||||
|
insttype : TWasmFuncType; // used by call_indirect only
|
||||||
|
function addInstType: TWasmFuncType;
|
||||||
|
destructor Destroy; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TWasmInstrList }
|
{ TWasmInstrList }
|
||||||
@ -117,6 +122,20 @@ begin
|
|||||||
l.Clear;
|
l.Clear;
|
||||||
end;
|
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 }
|
{ TWasmInstrList }
|
||||||
|
|
||||||
function TWasmInstrList.GetItem(i: integer): TWasmInstr;
|
function TWasmInstrList.GetItem(i: integer): TWasmInstr;
|
||||||
|
Loading…
Reference in New Issue
Block a user