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
There doesn't seem to exist a single test for these different structural dispatch implementations. no-cache and mono-cache seem to work (only did some superficial testing), but invoke-dynamic fails:
scala -Ystruct-dispatch:invoke-dynamic
Welcome to Scala version 2.11.0-20130424-145255-b291e28c75 (OpenJDK64-BitServerVM, Java1.7.0_21).
Type in expressions to have them evaluated.
Type:help for more information.
scala>typeFoo=AnyRef { deffoo:Int }
defined typealiasFoo
scala>defgetFoo(foo: Foo) = foo.foo
error:whilecompiling: <console>
during phase: icode
library version: version 2.11.0-20130424-145255-b291e28c75
compiler version: version 2.11.0-20130424-145255-b291e28c75
reconstructed args: -Ystruct-dispatch:invoke-dynamic
last tree to typer: ApplyDynamic(method foo)
symbol: method foo (flags: <method> <deferred> <triedcooking>)
symbol definition: deffoo():Inttpe: Int
symbol owners: method foo -> $line4 ->package$line4
context owners: objectiw->package$line5==Enclosing template or block ==Template( // val <local $iw>: <notype>, tree.tpe=type"java.lang.Object"// parentsValDef(
private"_"
<tpt>
<empty>
)
DefDef( // def <init>(): type
<method>
"<init>"
[]
List(Nil)
<tpt> // tree.tpe=typeBlock( // tree.tpe=UnitApply( // def <init>(): Object in class Object, tree.tpe=Object
iw.super."<init>"// def <init>(): Object in class Object, tree.tpe=()ObjectNil
)
()
)
)
)
==Expandedtypeof tree ==TypeRef(TypeSymbol(finalabstractclassIntextends ))
uncaught exception during compilation: RuntimeException("No invokedynamic support yet.") @ scala.sys.package$.error(package.scala:27)
java.lang.RuntimeException:No invokedynamic support yet.
at scala.sys.package$.error(package.scala:27)
at scala.tools.nsc.backend.icode.GenICode$ICodePhase.scala$tools$nsc$backend$icode$GenICode$ICodePhase$$genLoad(GenICode.scala:815)
at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:122)
at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:70)
at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:147)
at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:97)
at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:70)
at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:88)
at scala.tools.nsc.backend.icode.GenICode$ICodePhase.gen(GenICode.scala:66)
at scala.tools.nsc.backend.icode.GenICode$ICodePhase.apply(GenICode.scala:62)
at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:413)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:380)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:380)
at scala.collection.Iterator$class.foreach(Iterator.scala:743)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1174)
at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:380)
at scala.tools.nsc.backend.icode.GenICode$ICodePhase.run(GenICode.scala:55)
at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1518)
at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1493)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:1489)
at scala.tools.nsc.interpreter.IMain.compileSourcesKeepingRun(IMain.scala:408)
at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.compileAndSaveRun(IMain.scala:820)
at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.compile(IMain.scala:779)
at scala.tools.nsc.interpreter.IMain$Request.compile$lzycompute(IMain.scala:924)
at scala.tools.nsc.interpreter.IMain$Request.compile(IMain.scala:919)
at scala.tools.nsc.interpreter.IMain.compile(IMain.scala:550)
at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:538)
at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:536)
at scala.tools.nsc.interpreter.ILoop.reallyInterpret$1(ILoop.scala:566)
at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:611)
at scala.tools.nsc.interpreter.ILoop.command(ILoop.scala:523)
at scala.tools.nsc.interpreter.ILoop.processLine(ILoop.scala:379)
at scala.tools.nsc.interpreter.ILoop.loop(ILoop.scala:396)
at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply$mcZ$sp(ILoop.scala:679)
at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:665)
at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:665)
at scala.tools.nsc.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:95)
at scala.tools.nsc.interpreter.ILoop.process(ILoop.scala:665)
at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:80)
at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:93)
at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:102)
at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
That entry seems to have slain the compiler. ShallI replay
your session?I can re-run each line except the last one.
[y/n]
I think we should reduce the amount of options. I have never seen an issue were someone told the mailing list “I have issue X” and the answer was “Use a different setting for -Ystruct-dispatch”.
And in the future, it makes more sense to merge this decision into the backend (so that the backend which targets Java 6 uses reflection and the backend which targets Java 8 uses invokedynamic).
The text was updated successfully, but these errors were encountered:
There doesn't seem to exist a single test for these different structural dispatch implementations.
no-cache
andmono-cache
seem to work (only did some superficial testing), butinvoke-dynamic
fails:I think we should reduce the amount of options. I have never seen an issue were someone told the mailing list “I have issue X” and the answer was “Use a different setting for -Ystruct-dispatch”.
And in the future, it makes more sense to merge this decision into the backend (so that the backend which targets Java 6 uses reflection and the backend which targets Java 8 uses invokedynamic).
The text was updated successfully, but these errors were encountered: