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
generation of unreachable bytecode #7006
Comments
Imported From: https://issues.scala-lang.org/browse/SI-7006?orig=1
|
@JamesIry said: An alternative would be to lift finally blocks into methods, but that would mean boxing mutable variables and we'd need a heuristic to decide when one alternative was better than the other. I'm investigation why we spit out so many nops and what it would take to avoid them during non-optimized builds. It's definitely feasible to drop them in the optimizer, but it would be nicer to just not have them. |
@magarciaEPFL said:
Excerpt from https://github.com/magarciaEPFL/scala/blob/GenRefactored/src/compiler/scala/tools/nsc/backend/jvm/BCodeOptIntra.scala The ASM visitors used in |
@JamesIry said: |
scalac generates bytecode which is unreachable. This problem affects performance.
I am enclosing two example:
1 - Look at method Test.crazy. From bytecode 68 to 76.
2 - Look at method KevoreeLazyJarResources.loadJar(jarFile:String). From 148 to 159.
I realized this because I am extending a JVM. The code run with JavaHotSpot but any way, this is not correct. The really weird is that in former case a lot of nop are generated. however, in the latter case it looks like if some code is duplicated. Maybe a potential source of bug
The text was updated successfully, but these errors were encountered: