@Override void o_WriteSummaryTo(final AvailObject object, final JSONWriter writer) { writer.startObject(); writer.write("kind"); writer.write("function implementation"); writer.write("outers"); writer.write(object.slot(NUM_OUTERS)); writer.write("arguments"); writer.write(object.slot(NUM_ARGS)); writer.write("locals"); writer.write(object.slot(NUM_LOCALS)); writer.write("maximum stack depth"); writer.write(object.slot(FRAME_SLOTS)); writer.write("nybbles"); object.slot(NYBBLES).writeTo(writer); writer.write("function type"); object.slot(FUNCTION_TYPE).writeSummaryTo(writer); writer.write("method"); object.methodName().writeTo(writer); writer.write("module"); object.module().moduleName().writeTo(writer); writer.write("starting line number"); writer.write(object.startingLineNumber()); writer.write("literals"); writer.startArray(); for (int i = 1, limit = object.variableObjectSlotsCount(); i <= limit; i++) { A_BasicObject literal = object.slot(LITERAL_AT_, i); if (literal.equalsNil()) { literal = IntegerDescriptor.zero(); } literal.writeSummaryTo(writer); } writer.endArray(); writer.endObject(); }
@Override String o_NameForDebugger(final AvailObject object) { return super.o_NameForDebugger(object) + ": " + object.methodName(); }