| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Improve the performance of Map4 to HashMap and Set4 to HashSet transitions
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Add tests for ConsoleReporter.
|
| | | |
|
|\ \ \
| | | |
| | | | |
Don't use `equals` for comparing java.lang.Double/Float
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fixes https://github.com/scala/scala-dev/issues/329
The `equals` method for java.lang.Double/Float behaves differently than comparing
the `doubleValue`s / `floatValues` for `-0.0`/`0.0`/`NaN`.
|
|\ \ \ \
| | | | |
| | | | | |
SI-10187 Support mutation of mutable.HashMap in getOrElseUpdate
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Scala 2.12.1 included optimizations to `HashMape.getOrElseUpdate`
to avoid recomputing the index in the hash table when adding an
the element.
However, this index could be stale if the callback added elements
to the map and triggered a resize.
This commit checks that the table is unchanged before reusing
the index, restoring the 2.12.0 behaviour.
|
| |_|/ /
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Follow-up to fb061f22d4c35df626d9651e017820a11f8fe56e
which allowed the type param only.
Reported:
```
scala> object Test {
| def a[R](implicit s: List[R]):Int = 0
| def a_=[R](v: Int)(implicit s: List[R]) = ()
| }
```
|
|\ \ \ \
| |_|_|/
|/| | | |
fix regression in scaladoc
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Avoid compiler crash with missing transitive dependencies
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
In this test case, the backend forces the specialization
info transform of `Sub` during computation of its
inner class metadata. This in turn runs the info transforms
of the `Base`. This leads to the uncurry info tranform
transforming a signature that has a type alias as a
method parameter type. Subsequent substution of the new
method symbol into the result type, which includes a
stub symbol for an absent class, tripped an assertion:
```
requirement failed: package b
java.lang.IllegalArgumentException: requirement failed: package b
at scala.Predef$.require(Predef.scala:277)
at scala.reflect.internal.Types$ModuleTypeRef.<init>(Types.scala:1879)
at scala.reflect.internal.Types$PackageTypeRef.<init>(Types.scala:1897)
at scala.reflect.internal.Types$TypeRef$.apply(Types.scala:2401)
at scala.reflect.internal.Types.typeRef(Types.scala:3553)
at scala.reflect.internal.Types.typeRef$(Types.scala:3536)
at scala.reflect.internal.SymbolTable.typeRef(SymbolTable.scala:16)
at scala.reflect.internal.Symbols$TypeSymbol.newTypeRef(Symbols.scala:3026)
at scala.reflect.internal.Symbols$TypeSymbol.updateTypeCache(Symbols.scala:3079)
at scala.reflect.internal.Symbols$TypeSymbol.maybeUpdateTypeCache(Symbols.scala:3065)
at scala.reflect.internal.Symbols$TypeSymbol.tpe_$times(Symbols.scala:3043)
at scala.reflect.internal.Symbols$Symbol.typeOfThis(Symbols.scala:2020)
at scala.reflect.internal.Types$ThisType.underlying(Types.scala:1184)
at scala.reflect.internal.Types$SimpleTypeProxy.boundSyms(Types.scala:150)
at scala.reflect.internal.Types$SimpleTypeProxy.boundSyms$(Types.scala:150)
at scala.reflect.internal.Types$SingletonType.boundSyms(Types.scala:1088)
at scala.reflect.internal.tpe.TypeMaps$SubstMap.apply(TypeMaps.scala:726)
at scala.reflect.internal.tpe.TypeMaps$SubstSymMap.apply(TypeMaps.scala:789)
at scala.reflect.internal.tpe.TypeMaps$TypeMap.mapOver(TypeMaps.scala:102)
at scala.reflect.internal.tpe.TypeMaps$SubstSymMap.apply(TypeMaps.scala:783)
at scala.reflect.internal.tpe.TypeMaps$TypeMap.mapOver(TypeMaps.scala:102)
at scala.reflect.internal.tpe.TypeMaps$SubstSymMap.apply(TypeMaps.scala:783)
at scala.reflect.internal.Types$Type.substSym(Types.scala:727)
at scala.reflect.internal.tpe.TypeMaps$TypeMap.mapOver(TypeMaps.scala:123)
at scala.reflect.internal.transform.UnCurry$$anon$1.apply(UnCurry.scala:53)
at scala.reflect.internal.transform.UnCurry.transformInfo(UnCurry.scala:154)
```
This commit address the direct failure above by setting coherent flags on
the stub package class symbol (it also needs the MODULE flag).
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Improved error messages for identically named, differently prefixed types
|
| | | | | | |
|
| | | | | | |
|
|\ \ \ \ \ \
| | |_|/ / /
| |/| | | /
| |_|_|_|/
|/| | | | |
inlineToStr is not exhaustive and does not remove html tags inside HtmlTag [ci: last-only]
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
scala.xml.XML.loadString(tag).text will remove all html tags inside the HtmlTag
use a regex to remove html tags inside the tag
added some tests for the inlineToStr-method
moved inlineToStr to companion object of Page
added test for nested html tags
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Gaze deeper for errors before committing to conversion
of assignment to update. The error buried in the transformed
tree escapes notice of retypechecking and leaks to backend.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
these were occasionally timing out on our Windows CI
reference: https://github.com/scala/scala-dev/issues/313
|
|/ / / / |
|
|\ \ \ \
| | | | |
| | | | | |
SI-9704 don't add a closing HtmlTag if it is already closed
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix erasure of the qualifier of ##
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-10194: Fix abstract type resolution for overloaded HOFs
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Types in the applicable overload alternatives need to be seen from
the respective owners of the individual alternative, not from the
target’s owner (which can be a subtype of the types that define the
methods).
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-10190 Elide string to empty instead of null
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Avoid NPE when eliding string-valued functions.
For example, `log(s"$cheap$expensive")` needn't print null.
This is a natural and inexpensive way to elide strings.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
SI-9881 Fix ImportHandler's reporting of importedNames and importedSymbols
|
| | | | | | | | | |
|
| | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
SI-10133 Require escaped single quote char lit
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Instead of indenting source code to make messages
align on output, let the reporter add indentation,
only if the source is the console (and not a pastie
or a loaded file).
Previously, syntax errors were not indented.
```
$ skala
Welcome to Scala 2.12.2-20170108-010722-939abf1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_111).
Type in expressions for evaluation. Or try :help.
scala> 'abc'
<console>:1: error: unclosed character literal (or use " for string literal "abc")
'abc'
^
scala> :quit
$ scala
Welcome to Scala 2.12.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_111).
Type in expressions for evaluation. Or try :help.
scala> 'abc'
<console>:1: error: unclosed character literal
'abc'
^
```
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Folks from other languages might mistakenly enclose
a string in single quotes. Since this presents as
a symbol literal followed by the unpaired single
quote, we can add a syntax reminder.
Also polish the wording for bad string
interpolation.
|
| | |_|_|_|_|/ / /
| |/| | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The spec specifically requires `'\''` and not `'''`.
The error consumes all consecutive single quotes.
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
SI-10026 Fix endless cycle in runtime reflection
|
| | |_|_|_|_|_|/ /
| |/| | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
56f23af introduced a call to `baseTypeSeq` of `scala.collection.mutable.ArrayOps.ofRef[?T]{}`
in `findMember`. This exposed a latent bug in the synchronized wrapper of `BaseTypeSeq`,
demonstrated below with an older version of Scala:
```
Welcome to Scala 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_112).
Type in expressions for evaluation. Or try :help.
scala> val symtab = reflect.runtime.universe.asInstanceOf[scala.reflect.internal.SymbolTable]
symtab: scala.reflect.internal.SymbolTable = scala.reflect.runtime.JavaUniverse@458544e0
scala> import symtab._
import symtab._
scala> val ArrayOps_ofRef_Class = symtab.symbolOf[scala.collection.mutable.ArrayOps.ofRef[AnyRef]]
ArrayOps_ofRef_Class: symtab.TypeSymbol = class ofRef
scala> appliedType(symbolOf[Set[Any]], symbolOf[Set[Any]].typeParams.map(TypeVar(_)))
res2: symtab.Type = Set[?A]
scala> .narrow
res3: symtab.Type = <none>.<refinement>.type
scala> .baseTypeSeq
java.lang.StackOverflowError
at scala.reflect.runtime.Gil$class.gilSynchronized(Gil.scala:21)
at scala.reflect.runtime.JavaUniverse.gilSynchronized(JavaUniverse.scala:16)
at scala.reflect.runtime.SynchronizedOps$SynchronizedBaseTypeSeq$class.map(SynchronizedOps.scala:27)
at scala.reflect.runtime.SynchronizedOps$SynchronizedBaseTypeSeq$$anon$2.map(SynchronizedOps.scala:34)
at scala.reflect.runtime.SynchronizedOps$SynchronizedBaseTypeSeq$class.lateMap(SynchronizedOps.scala:34)
at scala.reflect.runtime.SynchronizedOps$SynchronizedBaseTypeSeq$$anon$2.lateMap(SynchronizedOps.scala:34)
at scala.reflect.internal.BaseTypeSeqs$MappedBaseTypeSeq.map(BaseTypeSeqs.scala:235)
at scala.reflect.runtime.SynchronizedOps$SynchronizedBaseTypeSeq$$anon$2.scala$reflect$runtime$SynchronizedOps$SynchronizedBaseTypeSeq$$super$map(SynchronizedOps.scala:34)
at scala.reflect.runtime.SynchronizedOps$SynchronizedBaseTypeSeq$$anonfun$map$1.apply(SynchronizedOps.scala:27)
at scala.reflect.runtime.SynchronizedOps$SynchronizedBaseTypeSeq$$anonfun$map$1.apply(SynchronizedOps.scala:27)
at scala.reflect.runtime.Gil$class.gilSynchronized(Gil.scala:19)
at scala.reflect.runtime.JavaUniverse.gilSynchronized(JavaUniverse.scala:16)
at scala.reflect.runtime.SynchronizedOps$SynchronizedBaseTypeSeq$class.map(SynchronizedOps.scala:27)
at scala.reflect.runtime.SynchronizedOps$SynchronizedBaseTypeSeq$$anon$2.map(SynchronizedOps.scala:34)
at scala.reflect.runtime.SynchronizedOps$SynchronizedBaseTypeSeq$class.lateMap(SynchronizedOps.scala:34)
at scala.reflect.runtime.SynchronizedOps$SynchronizedBaseTypeSeq$$anon$2.lateMap(SynchronizedOps.scala:34)
at scala.reflect.internal.BaseTypeSeqs$MappedBaseTypeSeq.map(BaseTypeSeqs.scala:235)
```
The infinite cycle involves:
```
class MappedBaseTypeSeq(orig: BaseTypeSeq, f: Type => Type) extends BaseTypeSeq(orig.parents map f, orig.elems) {
...
override def map(g: Type => Type) = lateMap(g)
override def lateMap(g: Type => Type) = orig.lateMap(x => g(f(x)))
}
trait SynchronizedBaseTypeSeq extends BaseTypeSeq {
...
override def map(f: Type => Type): BaseTypeSeq = gilSynchronized { super.map(f) }
override def lateMap(f: Type => Type): BaseTypeSeq =
// only need to synchronize BaseTypeSeqs if they contain refined types
if (map(f).toList.exists(_.isInstanceOf[RefinedType])) new MappedBaseTypeSeq(this, f) with SynchronizedBaseTypeSeq
else new MappedBaseTypeSeq(this, f)
}
```
This commit creates a new factory method for `MappedBaseTypeSeq`-s to break the cycle.
As an independent change, I have also removed the attempt to conditionally synchronize them,
as the condition was eagerly applying the map function (and throwing away the result!).
I've appeased MiMa with new whitelist entries, but I'm confident that this is deep enough
in the bowels of our runtime reflection implementation that there is no way that user code
will be calling these methods directly.
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Ignore BoundedWildcardType in erasure type map
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
This case can be triggered as illustrated in the test.
|
|\ \ \ \ \ \ \ \ \ \
| |/ / / / / / / / /
|/| | | | | | | | | |
Faster and simpler Java 9 classpath implementation
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
- Take advantage of the `/packages` index provided by the
jrt file system to avoid (expensive) Files.exist for
non-existent entries across the full list of modules.
- Extends ClassPath directly which leads to a simpler
implemnentation that using the base class.
- Add a unit test that shows we can read classes and packages
from the Java standard library.
Fixes scala/scala-dev#306
With this change bootstrap time under Java 9 was comparable to
Java 8. Before, it was about 40% slower.
|
|\ \ \ \ \ \ \ \ \ \
| |_|/ / / / / / / /
|/| | | | | | | | | |
SI-10148 Accept verbose zero
|
| | |_|_|_|_|_|_|/
| |/| | | | | | |
| | | | | | | | |
| | | | | | | | | |
The test for non-zero must recognize `-0e+00f` and variants.
|
|/ / / / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Fix scala/scala-dev#296
|
|\ \ \ \ \ \ \ \
| | |_|_|_|/ / /
| |/| | | | | | |
|
| |\ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
SI-10164 BitSet.tail zigs where it zagged
|
| | |/ / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
A cut/paste issue, an increment was held over from head,
which scans forward, to tail, which scans backward.
|