Skip to content

Instantly share code, notes, and snippets.

View SethTisue's full-sized avatar

Seth Tisue SethTisue

View GitHub Profile
@SethTisue
SethTisue / interpreter.scala
Created March 10, 2012 15:51 — forked from chrislewis/interpreter.scala
quick interpreter for nescala
package necsala.embedded
import scala.tools.nsc.interpreter.AbstractFileClassLoader
import scala.tools.nsc.{Global, Settings}
import scala.tools.nsc.util.BatchSourceFile
import scala.tools.nsc.io.{AbstractFile, VirtualDirectory}
import java.io.File
import java.util.jar.JarFile
import java.net.URLClassLoader
sealed trait HardCore extends Core[Nothing]
object HardCore {
case class Super(i: Int) extends HardCore
case class Slot(i: Int) extends HardCore
case class LitInt(i: Int) extends HardCore
case class LitInt64(l: Long) extends HardCore
case class LitByte(b: Byte) extends HardCore
case class LitShort(s: Short) extends HardCore
case class LitString(s: String) extends HardCore
case class LitChar(c: Char) extends HardCore

Fixes with compatibility implications

Scala 2.12.9 generates shallower ASTs in pattern translation, to reduce stack size requirements (-Xss) during compilation.

Scala.js users must update to 0.6.28+ or 1.0.0-M8+ for compatibility with Scala 2.12.9. (#7375)

Highlights of 2.12.9

  • Improved compatibility with JDK 11, 12, and 13 (see below)