New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
structural invocation in nsc.ast.Scanners, easy to remove performance penalty #3974
Comments
Imported From: https://issues.scala-lang.org/browse/SI-3974?orig=1 |
@paulp said: "ForkJoinPool-1-worker-3" daemon prio=5 tid=196240800 nid=0x1973de000 runnable [1973dc000]
java.lang.Thread.State: RUNNABLE
at java.util.zip.ZipFile.getNextEntry(Native Method)
at java.util.zip.ZipFile.access$$400(ZipFile.java:29)
at java.util.zip.ZipFile$$2.nextElement(ZipFile.java:313)
- locked <141623488> (a java.util.zip.ZipFile)
at java.util.zip.ZipFile$$2.nextElement(ZipFile.java:299)
at scala.tools.nsc.io.ZipArchive$$$$anon$$1$$$$anon$$2.next(ZipArchive.scala:253)
at scala.tools.nsc.io.ZipArchive$$$$anon$$1$$$$anon$$2.next(ZipArchive.scala:250)
at scala.collection.Iterator$$class.foreach(Iterator.scala:631)
at scala.tools.nsc.io.ZipArchive$$$$anon$$1$$$$anon$$2.foreach(ZipArchive.scala:250)
at scala.collection.IterableLike$$class.foreach(IterableLike.scala:79)
at scala.tools.nsc.io.ZipArchive$$$$anon$$1.foreach(ZipArchive.scala:248)
at scala.tools.nsc.io.ZipContainer$$ZipRootCreator.apply(ZipArchive.scala:145)
at scala.tools.nsc.io.ZipArchive.root(ZipArchive.scala:206)
- locked <1416234e8> (a scala.tools.nsc.io.ZipArchive)
at scala.tools.nsc.io.ZipContainer$$class.iterator(ZipArchive.scala:172)
at scala.tools.nsc.io.ZipArchive.iterator(ZipArchive.scala:199)
at scala.collection.IterableLike$$class.foreach(IterableLike.scala:79)
at scala.tools.nsc.io.AbstractFile.foreach(AbstractFile.scala:84)
at scala.collection.TraversableLike$$class.collect(TraversableLike.scala:271)
at scala.tools.nsc.io.AbstractFile.collect(AbstractFile.scala:84)
at scala.tools.nsc.util.DirectoryClassPath.classes(ClassPath.scala:315)
- locked <141623570> (a scala.tools.nsc.util.DirectoryClassPath)
at scala.tools.nsc.util.MergedClassPath$$$$anonfun$$classes$$3.apply(ClassPath.scala:342)
at scala.tools.nsc.util.MergedClassPath$$$$anonfun$$classes$$3.apply(ClassPath.scala:342)
at scala.collection.LinearSeqOptimized$$class.foreach(LinearSeqOptimized.scala:61)
at scala.collection.immutable.List.foreach(List.scala:45)
at scala.tools.nsc.util.MergedClassPath.classes(ClassPath.scala:342)
- locked <141623638> (a scala.tools.nsc.util.JavaClassPath)
at scala.tools.nsc.symtab.SymbolLoaders$$PackageLoader.doComplete(SymbolLoaders.scala:150)
at scala.tools.nsc.symtab.SymbolLoaders$$SymbolLoader.complete(SymbolLoaders.scala:58)
at scala.tools.nsc.symtab.SymbolLoaders$$SymbolLoader.complete(SymbolLoaders.scala:32)
at scala.tools.nsc.symtab.Symbols$$Symbol.info(Symbols.scala:690)
at scala.tools.nsc.symtab.Definitions$$definitions$$.init(Definitions.scala:828)
at scala.tools.nsc.Global$$Run.<init>(Global.scala:602)
at scala.tools.partest.nest.DirectCompiler.compile(CompileManager.scala:100)
at scala.tools.partest.nest.CompileManager.shouldCompile(CompileManager.scala:165)
at scala.tools.partest.nest.Worker$$$$anonfun$$runTestCommon$$1$$1$$$$anonfun$$10.apply(Worker.scala:496)
at scala.tools.partest.nest.Worker$$$$anonfun$$runTestCommon$$1$$1$$$$anonfun$$10.apply(Worker.scala:496)
at scala.tools.partest.nest.Worker$$$$anonfun$$runTestCommon$$1$$1.apply(Worker.scala:498)
at scala.tools.partest.nest.Worker$$$$anonfun$$runTestCommon$$1$$1.apply(Worker.scala:487)
at scala.tools.partest.nest.Worker.runInContext$$1(Worker.scala:432)
at scala.tools.partest.nest.Worker.runTestCommon$$1(Worker.scala:487)
at scala.tools.partest.nest.Worker.processSingleFile$$1(Worker.scala:558)
at scala.tools.partest.nest.Worker$$$$anonfun$$runTests$$2$$$$anonfun$$apply$$2.apply$$mcV$$sp(Worker.scala:1069) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There's a structural invocation in
nsc.ast.parser.Scanners
. Not sure whether there's a performance impact, but doing away with it is easy. Rather than defininglookaheadReader
(inCharArrayReader.scala
) to have a refinement type, give a name to its class:Besides that one, there are three other cases of dynamic dispatch in the compiler sources (granted,
forMSIL
without-optimize
) found after placing a breakpoint atCleanUp
on:case ad@ApplyDynamic(qual0, params) =>
The text was updated successfully, but these errors were encountered: