This attribute stores the InlineInfo for a ClassBType as an independent classfile attribute. The compiler does so for every class being compiled.
The reason is that a precise InlineInfo can only be obtained if the symbol for a class is available. For example, we need to know if a method is final in Scala's terms, or if it has the @inline annotation. Looking up a class symbol for a given class filename is brittle (name-mangling).
The attribute is also helpful for inlining mixin methods. The mixin phase only adds mixin method symbols to classes that are being compiled. For all other class symbols, there are no mixin members. However, the inliner requires an InlineInfo for inlining mixin members. That problem is solved by reading the InlineInfo from this attribute.
In principle, we could encode the InlineInfo into a Java annotation (instead of a classfile attribute). However, an attribute allows us to save many bits. In particular, note that the strings in an InlineInfo are serialized as references to constants in the constant pool, and those strings (method names, method signatures) would exist in there anyway. So the ScalaInlineAttribute remains relatively compact.
Not sure what this method is good for, it is not invoked anywhere in the ASM framework. However, the example in the ASM manual also overrides it to false for custom attributes, so it might be a good idea.
Not sure what this method is good for, it is not invoked anywhere in the ASM framework. However, the example in the ASM manual also overrides it to false for custom attributes, so it might be a good idea.
Deserialize the attribute into an InlineInfo. The attribute starts at cr.b(off), but we don't need to access that array directly, we can use the read methods provided by the ClassReader.
Deserialize the attribute into an InlineInfo. The attribute starts at cr.b(off), but we don't need to access that array directly, we can use the read methods provided by the ClassReader.
buf is a pre-allocated character array that is guaranteed to be long enough to hold any string of the constant pool. So we can use it to invoke cr.readUTF8.