File tree 1 file changed +8
-1
lines changed
compiler/src/dotty/tools/dotc/core/classfile
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -627,6 +627,14 @@ class ClassfileParser(
627
627
None // ignore malformed annotations
628
628
}
629
629
630
+ /** A completer for attributes
631
+ *
632
+ * Top-level classes complete attributes eagerly, while members complete azily.
633
+ *
634
+ * Note that we cannot simply store the bytes of attributes, as the bytes may
635
+ * contain references to the constant pool, where the constants are loaded
636
+ * lazily.
637
+ */
630
638
class AttributeCompleter (sym : Symbol ) {
631
639
var sig : String = null
632
640
var constant : Constant = null
@@ -659,7 +667,6 @@ class ClassfileParser(
659
667
}
660
668
}
661
669
662
- // invariant: `in` and `ctx` should not be captured inside the result function
663
670
def parseAttributes (sym : Symbol )(using ctx : Context , in : DataReader ): AttributeCompleter = {
664
671
val res = new AttributeCompleter (sym)
665
672
You can’t perform that action at this time.
0 commit comments