[PATCH 086/188] extend utils for writing LEB values

From f03c74cbd6f51e882efc571e7ee2b50575774c37 Mon Sep 17 00:00:00 2001
From: Dmitry Boyarintsev <skalogryz.lists@gmail.com>
Date: Mon, 9 Mar 2020 16:03:54 -0400

git-svn-id: branches/wasm@46082 -
This commit is contained in:
nickysn 2020-08-03 13:00:19 +00:00
parent 38cd70cae5
commit df750c92a0

View File

@ -10,10 +10,13 @@ function ReadS(src: TStream; bits: Integer): Int64;
procedure WriteU(src: TStream; vl: UInt64; bits: integer; fixedSize: Boolean = false);
procedure WriteS(src: TStream; vl: Int64; bits: integer);
procedure WriteU64(src: TStream; vl: UInt64);
procedure WriteU32(src: TStream; vl: UInt32);
procedure WriteU16(src: TStream; vl: UInt16);
procedure WriteU8(src: TStream; vl: UInt8);
procedure WriteS64(src: TStream; vl: Int64);
implementation
function ReadU(src: TStream): UInt64;
@ -112,6 +115,11 @@ begin
WriteU(src, vl, sizeof(vl)*8);
end;
procedure WriteU64(src: TStream; vl: UInt64);
begin
WriteU(src, vl, sizeof(vl)*8);
end;
procedure WriteU16(src: TStream; vl: UInt16);
begin
WriteU(src, vl, sizeof(vl)*8);
@ -122,4 +130,9 @@ begin
WriteU(src, vl, sizeof(vl)*8);
end;
procedure WriteS64(src: TStream; vl: Int64);
begin
WriteS(src, vl, sizeof(vl)*8);
end;
end.