MCPcopy Index your code
hub / github.com/Hiro420/NikkeTools / write_debug

Method write_debug

UnLuac/src/unluac/parse/LFunctionType.java:383–403  ·  view source on GitHub ↗
(OutputStream out, BHeader header, LFunction object)

Source from the content-addressed store, hash-verified

381 }
382
383 @Override
384 protected void write_debug(OutputStream out, BHeader header, LFunction object) throws IOException {
385 header.integer.write(out, header, new BInteger(object.lines.length));
386 for(int i = 0; i < object.lines.length; i++) {
387 out.write(object.lines[i]);
388 }
389 header.abslineinfo.writeList(out, header, object.abslineinfo);
390 header.local.writeList(out, header, object.locals);
391 int upvalueNameLength = 0;
392 for(LUpvalue upvalue : object.upvalues) {
393 if(upvalue.bname != null) {
394 upvalueNameLength++;
395 } else {
396 break;
397 }
398 }
399 header.integer.write(out, header, new BInteger(upvalueNameLength));
400 for(int i = 0; i < upvalueNameLength; i++) {
401 header.string.write(out, header, object.upvalues[i].bname);
402 }
403 }
404
405 protected void parse_main(ByteBuffer buffer, BHeader header, LFunctionParseState s) {
406 s.name = header.string.parse(buffer, header);

Callers 1

writeMethod · 0.95

Calls 2

writeListMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected