Skip to content

Instantly share code, notes, and snippets.

View retronym's full-sized avatar

Jason Zaugg retronym

View GitHub Profile
➜ 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);
scala> val f = new java.io.File("/tmp/test.zip"); val zos = new java.util.zip.ZipOutputStream(new java.io.FileOutputStream(f)); zos.putNextEntry(new java.util.zip.ZipEntry("\u012f" + "/")); zos.closeEntry(); zos.close()
f: java.io.File = /tmp/test.zip
zos: java.util.zip.ZipOutputStream = java.util.zip.ZipOutputStream@6c4e11d0
scala> val zf = new java.util.zip.ZipFile(f); try zf.getEntry("\u012f") finally zf.close()
zf: java.util.zip.ZipFile = java.util.zip.ZipFile@14b0b7f9
res16: java.util.zip.ZipEntry = į/
scala> val zf = new java.util.zip.ZipFile(f); try zf.getEntry("\u012f" + "/") finally zf.close()
zf: java.util.zip.ZipFile = java.util.zip.ZipFile@4700064f
git -P log -1 && git clean -fdx && java -version && sbt 'packagePlugin' 'runDebuggerTests'
commit 468fc60a3f67f2db22c94c4ad1fcb4b94f6617a5 (HEAD -> topic/clean-slate, retronym/idea201.x, origin/idea201.x, idea201.x)
Author: Justin Kaeser <[email protected]>
Date: Tue Apr 7 23:01:48 2020 +0200
Revert "Not use blocking call in the attachSbtProjectAndRefresh #SCL-17353"
this fix caused the project view not to show the full project tree until the full import completed
when BSP import dialog is disabled, the hanging that this change addresses does not happen, so we can revert it
import scala.concurrent._, duration.Duration, ExecutionContext.Implicits.global
import scala.async.Async.{async, await}
object Test {
def test: Future[Int] = async { await(f(1)) + await(f(2)) }
def f(x: Int): Future[Int] = Future.successful(x)
}
import scala.concurrent._, duration.Duration, ExecutionContext.Implicits.global
import scala.async.Async.{async, await}
object Test {
def test: Future[Int] = async {
val x: Option[Either[Object, (String, String)]] = Some(Right(("a", "b")))
x match {
case Some(Left(_)) => 1
case Some(Right(("a", "c"))) => 2
case Some(Right(("a", "e"))) => 3
case Some(Right(("a", x))) if "ab".isEmpty => 4
diff --git a/src/compiler/scala/tools/nsc/transform/async/ExprBuilder.scala b/src/compiler/scala/tools/nsc/transform/async/ExprBuilder.scala
index 4975a4e04f..389ca1637a 100644
--- a/src/compiler/scala/tools/nsc/transform/async/ExprBuilder.scala
+++ b/src/compiler/scala/tools/nsc/transform/async/ExprBuilder.scala
@@ -68,6 +68,17 @@ trait ExprBuilder extends TransformUtils {
s"AsyncState #$state, next = $nextState"
}
+ final class OpaqueAsyncState(var stats: List[Tree], val state: Int, val nextStates: Array[Int], symLookup: SymLookup)
+ extends AsyncState {
jardiff $(scala-classpath $(scala-ref-version 23f0ead6df645b452d25e90bc1ab1516a8098eb5)) $(scala-classpath $(scala-pr-version 8525))
WARN: unable to invoke scalap on: /scala/concurrent/duration/package.class: Unexpected failure
WARN: unable to invoke scalap on: /scala/concurrent/duration/package.class: Unexpected failure
diff --git a/META-INF/MANIFEST.MF b/META-INF/MANIFEST.MF
index 11033f9..f086f56 100644
--- a/META-INF/MANIFEST.MF
+++ b/META-INF/MANIFEST.MF
@@ -1,310 +1,72 @@
Manifest-Version: 1.0
-Automatic-Module-Name: scala.tools.nsc