@@ -664,11 +664,17 @@ class ClassfileParser(
664664 i < attrs
665665 }
666666
667- def unpickle (bytes : Array [Byte ]): Boolean = {
667+ def unpickleScala (bytes : Array [Byte ]): Boolean = {
668668 new UnPickler (bytes, classRoot, moduleRoot)(ctx).run()
669669 true
670670 }
671671
672+ def unpickleTASTY (bytes : Array [Byte ]): Boolean = {
673+ new DottyUnpickler (bytes)
674+ .enter(roots = Set (classRoot, moduleRoot, moduleRoot.sourceModule))
675+ true
676+ }
677+
672678 def parseScalaSigBytes : Array [Byte ] = {
673679 val tag = in.nextByte.toChar
674680 assert(tag == STRING_TAG , tag)
@@ -688,6 +694,11 @@ class ClassfileParser(
688694 pool.getBytes(entries.toList)
689695 }
690696
697+ if (scan(tpnme.TASTYATTR )) {
698+ val attrLen = in.nextInt
699+ return unpickleTASTY(in.nextBytes(attrLen))
700+ }
701+
691702 if (scan(tpnme.RuntimeAnnotationATTR )) {
692703 val attrLen = in.nextInt
693704 val nAnnots = in.nextChar
@@ -698,12 +709,16 @@ class ClassfileParser(
698709 var j = 0
699710 while (j < nArgs) {
700711 val argName = pool.getName(in.nextChar)
701- if (attrClass == defn.ScalaSignatureAnnot && argName == nme.bytes)
702- return unpickle(parseScalaSigBytes)
703- else if (attrClass == defn.ScalaLongSignatureAnnot && argName == nme.bytes)
704- return unpickle(parseScalaLongSigBytes)
705- else
706- parseAnnotArg(skip = true )
712+ if (argName == nme.bytes)
713+ if (attrClass == defn.ScalaSignatureAnnot )
714+ return unpickleScala(parseScalaSigBytes)
715+ else if (attrClass == defn.ScalaLongSignatureAnnot )
716+ return unpickleScala(parseScalaLongSigBytes)
717+ else if (attrClass == defn.TASTYSignatureAnnot )
718+ return unpickleTASTY(parseScalaSigBytes)
719+ else if (attrClass == defn.TASTYLongSignatureAnnot )
720+ return unpickleTASTY(parseScalaLongSigBytes)
721+ parseAnnotArg(skip = true )
707722 j += 1
708723 }
709724 i += 1
0 commit comments