function luaU.DumpConstants(q,a,U)local y=a.sizek q:DumpInt(y,U)for y=0,y-1,1 do local i=a.k[y]local T=q:ttype(i)q:DumpChar(T,U)if T==q.LUA_TNIL then elseif T==q.LUA_TBOOLEAN then q:DumpChar(i.value and 1 or 0,U)elseif T==q.LUA_TNUMBER then q:DumpNumber(i.value,U)elseif T==q.LUA_TSTRING then q:DumpString(i.value,U)else end end y=a.sizep q:DumpInt(y,U)for y=0,y-1,1 do q:DumpFunction(a.p[y],a.source,U)end end

function luaU:DumpConstants(f, D)
  local n = f.sizek
  self:DumpInt(n, D)
  for i = 0, n - 1 do
    local o = f.k[i]  -- TValue
    local tt = self:ttype(o)
    self:DumpChar(tt, D)
    if tt == self.LUA_TNIL then
    elseif tt == self.LUA_TBOOLEAN then
      self:DumpChar(o.value and 1 or 0, D)
    elseif tt == self.LUA_TNUMBER then
      self:DumpNumber(o.value, D)
    elseif tt == self.LUA_TSTRING then
      self:DumpString(o.value, D)
    else
      --lua_assert(0)  -- cannot happen
    end
  end
  n = f.sizep
  self:DumpInt(n, D)
  for i = 0, n - 1 do
    self:DumpFunction(f.p[i], f.source, D)
  end
end
