Lines Matching full:local
1 local N = require("flatbuffers.numTypes")
2 local ba = require("flatbuffers.binaryarray")
3 local compat = require("flatbuffers.compat")
5 local m = {}
7 local mt = {}
10 local VOffsetT = N.VOffsetT
11 local UOffsetT = N.UOffsetT
12 local SOffsetT = N.SOffsetT
13 local Bool = N.Bool
14 local Uint8 = N.Uint8
15 local Uint16 = N.Uint16
16 local Uint32 = N.Uint32
17 local Uint64 = N.Uint64
18 local Int8 = N.Int8
19 local Int16 = N.Int16
20 local Int32 = N.Int32
21 local Int64 = N.Int64
22 local Float32 = N.Float32
23 local Float64 = N.Float64
25 local MAX_BUFFER_SIZE = 0x80000000 -- 2 GB
26 local VtableMetadataFields = 2
28 local getAlignSize = compat.GetAlignSize
30 local function vtableEqual(a, objectStart, b)
37 local x = string.unpack(VOffsetT.packFmt, b, 1 + (i - 1) * VOffsetT.bytewidth)
39 local y = objectStart - elem
50 local o =
75 local vtable = {}
88 local objectOffset = self:Offset()
90 local exisitingVTable
91 local i = #self.vtables
102 local vt2Offset = self.vtables[i]
103 local vt2Start = #self.bytes - vt2Offset
104 local vt2lenstr = self.bytes:Slice(vt2Start, vt2Start+1)
105 local vt2Len = string.unpack(VOffsetT.packFmt, vt2lenstr, 1)
107 local metadata = VtableMetadataFields * VOffsetT.bytewidth
108 local vt2End = vt2Start + vt2Len
109 local vt2 = self.bytes:Slice(vt2Start+metadata,vt2End)
122 local off = 0
123 local a = self.currentVTable[i]
132 local objectSize = objectOffset - self.objectEnd
135 local vBytes = #self.currentVTable + VtableMetadataFields
139 local objectStart = #self.bytes - objectOffset
144 local objectStart = #self.bytes - objectOffset
159 local function growByteBuffer(self, desiredSize)
160 local s = #self.bytes
162 local newsize = s
182 local h = self.head - n -- UInt8
193 local h = self.head
195 local k = #self.bytes - h + additionalBytes
196 local alignsize = ((~k) + 1) & (size - 1) -- getAlignSize(k, size)
198 local desiredSize = alignsize + size + additionalBytes
201 local oldBufSize = #self.bytes
203 local updatedHead = self.head + #self.bytes - oldBufSize
213 local off2 = self:Offset() - off + SOffsetT.bytewidth
219 local soffset = self:Offset()
221 local off2 = soffset - off + UOffsetT.bytewidth
252 local l = #s
265 local l = #x
279 local function finish(self, rootTable, sizePrefix)
281 local prepSize = UOffsetT.bytewidth
289 local size = #self.bytes - self.head
363 local d = flags:EnforceNumberAndPack(x)
364 local h = self.head - flags.bytewidth