public LPrototype loadFunction(LString p) throws IOException { LPrototype f = new LPrototype(); // this.L.push(f); f.source = loadString(); if (f.source == null) f.source = p; f.linedefined = loadInt(); f.lastlinedefined = loadInt(); f.nups = is.readUnsignedByte(); f.numparams = is.readUnsignedByte(); f.is_vararg = is.readUnsignedByte(); f.maxstacksize = is.readUnsignedByte(); f.code = loadIntArray(); loadConstants(f); loadDebug(f); // TODO: add check here, for debugging purposes, I believe // see ldebug.c // IF (!luaG_checkcode(f), "bad code"); // this.L.pop(); return f; }