function luaY.open_func(g,W,w)local l=W.L local N=g:newproto(W.L)w.f=N w.prev=W.fs w.ls=W w.L=l W.fs=w w.pc=0 w.lasttarget=-1 w.jpc=luaK.NO_JUMP w.freereg=0 w.nk=0 w.np=0 w.nlocvars=0 w.nactvar=0 w.bl=nil N.source=W.source N.maxstacksize=2 w.h={}end

function luaY:open_func(ls, fs)
  local L = ls.L
  local f = self:newproto(ls.L)
  fs.f = f
  fs.prev = ls.fs  -- linked list of funcstates
  fs.ls = ls
  fs.L = L
  ls.fs = fs
  fs.pc = 0
  fs.lasttarget = -1
  fs.jpc = luaK.NO_JUMP
  fs.freereg = 0
  fs.nk = 0
  fs.np = 0
  fs.nlocvars = 0
  fs.nactvar = 0
  fs.bl = nil
  f.source = ls.source
  f.maxstacksize = 2  -- registers 0/1 are always valid
  fs.h = {}  -- constant table; was luaH_new call
  -- anchor table of constants and prototype (to avoid being collected)
  -- sethvalue2s(L, L->top, fs->h); incr_top(L); /* C */
  -- setptvalue2s(L, L->top, f); incr_top(L);
end
