Names::keep kept the rendered length by the constant's own pool index.
Many ConstantValue attributes that point at distinct String constants
over one long Utf8 each rendered that Utf8 again before the budget
refused it. String, Class and MethodType constants now share the kept
length of the Utf8 they copy, so its text is built at most once past
the budget.
Names::keep now takes the render function and records the length of each
text it builds by kind and pool index. A text already measured is rendered
again only when the budget admits it, so fields that repeat one large
string constant no longer build that string for every placeholder.
Interfaces, field and method names and descriptors, signatures, constant
values, thrown and caught types, inner classes and annotation types each
copy their constant-pool text. Many entries can name one 65,535-byte Utf8,
so a class file under 100 KiB could make parse() copy gigabytes.
parse() now copies at most 64 MiB of such text per class. Past that,
names are kept as pool-index placeholders (<class#2>, <utf8#1>) and a
warning is added; every row is still listed.