Skip to content

Instantly share code, notes, and snippets.

View DarkDimius's full-sized avatar

Dmitry Petrashko DarkDimius

View GitHub Profile
dark@tsf-452-wpa-3-234 ~/workspace/dotty/src/dotty/tools/dotc (opto) $ timed-bootstrap-bench-classes
typer/RefChecks.scala:68: warning: match may not be exhaustive.
It would fail on the following input: (_, _)
for ((_, m1 :: m2 :: _) <- (clazz.info member nme.applyDynamic).alternatives groupBy (_.symbol.typeParams.length)) {
^
one warning found
there were 4 deprecation warning(s); re-run with -deprecation for details
time elapsed: 29438ms
one warning found
there were 4 deprecation warning(s); re-run with -deprecation for details
case class CC(a: Int, b: Object)
object Lists{
def foo(x: Any): Int = {
val (a, b) = x match {
case CC(s @ 1, CC(t, _)) =>
(s , 2)
case _ => (42, 43)
}
a + b
}
diff --git a/src/scala/compat/java8/JFunction1$mcII$sp.java b/src/scala/compat/java8/JFunction1$mcII$sp.java
index 14fce8a..56eb652 100644
--- a/src/scala/compat/java8/JFunction1$mcII$sp.java
+++ b/src/scala/compat/java8/JFunction1$mcII$sp.java
@@ -5,9 +5,17 @@
package scala.compat.java8;
+import dotty.runtime.vc.VCIntPrototype;
+
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x000000010779a603, pid=87348, tid=5891
#
# JRE version: Java(TM) SE Runtime Environment (8.0_45-b14) (build 1.8.0_45-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.45-b02 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# V [libjvm.dylib+0x39a603] klassItable::initialize_itable_for_interface(int, KlassHandle, bool, Thread*)+0x3f
#
Software Grant and Individual Contributor License Agreement ("Agreement"), v1.0
In order to clarify the intellectual property license granted with Contributions from any person or entity, EPFL must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of EPFL; it does not change your rights to use your own Contributions for any other purpose.
Please read this document carefully before signing and keep a copy for your records.
You accept and agree to the following terms and conditions for your present and future Contributions submitted to EPFL. Except for the license granted herein to EPFL and recipients of software distributed by EPFL, You reserve all right, title, and interest in and to Your Contributions.
1. Definitions.
"You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this
def readVolatile[T](l: T): T = macro readVolatile_impl[T]
def readVolatile_impl[T: c.WeakTypeTag](c: Context)(l: c.Expr[T]): c.Expr[T] = {
import c.universe._
l.tree match {
case Select(obj, sel) =>
val name = c.Expr[String](Literal(Constant(sel.encoded)))
val objRef = c.Expr[Any](obj)
l.actualType match {
case x if (x =:= typeOf[Int]) => reify {
Some GC time recorded, accepted: 5, ignored: 6
measurements: 10378.641435, 11963.530569, 11378.469428, 10396.542717, 10984.350433
After outlier elimination: 10378.641435, 10396.542717, 10984.350433, 11378.469428, 11963.530569
After applying noise: 10378,641, 10396,543, 10984,350, 11378,469, 11963,531
Test threw exception: java.util.NoSuchElementException: key not found: Parameters(SamplePageRank -> [[I@1e1c2fc6)
java.util.NoSuchElementException: key not found: Parameters(SamplePageRank -> [[I@1e1c2fc6)
at scala.collection.MapLike$class.default(MapLike.scala:228)
at scala.collection.AbstractMap.default(Map.scala:58)
at scala.collection.MapLike$class.apply(MapLike.scala:141)
at scala.collection.AbstractMap.apply(Map.scala:58)
object IMB1 extends App {
type French = String
type English = String
case class SentencePair(eng: English, fr: French)
case class Translation(eng: English, prob: Double)
case class WordPair(eng: English, fr: French)
val EPS = 1e-6
var iter = 0
def finished = iter > 5
from nltk.tokenize import word_tokenize
from math import erf, log
import sys
import numpy
eng_filename = sys.argv[1]
ru_filename = sys.argv[2]
output_filename = sys.argv[3]
Exception in thread "main" java.lang.ExceptionInInitializerError
at scala.collection.workstealing.benchmark.scalameter.RangeBenchmark$$anonfun$3.apply(ParRangeBenchmark.scala:33)
at scala.collection.workstealing.benchmark.scalameter.RangeBenchmark$$anonfun$3.apply(ParRangeBenchmark.scala:33)
at org.scalameter.Gen$$anon$1$$anonfun$warmupset$1.apply(Gen.scala:13)
at scala.collection.Iterator$$anon$11.next(Iterator.scala:328)
at scala.collection.Iterator$class.foreach(Iterator.scala:727)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
at org.scalameter.execution.SeparateJvmsExecutor$$anonfun$sample$1$1.apply(SeparateJvmsExecutor.scala:49)
at org.scalameter.execution.SeparateJvmsExecutor$$anonfun$sample$1$1.apply(SeparateJvmsExecutor.scala:39)
at org.scalameter.execution.package$Main$.mainMethod(package.scala:73)