You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error: could not find init in: abc.A.f
error: scala.reflect.internal.FatalError:
could not find init in: abc.A.f
whilecompiling: OptimizerCrash.scala
during phase: dce
[..]
==Source file context for tree position ==11 }
12deff:Boolean= {
13 mapp (_ =>returnfalse)
14true15 }
16 }
at scala.reflect.internal.SymbolTable.abort(SymbolTable.scala:57)
at scala.tools.nsc.Global.abort(Global.scala:268)
at scala.tools.nsc.backend.opt.DeadCodeElimination$DeadCode.scala$tools$nsc$backend$opt$DeadCodeElimination$DeadCode$$findInstruction(DeadCodeElimination.scala:432)
at scala.tools.nsc.backend.opt.DeadCodeElimination$DeadCode.mark(DeadCodeElimination.scala:261)
at scala.tools.nsc.backend.opt.DeadCodeElimination$DeadCode.dieCodeDie(DeadCodeElimination.scala:103)
at scala.tools.nsc.backend.opt.DeadCodeElimination$DeadCode$$anonfun$analyzeClass$2.apply(DeadCodeElimination.scala:60)
at scala.tools.nsc.backend.opt.DeadCodeElimination$DeadCode$$anonfun$analyzeClass$2.apply(DeadCodeElimination.scala:58)
The text was updated successfully, but these errors were encountered:
@gkossakowski said (edited on Feb 25, 2014 12:27:07 AM UTC):
Things go south in inliner, if you check icode after inliner phase (with -Xprint-icode) you'll see:
classAextendsObject {
// fields:// methodsdefmapp(f: Function1 (REF(traitFunction1))):Object {
locals: value f
startBlock: 1blocks: [1]
1:8NEWREF(classBar)
8DUP(REF(classBar))
8LOAD_LOCAL(value f)
8CONSTANT(null)
8CALL_METHOD scala.Function1.apply (dynamic)
8CALL_METHOD abc.Bar.<init> (static-instance)
8RETURN(REF(classObject))
deff():Boolean {
[...]
9:11NEWREF(classBar)
11DUP(REF(classBar))
11LOAD_LOCAL(variable f1)
11CONSTANT(null)
// whoops, where are my two method calls that should be copied from block 1 seen above?11STORE_LOCAL(variable v11)
11STORE_LOCAL(variable $inlThis2)
11JUMP11
Rex ran into it while working on optimizing List operations. Minimized version looks like this:
when compiled with
-optimize
we get:The text was updated successfully, but these errors were encountered: