Skip to content

@densh densh released this Sep 7, 2017 · 308 commits to master since this release

This release focuses on performance and library improvements, keeping backwards binary compatibility with previous releases in 0.3.x series.

Performance improvements 👟

This release provides a number of performance tweaks to reduce overhead of stack traces, equality comparisons and boxing of primitives:

#963 #995 Cache stack trace elements (by @Duhemm)
#982 Short-circuit virtual dispatch for == and ## (by @densh)
#990 Avoid virtual dispatch in default implementation of == and ## (by @densh)
#997 == null must not call equals (by @densh)
#1000 Cache primitive numeric boxes (by @densh)

The combination of these changes provides up to 5x reduction of running time on some of our benchmarks:

screen shot 2017-09-06 at 10 22 38

(Running time per benchmark, normalized by 0.3.2, nativeGC := "immix", nativeMode := "release".)

Library improvements 📚

As part of the GSoC, @asoltysik has contributed initial support for server and client sockets from

#914 Implementation of TCP Sockets and InetSocketAddress (by @asoltysik)
#917 Server socket implementation (by @asoltysik)

Another major area of improvements is near-complete support for and java.util.jar APIs contributed by @Duhemm from the Scala Center:

#933 Add support for{Input, Output}Stream (by @Duhemm)
#935 Add support for{ZipFile, ZipEntry} (by @Duhemm)
#942 Add support for manipulating JAR files with java.util.jar (by @Duhemm)
#964 Add support for{Input, Output}Stream (by @Duhemm)
#966 Add support for java.util.jar.Jar{Input, Output}Stream (by @Duhemm)

Additionally there is also improved support for:

#931 Add support for (by @Duhemm)
#938 Port BufferedOutputStream from Apache Harmony (by @Duhemm)
#976 Add support for scala.Enumeration (by @Duhemm)
#985 Add support for scala.util.Properties (by @Duhemm)

Thanks to these changes we could run scalac (with minimal modifications) compiled ahead-of-time:

It's been a while since our last update. Here is a sneak peak on what @mnduhem and @den_sh have been secretly hacking on lately.

— Scala Native (@scala_native) August 3, 2017

Stub linking 🔗

This release changes the way we link unimplemented parts of the java.* space. Previously we would unconditionally link all the stubbed methods, potentially causing failures at runtime (by throwing scala.NotImplementedError.)

Now, those methods are marked as @stub-s and are not linked by default. To enable stub linking one must explicitly specify it in their builds:

nativeLinkStubs := true

By default stubs are not linked and are shown as linking errors. This is a build-breaking change for existing projects that used to rely on the old linking behavior.

Bugfixes and tooling improvements 🐛 🔧

#700 #921 Improve unicode handling in regular expressions (by @matil019)
#817 Maintain a fixed-size cache of compiled RE2 patterns (by @matil019)
#871 Silence stderr of which during linking (by @matil019)
#911 Build fails if there are no sources in src/main/scala (by @ekrich)
#928 Improve performance of NIR code generation (by @densh)
#941 Make sure we deterministically produce the same binaries (by @densh)
#952 Update the nativeGC settingKey description (by @xuwei-k)
#969 Fix curMethodThis in tailrec methods (by @densh)
#972 Add @stub annotation to mark stubs (by @Duhemm)
#977 Fixes build if a parent directory is called gc (by @ekrich)
#1001 Implement j.l.a.RetentionPolicy to fix javalib incremental compilation (by @matil019)

Contributors 👥

According to git shortlog -sn --no-merges v0.3.2..v0.3.3, 6 people contributed to this release:
Denys Shabalin, Martin Duhem, matil019, Andrzej Sołtysik, Eric K Richardson, Kenji Yoshida

Thank you all! 🍰

Assets 2
You can’t perform that action at this time.