Differences From
Artifact [3cd51c8b03]:
54 54 do local kfac = {}
55 55 for afterseg,key in pairs(fields) do
56 56 if not kfac[key] then
57 57 rec.entries[#rec.entries + 1] = {
58 58 field = key;
59 - type = rawstring;
59 + type = lib.mem.ptr(int8);
60 60 }
61 61 end
62 62 kfac[key] = (kfac[key] or 0) + 1
63 63 end
64 64 for key, fac in pairs(kfac) do
65 65 tallyup[#tallyup + 1] = quote
66 - [runningtally] = [runningtally] + lib.str.sz([symself].[key])*fac
66 + [runningtally] = [runningtally] + ([symself].[key].ct)*fac
67 67 end
68 68 end
69 69 end
70 70
71 71 local copiers = {}
................................................................................
78 78 for idx, seg in ipairs(segs) do
79 79 copiers[#copiers+1] = quote [cpypos] = lib.mem.cpy([cpypos], [&opaque]([seg]), [#seg]) end
80 80 senders[#senders+1] = quote lib.net.mg_send([destcon], [seg], [#seg]) end
81 81 appenders[#appenders+1] = quote [accumulator]:push([seg], [#seg]) end
82 82 if fields[idx] then
83 + --local fsz = `lib.str.sz(symself.[fields[idx]])
84 + local fval = `symself.[fields[idx]].ptr
85 + local fsz = `symself.[fields[idx]].ct
83 86 copiers[#copiers+1] = quote
84 - [cpypos] = lib.mem.cpy([cpypos],
85 - [&opaque](symself.[fields[idx]]),
86 - lib.str.sz(symself.[fields[idx]]))
87 + [cpypos] = lib.mem.cpy([cpypos], [&opaque]([fval]), [fsz])
87 88 end
88 89 senders[#senders+1] = quote
89 - lib.net.mg_send([destcon],
90 - symself.[fields[idx]],
91 - lib.str.sz(symself.[fields[idx]]))
90 + lib.net.mg_send([destcon], [fval], [fsz])
91 + end
92 + appenders[#appenders+1] = quote
93 + [accumulator]:push([fval], [fsz])
92 94 end
93 95 end
94 96 end
95 97
96 98 local tid = tplspec.id or '<anonymous>'