jdk2ikvm and next steps for Scala.NET (bonus: a preview of scala.tools.unparse)
jdk2ikvm and next steps for Scala.NET
(bonus: a preview of scala.tools.unparse)
Miguel Garcia
http://lamp.epfl.ch/~magarcia/ScalaNET/
LAMP , EPFL
2011-01-18
1 / 14
Outline Recap of last presentation Motivation for a standalone - - PowerPoint PPT Presentation
jdk2ikvm and next steps for Scala.NET (bonus: a preview of scala.tools.unparse ) jdk2ikvm and next steps for Scala.NET (bonus: a preview of scala.tools.unparse ) Miguel Garcia http://lamp.epfl.ch/~magarcia/ScalaNET/ LAMP , EPFL 2011-01-18 1 /
jdk2ikvm and next steps for Scala.NET (bonus: a preview of scala.tools.unparse)
1 / 14
jdk2ikvm and next steps for Scala.NET (bonus: a preview of scala.tools.unparse)
2 / 14
jdk2ikvm and next steps for Scala.NET (bonus: a preview of scala.tools.unparse)
Recap of last presentation
1http://lamp.epfl.ch/~magarcia/
3 / 14
jdk2ikvm and next steps for Scala.NET (bonus: a preview of scala.tools.unparse)
Motivation for a standalone source-level JDK to IKVM migration tool
4 / 14
jdk2ikvm and next steps for Scala.NET (bonus: a preview of scala.tools.unparse) jdk2ikvm: what it does and how it works
2http://lamp.epfl.ch/~magarcia/
5 / 14
jdk2ikvm and next steps for Scala.NET (bonus: a preview of scala.tools.unparse) jdk2ikvm: what it does and how it works
6 / 14
jdk2ikvm and next steps for Scala.NET (bonus: a preview of scala.tools.unparse) jdk2ikvm: what it does and how it works
◮ either as a one-time migration
◮ supporting both platforms in parallel.
◮ the migration path
◮ “same-platform” API migration tools ◮ from java.io to revamped scala.io ◮ from Java to Scala Collections, etc.
3http://github.com/paulp-etc/scalify 4http://code.google.com/p/jatran/ 5http://java2scala.svn.sourceforge.net/
7 / 14
jdk2ikvm and next steps for Scala.NET (bonus: a preview of scala.tools.unparse) jdk2ikvm: what it does and how it works
converted scalalib sources IKVM converted compiler sources scalalib sources JDK compiler sources
8 / 14
jdk2ikvm and next steps for Scala.NET (bonus: a preview of scala.tools.unparse)
Preview of scala.tools.unparse
9 / 14
jdk2ikvm and next steps for Scala.NET (bonus: a preview of scala.tools.unparse)
Preview of scala.tools.unparse
/∗− unparsed ∗/ def listItemsToHtml(items : scala. collection .Seq[scala.tools.nsc.doc.model.comment.Block]) =
((xmlList : scala.xml.NodeSeq, item : scala.tools .nsc.doc.model.comment.Block) => (item match { case (scala.tools.nsc.doc.model.comment.OrderedList(_, _) | scala.tools.nsc.doc.model.comment.UnorderedList(_)) =>
({ $buf = new scala.xml.NodeBuffer() buf.&+(xmlList. last . child.++[scala.xml.Node, Any](M.blockToHtml(item))(collection.Seq.canBuildFrom[scala.xml.Node])) $buf }: _∗)))(xml.NodeSeq.canBuildFrom) }))) 10 / 14
jdk2ikvm and next steps for Scala.NET (bonus: a preview of scala.tools.unparse)
Preview of scala.tools.unparse
6http://www.scala-lang.org/node/7423 7http://lamp.epfl.ch/~magarcia/
11 / 14
jdk2ikvm and next steps for Scala.NET (bonus: a preview of scala.tools.unparse)
Preview of scala.tools.unparse
◮ take a break from the thrill of adding term and type symbols; and ◮ not constrained to the Scala subset that later phases understand
8For an example see http://lampsvn.epfl.ch/trac/scala/browser/scala-experimental/trunk/ jdk2ikvm/src/scala/tools/jdk2ikvm/UnparsingJDK2IKVM.scala
12 / 14
jdk2ikvm and next steps for Scala.NET (bonus: a preview of scala.tools.unparse)
Preview of scala.tools.unparse
http://www.eecs.berkeley.edu/~benh/atomjava.pdf
13 / 14
jdk2ikvm and next steps for Scala.NET (bonus: a preview of scala.tools.unparse)
Next steps for Scala.NET
9http://ccimetadata.codeplex.com/
14 / 14
jdk2ikvm and next steps for Scala.NET (bonus: a preview of scala.tools.unparse)
Backup slides
15 / 14
jdk2ikvm and next steps for Scala.NET (bonus: a preview of scala.tools.unparse)
Backup slides
16 / 14