From 448298e8ad8876cd376cae08b1c641c5cc155e55 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Thu, 30 Nov 2023 12:00:46 +0100 Subject: [PATCH] Homogenize TASTy printer formatting * Homogenize the formatting of section names and sizes * Homogenize indentation across sections * Add TASTy header section * Add Names section size --- compiler/src/dotty/tools/dotc/core/tasty/TastyPrinter.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TastyPrinter.scala b/compiler/src/dotty/tools/dotc/core/tasty/TastyPrinter.scala index 8950f4509d3e..de80854e8ab1 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TastyPrinter.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TastyPrinter.scala @@ -258,10 +258,10 @@ class TastyPrinter(bytes: Array[Byte]) { import reader.* sb.append(s" ${reader.endAddr.index - reader.currentAddr.index}") val attributes = new AttributeUnpickler(reader).attributes - sb.append(s" attributes bytes:\n") + sb.append(s"Attributes (${reader.endAddr.index - reader.startAddr.index} bytes, starting from $base):\n") for tag <- attributes.booleanTags do - sb.append(" ").append(attributeTagToString(tag)).append("\n") + sb.append(" ").append(attributeTagToString(tag)).append("\n") sb.result }