Skip to content

Instantly share code, notes, and snippets.

Avatar

Jason Zaugg retronym

View GitHub Profile
View gist:2e285db92cc4f967d68c70b532010c80
after boxUnbox
// access flags 0x1000001
public crash()V
L0
LINENUMBER 5 L0
L1
LINENUMBER 6 L1
ICONST_0
ISTORE 2
View gist:d4091c9ce792cb2bab24b29e8312032c
L0
LINENUMBER 5 L0
L1
LINENUMBER 6 L1
ACONST_NULL
ASTORE 3
L2
ACONST_NULL
ASTORE 5
GOTO L3
View gist:cc2dfa1c927c5492923c8acb43d8c3fb
L0
LINENUMBER 5 L0
L1
LINENUMBER 6 L1
ACONST_NULL
ASTORE 3
L2
NEW scala/runtime/ObjectRef
DUP
ALOAD 3
View gist:ce64349ec61b0e0b33f2f907cd98b4ae
package p1
class Test {
def crash: Unit = {
var box: AnyRef = null
def writeBox(a: AnyRef): Unit = {
box = a
}
View scala-partest.pom
<?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>
View gist:1fe3802bab258e1814b8732845602146
[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])
View gist:8c49524b31f4a25d8cee38323c15fd91
➜ 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
View 2.12.x-to-2.13.x-mergeplan.txt
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 ----
View non-static-lambda.txt
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);