File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
compiler/src/dotty/tools/dotc/core/classfile Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -50,11 +50,6 @@ object ClassfileParser {
5050 mapOver(tp)
5151 }
5252 }
53-
54- def withReader [T ](classfile : AbstractFile )(op : DataReader ?=> T )(using Context ): T =
55- ctx.base.reusableDataReader.using { reader =>
56- op(using reader.reset(classfile))
57- }
5853}
5954
6055class ClassfileParser (
@@ -86,11 +81,14 @@ class ClassfileParser(
8681 private def mismatchError (className : SimpleName ) =
8782 throw new IOException (s " class file ' ${classfile.canonicalPath}' has location not matching its contents: contains class $className" )
8883
89- def run ()(using Context ): Option [Embedded ] = try withReader(classfile) { (using in) =>
84+ def run ()(using Context ): Option [Embedded ] = try ctx.base.reusableDataReader.using { reader =>
85+ implicit val reader2 = reader.reset(classfile)
9086 report.debuglog(" [class] >> " + classRoot.fullName)
9187 parseHeader()
9288 this .pool = new ConstantPool
93- parseClass()
89+ val res = parseClass()
90+ this .pool = null
91+ res
9492 }
9593 catch {
9694 case e : RuntimeException =>
You can’t perform that action at this time.
0 commit comments