scala-dev icon indicating copy to clipboard operation
scala-dev copied to clipboard

Scala 2 team issues. Not for user-facing bugs or directly actionable user-facing improvements. For build/test/infra and for longer-term planning and idea tracking. Our bug tracker is at https://github...

Results 120 scala-dev issues
Sort by recently updated
recently updated
newest added
trafficstars

@retronym suggests we use https://community.oracle.com/blogs/forax/2011/12/17/jsr-292-goodness-almost-static-final-field to hide our instrumentation better from the JIT. A lot of compiler settings are constant `false` in most compiler runs, yet they must be checked...

t:optimizer

scala-js supports `@inline` on classes, we could do the same. we could also consider all value classes as having the annotation. see also https://issues.scala-lang.org/browse/SI-9731

t:optimizer

Extend #11 to support value class instances.

t:optimizer

Allocations of classes providing extension methods should be eliminated. Note that this problem is solved in many cases by value classes, for example `1 to 10` expands to `Predef.intWrapper(10).to(20)`. After...

feature
t:optimizer

Example: ``` class C { def t = { val f = (b: Int, i: Object) => 0 f(1, null) } } ``` The classfile has an unused method `C$$$anonfun$1$adapted`....

enhancement
t:optimizer

If all closure instantiations in a class are eliminated, also eliminate (or don't emit) the `deserializeLambda` method and the `$deserializeLambdaCache$` field. ``` scala class C { def f = {...

enhancement
t:optimizer
t:java8:lambda

Matches generate "result" variables that could be elided: ``` class C { def f(x: String) = println(x match { case "hai" => x.trim }) } ``` compiles to ``` public...

enhancement
t:optimizer
c:patmat

The old optimizer inlined exception handlers if a `throw` throws an exception that is caught in the same method. According to @VladUreche, this is mainly to support two use-cases: -...

feature
t:optimizer
prio:low

Eliminate unused fields from closures. See Miguel's prototype: https://github.com/scala/scala/commit/5d4e477, also the paper "Optimizing Closures in O(0) time".

feature
t:optimizer

``` trait TravLike { def map = ... } sealed trait List extends TravLike { ... } // map is not overridden final case class :: final case object Nil...

enhancement
t:optimizer
help-wanted