Skip to content

Instantly share code, notes, and snippets.

View retronym's full-sized avatar

Jason Zaugg retronym

View GitHub Profile
L0
LINENUMBER 5 L0
L1
LINENUMBER 6 L1
ACONST_NULL
ASTORE 3
L2
ACONST_NULL
ASTORE 5
GOTO L3
L0
LINENUMBER 5 L0
L1
LINENUMBER 6 L1
ACONST_NULL
ASTORE 3
L2
NEW scala/runtime/ObjectRef
DUP
ALOAD 3
https://gist.github.com/d1af6aaaa9cbeb618f0f82593a58ca62
package p1
class Test {
def crash: Unit = {
var box: AnyRef = null
def writeBox(a: AnyRef): Unit = {
box = a
}
<?xml version='1.0' encoding='UTF-8'?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>org.scala-lang</groupId>
<artifactId>scala-partest</artifactId>
<packaging>jar</packaging>
<description>Scala Compiler Testing Tool</description>
<url>https://www.scala-lang.org/</url>
<version>2.12.13-bin-SNAPSHOT</version>
<licenses>
[error] Options accepted by async:
[error] allkernel=<bool> Only include kernel-mode events.
[error] alluser=<bool> Only include user-mode events.
[error] ann=<bool> Annotate Java method names.
[error] cstack=<mode> How to traverse C stack: Supported: [fp, lbr, no].
[error] dir=<dir> Output directory.
[error] direction=<direction> Direction(s) of flame graph. Supported: [forward,
[error] reverse, both]. (default: [both])
[error] event=<event> Event to sample: cpu, alloc, wall, lock, cache-misses,
[error] etc. (default: [cpu])
➜ compiler-benchmark git:(topic/case-class-o-rama) time (for v in 2.12.11 2.12.12-bin-8d19363-SNAPSHOT; do echo $v; sbt clean 'set scalaVersion in compilation := "'$v'"' 'hot -psource=scalap -prof gc -wi 3 -i 3 -f 2' ; done)
2.12.11
[info] Loading settings for project global-plugins from idea.sbt,dirtymoney.sbt,metals.sbt,gpg.sbt ...
[info] Loading global plugins from /Users/jz/.sbt/1.0/plugins
[info] Loading settings for project compiler-benchmark-build from plugins.sbt,build.sbt ...
[info] Loading project definition from /Users/jz/code/compiler-benchmark/project
[info] Loading settings for project compiler-benchmark from build.sbt ...
[info] Set current project to compiler-benchmark (in build file:/Users/jz/code/compiler-benchmark/)
[success] Total time: 0 s, completed 19/05/2020 10:21:18 AM
[info] Defining compilation / scalaVersion
SKIP * 4dd0abeab2 (origin/2.12.x, topic/unrelated-equals-reflexive, 2.12.x) Merge pull request #8980 from mkeskells/2.12.x_Map_++_regression
|\
| * ed36c8bbcc (origin/pr/8980) fix regression in Map ++
| | .../scala/collection/immutable/HashMap.scala | 2 +-
| | .../scala/collection/immutable/HashMapTest.scala | 26 ++++++++++++++++++++
| | 2 files changed, 27 insertions(+), 1 deletion(-)
PICK * | 1c92061d51 Merge pull request #8971 from joroKr21/implicit-by-namme
|\ \
| * | eaf1b749fc (origin/pr/8971) [nomerge] Convert implicit by-name error to a type error
| | | src/compiler/scala/tools/nsc/ast/parser/Parsers.scala | 4 ----
scala> :java -c -private NonStaticLambda
Compiled from "<console>"
public class $line3.$read$$iw$$iw$NonStaticLambda {
public scala.Function0<$line3.$read$$iw$$iw$NonStaticLambda> test();
Code:
0: aload_0
1: invokedynamic #45, 0 // InvokeDynamic #0:apply:(L$line3/$read$$iw$$iw$NonStaticLambda;)Lscala/Function0;
6: areturn
public static final $line3.$read$$iw$$iw$NonStaticLambda $anonfun$test$1($line3.$read$$iw$$iw$NonStaticLambda);
scala> :java -c -private NonStaticLambda
Compiled from "<console>"
public class $line3.$read$$iw$$iw$NonStaticLambda {
public scala.Function0<$line3.$read$$iw$$iw$NonStaticLambda> test();
Code:
0: aload_0
1: invokedynamic #45, 0 // InvokeDynamic #0:apply:(L$line3/$read$$iw$$iw$NonStaticLambda;)Lscala/Function0;
6: areturn
public static final $line3.$read$$iw$$iw$NonStaticLambda $anonfun$test$1($line3.$read$$iw$$iw$NonStaticLambda);