I was reading this question and saw:
scalac includes an 8-bit simulator of a fully armed and operational battle station, viewable using the magic key combination CTRL-ALT-F12 during the GenICode compilation phase.
To show what compilation phases scalac
has, I used scalac -Xshow-phases
.
phase name id description
---------- -- -----------
< ... >
icode 23 generate portable intermediate code
Seems to be the relevant phase.
I compile a Hello-world program
object Hello {
def main(args: Array[String]): Unit = {
println("Hello, world!")
}
}
by scalac Hello.scala
and pressed CTRL-ALT-F12 all the way. Nothing happened. And tried scalac -Xprint:icode Hello.scala
with CTRL-ALT-F12, nothing special as well.
How can I trigger the simulator? And what does that do?
On scala 2.11.8 and OS X 10.11.5